cognitive-memory

cognitive-memory is a skill for Claude Code, Codex from S3YED/appie-kit. It costs 21 tokens per session (439 once invoked), scanned A, original, MIT.

Implementation and troubleshooting guidance for Cognitive Memory, also called Cognify, in Hermes Agent. Cognitive memory stores information, finds related past information, detects contradictions, and gradually forgets older information.

In plain words
What is it for?
Use it to configure the memory database, enable semantic recall, investigate installation errors, and manually retrieve files from the Cognitive Memory branch.
Why use it?
It explains how to enable and diagnose this memory system, including a known macOS Python dependency problem. It also documents how to install the system from a pull request branch if needed.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/s3yed/appie-kit/cognitive-memory
Any agent
npx skills add S3YED/appie-kit --skill cognitive-memory
Clone the repo
git clone --depth 1 https://github.com/S3YED/appie-kit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cognitive-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/s3yed/appie-kit/cognitive-memory.svg)](https://agentmods.dev/skills/s3yed/appie-kit/cognitive-memory)
Your own site
<a href="https://agentmods.dev/skills/s3yed/appie-kit/cognitive-memory"><img src="https://agentmods.dev/badge/skills/s3yed/appie-kit/cognitive-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 439 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.00439
Opus 5 $0.00010 $0.00219
Sonnet 5 $0.00004 $0.00088
Haiku 4.5 $0.00002 $0.00044

Measured 4d ago against content hash 4346b09984e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cognitive-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/autonomous-ai-agents/cognitive-memory/SKILL.md · 51 lines

What it actually says

Cognitive Memory (Cognify)

The Cognitive Memory system (PR #727, codenamed "Cognify") provides Hermes Agent with semantic recall, auto-encoding, contradiction detection, and exponential forgetting.

Architecture

  • cognitive_memory/: Core logic (store, embeddings, recall, encoding, extraction).
  • tools/cognitive_memory_tool.py: Agent-facing cognitive_recall tool.
  • Database: ~/.hermes/cognitive_memory.db (SQLite).

Setup & Configuration

Enable in ~/.hermes/config.yaml:

cognitive_memory:
  enabled: true
  embedding:
    model: "text-embedding-3-small"

Known Issues & Workarounds

Dependency: litellm

Cognify depends on litellm. On macOS systems with Homebrew Python, you may encounter pyexpat errors related to Symbol not found: _XML_SetAllocTrackerActivationThreshold.

Fix:

export DYLD_LIBRARY_PATH=/opt/homebrew/opt/expat/lib
python3.13 -m pip install litellm --break-system-packages

Manual Installation (from PR branch)

If the system is not yet merged, files must be extracted from the cognitive-memory branch:

  1. git fetch origin pull/727/head:cognitive-memory
  2. git show cognitive-memory:path/to/file > path/to/file
  3. Tools must be registered in tools/registry.py (standard auto-discovery usually handles this if cognitive_memory_tool.py is in the tools/ dir).

Tool usage: cognitive_recall

  • action='store', content='...': Saves to semantic memory.
  • action='recall', query='...': Retrieves by meaning.
  • action='forget', query='...': Deletes matching items.
  • action='status': Shows database stats.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 51 lines · 21 tokens per session scan A 4346b09984e0

Subscribe to this mod's changes

cognitive-memory is a skill published in the GitHub repository S3YED/appie-kit (7 stars, last pushed 8d ago), licensed MIT. It adds 21 tokens to every session and 439 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

remember

Recall what was actually said or decided earlier — across daily summaries, the conversation buffer, files people sent, live sessions and scheduled runs. Use whenever someone refers to prior context ("what did we decide", "last time", "as I said", "the file I sent you", "what did you tell me"), or for any synonym of…

xrgarcia/slashbin-ai-team · 85 tokens

bot-state

Show where this bot's memory actually lives — state root, summaries, attachments, outbox, buffer, sessions — and what is in each. Use when asked where files go, why a summary or attachment is missing, or to check the bot's storage layout.

xrgarcia/slashbin-ai-team · 56 tokens

knowledge

Capture and structure institutional knowledge before it is lost. Activate for: institutional knowledge, knowledge capture, knowledge transfer, knowledge base article, knowledge management, preserve knowledge, what do they know, departing employee knowledge, exit knowledge, succession knowledge, tacit knowledge…

panaversity/agentfactory-business-plugins · 107 tokens

workplace-context

Activate for: workplace memory, person brief, team profile, organisation profile, add person, add project, add terminology, four-layer memory, communication style, stakeholder brief, post-meeting memory revision, who works on, team directory, revise workplace memory, organisation context. NOT for: basic memory CRUD…

panaversity/agentfactory-business-plugins · 80 tokens

setup

Activate for: configure agentic office, install agentic office, agentic office orientation, two-plugin architecture, create work.local, initialise workplace memory, agentic office getting started, configure agents, workplace configuration. NOT for: official productivity plugin setup (use /productivity:start).

panaversity/agentfactory-business-plugins · 58 tokens

context-loader

Activate for: load context, inject context, cross-domain context, context for this endeavour, relevant background, multi-domain context, what context do I need, before I work on this, context from HR, context from finance, context from ops, combine context, cross-domain brief, what should I know before starting. NOT…

panaversity/agentfactory-business-plugins · 84 tokens