Logo: Agent Cognitive Memory Architecture

Agent Cognitive Memory Architecture

Organisatioun
rondoflow
agent-cognitive-memory-architecture

Noosphere Integrated Memory Architecture — Complete cognitive stack for AI agents: persistent memory, emotional intelligence, dream consolidation, hive mind, precognitive recall, and lucid moments. 4 embedding providers, LadybugDB graph backend, zero-config install. nima-core.ai

Iwwersiicht

Editeurrondoflow
Repositoryrondoflow
Skill-Nummagent-cognitive-memory-architecture
Stären
29
Forks
2
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    rondoflow huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Agent Cognitive Memory Architecture an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/rondoflow/rondoflow/tree/master/packages/catalog/content/skills/agent-cognitive-memory-architecture
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rondoflow/rondoflow.git /tmp/rondoflow
mkdir -p .claude/skills
cp -r /tmp/rondoflow/packages/catalog/content/skills/agent-cognitive-memory-architecture .claude/skills/agent-cognitive-memory-architecture
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Agent Cognitive Memory Architecture an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Agent Cognitive Memory Architecture automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Agent Cognitive Memory Architecture net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

NIMA Core 3.2

Noosphere Integrated Memory Architecture — A complete cognitive stack for AI agents: persistent memory, emotional intelligence, dream consolidation, hive mind, and precognitive recall.

Website: https://nima-core.ai · GitHub: https://github.com/lilubot/nima-core

Quick Start

bash
pip install nima-core && nima-core

Your bot now has persistent memory. Zero config needed.

What's New in v3.0

Complete Cognitive Stack

NIMA evolved from a memory plugin into a full cognitive architecture:

ModuleWhat It DoesVersion
Memory Capture3-layer capture (input/contemplation/output), 4-phase noise filteringv2.0
Semantic RecallVector + text hybrid search, ecology scoring, token-budgeted injectionv2.0
Dynamic AffectPanksepp 7-affect emotional state (SEEKING, RAGE, FEAR, LUST, CARE, PANIC, PLAY)v2.1
VADER AnalyzerContextual sentiment — caps boost, negation, idioms, degree modifiersv2.2
Memory PrunerLLM distillation of old conversations → semantic gists, 30-day suppression limbov2.3
Dream ConsolidationNightly synthesis — extracts insights and patterns from episodic memoryv2.4
Hive MindMulti-agent memory sharing via shared DB + optional Redis pub/subv2.5
PrecognitionTemporal pattern mining → predictive memory pre-loadingv2.5
Lucid MomentsSpontaneous surfacing of emotionally-resonant memoriesv2.5
Darwinian MemoryClusters similar memories, ghosts duplicates via cosine + LLM verificationv3.0
InstallerOne-command setup — LadybugDB, hooks, directories, embedder configv3.0

v3.0 Highlights

  • All cognitive modules unified under a single package
  • Installer (install.sh) for zero-friction setup
  • All OpenClaw hooks bundled and ready to drop in
  • README rewritten, all versions aligned to 3.0.4

Architecture

text
OPENCLAW HOOKS
├── nima-memory/          Capture hook (3-layer, 4-phase noise filter)
│   ├── index.js          Hook entry point
│   ├── ladybug_store.py  LadybugDB storage backend
│   ├── embeddings.py     Multi-provider embedding (Voyage/OpenAI/Ollama/local)
│   ├── backfill.py       Historical transcript import
│   └── health_check.py   DB integrity checks
├── nima-recall-live/     Recall hook (before_agent_start)
│   ├── lazy_recall.py    Current recall engine
│   └── ladybug_recall.py LadybugDB-native recall
├── nima-affect/          Affect hook (message_received)
│   ├── vader-affect.js   VADER sentiment analyzer
│   └── emotion-lexicon.js Emotion keyword lexicon
└── shared/               Resilient wrappers, error handling

PYTHON CORE (nima_core/)
├── cognition/
│   ├── dynamic_affect.py         Panksepp 7-affect system
│   ├── emotion_detection.py      Text emotion extraction
│   ├── affect_correlation.py     Cross-affect analysis
│   ├── affect_history.py         Temporal affect tracking
│   ├── affect_interactions.py    Affect coupling dynamics
│   ├── archetypes.py             Personality baselines (Guardian, Explorer, etc.)
│   ├── personality_profiles.py   JSON personality configs
│   └── response_modulator_v2.py  Affect → response modulation
├── dream_consolidation.py        Nightly memory synthesis engine
├── memory_pruner.py              Episodic distillation + suppression
├── hive_mind.py                  Multi-agent memory sharing
├── precognition.py               Temporal pattern mining
├── lucid_moments.py              Spontaneous memory surfacing
├── connection_pool.py            SQLite pool (WAL, thread-safe)
├── logging_config.py             Singleton logger
└── metrics.py                    Thread-safe counters/timings

