Core-Memory CLAUDE.md

Core-Memory CLAUDE.md is an instructions file for coding agents from JohnnyFiv3r/Core-Memory. It costs 2,772 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Core Memory, a causal memory layer for AI agents that combines storage, semantic search, and other adapters. It explains the project’s architecture and its preference for simple engineering solutions.

In plain words
What is it for?
Use it when exploring, documenting, planning changes to, or checking compatibility in the Core Memory repository.
Why use it?
It gives an agent the context needed to distinguish Core Memory from a basic search system, graph database, or framework and to avoid unnecessary complexity.

Instructions file

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 instructions/johnnyfiv3r/core-memory/claude-md
Clone the repo
git clone --depth 1 https://github.com/JohnnyFiv3r/Core-Memory

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 Core-Memory CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/johnnyfiv3r/core-memory/claude-md.svg)](https://agentmods.dev/instructions/johnnyfiv3r/core-memory/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/johnnyfiv3r/core-memory/claude-md"><img src="https://agentmods.dev/badge/instructions/johnnyfiv3r/core-memory/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,772 This file is loaded in full into every session.
When invoked 2,772 The same file — it is already loaded in full.
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.02772 $0.02772
Opus 5 $0.01386 $0.01386
Sonnet 5 $0.00554 $0.00554
Haiku 4.5 $0.00277 $0.00277

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

Security

Grade A, and why

Core-Memory CLAUDE.md 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 5d 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.

CLAUDE.md · 278 lines

How it starts

The opening of the file, as written. The whole thing — 278 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — Core Memory

Canonical reference: docs/architecture_overview.md Phase completion state: docs/status.md Cleanup workstream: docs/cleanup-plan.md + docs/PRD/README.md Compatibility ledger: docs/compatibility_ledger.md


What this repo is

Core Memory is the causal memory layer for AI agents. It is not a vector search engine, not a graph database, and not a framework. It composes those things as pluggable tiers. The datastore, semantic index, and all framework integrations (MCP, PydanticAI, OpenClaw, LangChain, CrewAI, SpringAI) are adapters — none are first-party.


Guiding principle — engineering simplicity

There is a real risk that Core Memory becomes over-complex at the storage and retrieval layer. The danger is not that the project reduces to "a flat memory file plus semantic search" — it is that we solve several distinct problems at once and describe all of them as "memory."

The distilled question every feature must answer:

What must remain true across agents, sessions, and changing evidence that ordinary retrieval cannot reliably preserve?

A flat file and semantic search already cover 80–90% of practical value: preserving facts, preferences, decisions, and conventions; retrieving relevant prior context; maintaining project summaries; sharing team knowledge through Git; providing provenance through links; superseding old information with simple status fields; generating a current "working memory" document. A well-maintained MEMORY.md, event log, embeddings index, and periodic synthesis pass outperforms many elaborate memory systems.

That approach breaks — and Core Memory is justified — only where memory becomes contested, temporal, distributed, and action-relevant:

  • Is this statement observed, inferred, assumed, or merely repeated?
  • Was it true then, is it true now, and what caused it to change?
  • Which source should dominate when memories conflict?
  • Is this a user belief, an organizational policy, an agent conclusion, or an external fact?
  • What did the system know at the moment a decision was made?
  • Which agent altered the shared understanding, and on what evidence?
  • Can a new agent inherit not just conclusions, but the constraints and reasoning boundaries around them?
  • Can we safely revise a belief without silently rewriting history?

Read the full file on GitHub · 278 lines

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. 5d ago First seen · 278 lines · 2,772 tokens per session scan A aaa2b67eb82e

Subscribe to this mod's changes

Core-Memory CLAUDE.md is an instructions file published in the GitHub repository JohnnyFiv3r/Core-Memory (21 stars, last pushed 29d ago), licensed Apache-2.0. It adds 2,772 tokens to every session, about $0.0139 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-30.