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.
npx agentmods add instructions/tonydzi/sqlite-graph-memory/agents-mdgit clone --depth 1 https://github.com/tonydzi/sqlite-graph-memoryWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00939 | $0.00939 |
| Opus 5 | $0.00469 | $0.00469 |
| Sonnet 5 | $0.00188 | $0.00188 |
| Haiku 4.5 | $0.00094 | $0.00094 |
Grade A, and why
sqlite-graph-memory AGENTS.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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — working in this repo
Written for AI coding agents, and equally readable by a human contributor. Short on purpose.
What this repo is
The extracted memory layer of a personal second-brain agent setup: vector retrieval for entry
points, hand-curated [[wikilinks]] for association, a cross-encoder rerank, and SQLite for the
only two things worth persisting — a per-turn ledger and A/B telemetry.
Status: pilot. It runs daily in one real setup and it is deliberately minimal. It is not a framework and should not grow into one. The interesting claim here is what it does not need: no graph database, no ETL, no entity-extraction pass.
Stack and layout
- Python + SQLite (stdlib driver).
requirements.txtcovers the embedding/rerank models only. index_notes.py— chunk + embed a markdown folder (e5-base) into a.npy/.pklindex.brain_ask.py— the recall pipeline: dense retrieve → optional--graph1-hop wikilink expansion → cross-encoder rerank → top-12.--abruns vector-only and vector+graph, diffs them, and logs the delta to SQLite.turnstate_hook.py— agent Stop-hook; appends one row per assistant turn. Zero tokens, pure stdlib.turnstate_show.pyis the read-only viewer.schema.sql— documents both tables (turns,ab_recall).examples/claude-code-stop-hook.json— how the hook gets wired.
How to verify a change
There is no test suite yet — that is a known gap with an open issue, and closing it is welcome work. Until then, a change is verified by running it and pasting the output:
python index_notes.py <folder-of-markdown> # build an index over a small sample
python brain_ask.py "<question>" --graph # recall, with graph expansion
python brain_ask.py "<question>" --ab # both arms + the logged delta
python turnstate_show.py # what the ledger captured
Use a synthetic notes folder — five or six files with a couple of [[wikilinks]] between them
is enough to show a behaviour change. Never paste real notes into an issue or PR.
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.
- 2d ago First seen · 73 lines · 939 tokens per session scan A f0bd7c7d23e5
sqlite-graph-memory AGENTS.md is an instructions file published in the GitHub repository tonydzi/sqlite-graph-memory (4 stars, last pushed 3d ago), licensed MIT. It adds 939 tokens to every session, about $0.0047 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.
Other instructions, from other repositories
causal-memory CLAUDE.md
Instructions for JingxuanC/causal-memory, covering causal memory mcp integration, causal memory integration, after acting on a decision and observing the result, when something fails unexpectedly and when a recorded lesson turns out to be wrong.
kernel-claude AGENTS.md
Instructions for ariaxhan/kernel-claude, a project described as: Claude Code learns from itself. Persistent memory, multi-agent orchestration, and a scientific experiment engine that proves which rules actually work.
aios CLAUDE.md
Instructions for sublimecoder/aios, covering claude — ai os entry point, start here, every session, scopes, strict separation (optional — off by default) and global rules (the contract).
kernel-claude CLAUDE.md
Instructions for ariaxhan/kernel-claude, a project described as: Claude Code learns from itself. Persistent memory, multi-agent orchestration, and a scientific experiment engine that proves which rules actually work.
obsidian-llm-hub AGENTS.md
Instructions for takeshy/obsidian-llm-hub, a project described as: Obsidian plugin for AI chat, workflow automation, and semantic search — supports Gemini, OpenAI, OpenRouter, Grok, Ollama, and CLI backends.
inkwell-memory CLAUDE.md
Instructions for veronchenko/inkwell-memory, covering claude.md — inkwellmemory, layout, multi-tenant mode (inkwellmultitenant=1), conventions and testing.