Privacy & Permissions

  • ✅ All data stored locally in ~/.nima/
  • ✅ Default: local embeddings = zero external calls
  • ✅ No NIMA-owned servers, no proprietary tracking, no analytics sent to external services
  • ⚠️ Opt-in networking: HiveMind (Redis pub/sub), Precognition (LLM endpoints), LadybugDB migrations — see Optional Features below
  • 🔒 Embedding API calls only when explicitly enabling (VOYAGE_API_KEY, OPENAI_API_KEY, etc.)

Optional Features with Network Access

FeatureEnv VarNetwork Calls ToDefault
Cloud embeddingsNIMA_EMBEDDER=voyagevoyage.aiOff
Cloud embeddingsNIMA_EMBEDDER=openaiopenai.comOff
Memory prunerANTHROPIC_API_KEY setanthropic.comOff
Ollama embeddingsNIMA_EMBEDDER=ollamalocalhost:11434Off
HiveMindHIVE_ENABLED=trueRedis pub/subOff
PrecognitionUsing external LLMConfigured endpointOff

Security

What Gets Installed

ComponentLocationPurpose
Python core (nima_core/)~/.nima/Memory, affect, cognition
OpenClaw hooks~/.openclaw/extensions/nima-*/Capture, recall, affect
SQLite database~/.nima/memory/graph.sqlitePersistent storage
Logs~/.nima/logs/Debug logs (optional)

Credential Handling

Env VarRequired?Network Calls?Purpose
NIMA_EMBEDDER=localNo❌Default — offline embeddings
VOYAGE_API_KEYOnly if using Voyage✅ voyage.aiCloud embeddings
OPENAI_API_KEYOnly if using OpenAI✅ openai.comCloud embeddings
ANTHROPIC_API_KEYOnly if using pruner✅ anthropic.comMemory distillation
NIMA_OLLAMA_MODELOnly if using Ollama❌ (localhost)Local GPU embeddings

Recommendation: Start with NIMA_EMBEDDER=local (default). Only enable cloud providers when you need better embedding quality.

Safety Features

  • Input filtering — System messages, heartbeats, and duplicates are filtered before capture
  • FTS5 injection prevention — Parameterized queries prevent SQL injection
  • Path traversal protection — All file paths are sanitized
  • Temp file cleanup — Automatic cleanup of temporary files
  • API timeouts — Network calls have reasonable timeouts (30s Voyage, 10s local)

Best Practices

  1. Review before installing — Inspect install.sh and hook files before running
  2. Backup config — Backup ~/.openclaw/openclaw.json before adding hooks
  3. Don't run as root — Installation writes to user home directories
  4. Use containerized envs — Test in a VM or container first if unsure
  5. Rotate API keys — If using cloud embeddings, rotate keys periodically
  6. Monitor logs — Check ~/.nima/logs/ for suspicious activity

Data Locations

text
~/.nima/
├── memory/
│   ├── graph.sqlite       # SQLite backend (default)
│   ├── ladybug.lbug       # LadybugDB backend (optional)
│   ├── embedding_cache.db # Cached embeddings
│   └── embedding_index.npy# Vector index
├── affect/
│   └── affect_state.json  # Current emotional state
└── logs/                  # Debug logs (if enabled)

~/.openclaw/extensions/
├── nima-memory/           # Capture hook
├── nima-recall-live/     # Recall hook
└── nima-affect/          # Affect hook

Controls:

json
{
  "plugins": {
    "entries": {
      "nima-memory": {
        "skip_subagents": true,
        "skip_heartbeats": true,
        "noise_filtering": { "filter_system_noise": true }
      }
    }
  }
}

Configuration

Embedding Providers

ProviderSetupDimsCost
Local (default)NIMA_EMBEDDER=local384Free
Voyage AINIMA_EMBEDDER=voyage + VOYAGE_API_KEY1024$0.12/1M tok
OpenAINIMA_EMBEDDER=openai + OPENAI_API_KEY1536$0.13/1M tok
OllamaNIMA_EMBEDDER=ollama + NIMA_OLLAMA_MODEL768Free

Database Backend

SQLite (default)LadybugDB (recommended)
Text Search31ms9ms (3.4x faster)
Vector SearchExternalNative HNSW (18ms)
Graph QueriesSQL JOINsNative Cypher
DB Size~91 MB~50 MB (44% smaller)

Upgrade: pip install real-ladybug && python -c "from nima_core.storage import migrate; migrate()"

All Environment Variables

bash
# Embedding (default: local)
NIMA_EMBEDDER=local|voyage|openai|ollama
VOYAGE_API_KEY=pa-xxx
OPENAI_API_KEY=sk-xxx
NIMA_OLLAMA_MODEL=nomic-embed-text

# Data paths
NIMA_DATA_DIR=~/.nima
NIMA_DB_PATH=~/.nima/memory/ladybug.lbug

# Memory pruner
NIMA_DISTILL_MODEL=claude-haiku-4-5
ANTHROPIC_API_KEY=sk-ant-xxx

# Logging
NIMA_LOG_LEVEL=INFO
NIMA_DEBUG_RECALL=1

Hooks

HookFiresDoes
nima-memoryAfter saveCaptures 3 layers → filters noise → stores in graph DB
nima-recall-liveBefore LLMSearches memories → scores by ecology → injects as context (3000 token budget)
nima-affectOn messageVADER sentiment → Panksepp 7-affect state → archetype modulation

Installation

bash
./install.sh
openclaw gateway restart

Or manual:

bash
cp -r openclaw_hooks/nima-memory ~/.openclaw/extensions/
cp -r openclaw_hooks/nima-recall-live ~/.openclaw/extensions/
cp -r openclaw_hooks/nima-affect ~/.openclaw/extensions/

Advanced Features

Dream Consolidation

Nightly synthesis extracts insights and patterns from episodic memory:

bash
python -m nima_core.dream_consolidation
# Or schedule via OpenClaw cron at 2 AM

Memory Pruner

Distills old conversations into semantic gists, suppresses raw noise:

bash
python -m nima_core.memory_pruner --min-age 14 --live
python -m nima_core.memory_pruner --restore 12345  # undo within 30 days

Hive Mind

Multi-agent memory sharing:

python
from nima_core import HiveMind
hive = HiveMind(db_path="~/.nima/memory/ladybug.lbug")
context = hive.build_agent_context("research task", max_memories=8)
hive.capture_agent_result("agent-1", "result summary", "model-name")

Precognition

Temporal pattern mining → predictive memory pre-loading:

python
from nima_core import NimaPrecognition
precog = NimaPrecognition(db_path="~/.nima/memory/ladybug.lbug")
precog.run_mining_cycle()

Lucid Moments

Spontaneous surfacing of emotionally-resonant memories (with safety: trauma filtering, quiet hours, daily caps):

python
from nima_core import LucidMoments
lucid = LucidMoments(db_path="~/.nima/memory/ladybug.lbug")
moment = lucid.surface_moment()

Affect System

Panksepp 7-affect emotional intelligence with personality archetypes:

python
from nima_core import DynamicAffectSystem
affect = DynamicAffectSystem(identity_name="my_bot", baseline="guardian")
state = affect.process_input("I'm excited about this!")
# Archetypes: guardian, explorer, trickster, empath, sage

API

python
from nima_core import (
    DynamicAffectSystem,
    get_affect_system,
    HiveMind,
    NimaPrecognition,
    LucidMoments,
)

# Affect (thread-safe singleton)
affect = get_affect_system(identity_name="lilu")
state = affect.process_input("Hello!")

# Hive Mind
hive = HiveMind()
context = hive.build_agent_context("task description")

# Precognition
precog = NimaPrecognition()
precog.run_mining_cycle()

# Lucid Moments
lucid = LucidMoments()
moment = lucid.surface_moment()

Changelog

See CHANGELOG.md for full version history.

Recent Releases

  • v3.0.4 (Feb 23, 2026) — Darwinian memory engine, new CLIs, installer, bug fixes
  • v2.5.0 (Feb 21, 2026) — Hive Mind, Precognition, Lucid Moments
  • v2.4.0 (Feb 20, 2026) — Dream Consolidation engine
  • v2.3.0 (Feb 19, 2026) — Memory Pruner, connection pool, Ollama support
  • v2.2.0 (Feb 19, 2026) — VADER Affect, 4-phase noise remediation, ecology scoring
  • v2.0.0 (Feb 13, 2026) — LadybugDB backend, security hardening, 348 tests

License

MIT — free for any AI agent, commercial or personal.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Agent Cognitive Memory Architecture?

Noosphere Integrated Memory Architecture — Complete cognitive stack for AI agents: persistent memory, emotional intelligence, dream consolidation, hive mind, precognitive recall, and lucid moments. 4 embedding providers, LadybugDB graph backend, zero-config install. nima-core.ai

Firwat Agent Cognitive Memory Architecture op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Agent Cognitive Memory Architecture besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Agent Cognitive Memory Architecture an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/rondoflow/rondoflow/tree/master/packages/catalog/content/skills/agent-cognitive-memory-architecture an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Agent Cognitive Memory Architecture benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Agent Cognitive Memory Architecture benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Agent Cognitive Memory Architecture domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Agent Cognitive Memory Architecture gratis?

Jo. rondoflow huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