Persistent, queryable memory for coding agents: one binary, one SQLite file in your repo, no server.
Your coding agent forgets everything when the session ends. Decisions made, dead ends explored, conventions discovered — all re-derived (or contradicted) next time, burning context on rediscovery. agent-store gives agents persistent memory that lives inside the repo, as a CLI any agent can already use:
$ agent-store create decision area=http choice=reqwest reason="no openssl dep"
w4054s
# ...weeks and many sessions later, before touching HTTP code:
$ agent-store find kind=decision area=http
w4054s decision area=http choice=reqwest reason='no openssl dep'

It is deliberately not a "memory platform":
- No server, no daemon, no config — state is a single SQLite file in your project's
.agent-store/(gitignored, yours tosqlite3open). It belongs to that checkout on that machine: agit worktree, a fresh clone or a cloud agent's sandbox starts without it unless you link or seed it. Concurrent agents in one checkout are safe — WAL mode, serialized transactional writes — and nothing is locked in: the store is a plain SQLite file, and records export as JSONL (record fields only: links and IDs are not carried, see JSON output). - No embeddings, no API keys, no LLM in the binary — exact, structured recall (
find kind=task status=pending), not similarity search. - No schema — a record is a
kindplus free-formkey=valuefields; links, mutation hooks, and schedules on top when you want them. - Agent-native without a protocol — works with Claude Code, Codex, Cursor, and anything that can run a shell command.
initinstalls skills and anAGENTS.md/CLAUDE.mdblock so agents discover the store on their own, andagent-store ctxprints a byte-capped summary that starts the next session from memory instead of a blank slate.
It's just as usable by humans as a terse project notebook: task tracker, decision log, handoff memory.
Install¶
Most installs are done by a coding agent, not a human. Tell yours:
Install agent-store from https://github.com/av/agent-store and initialize it in this repo.
Or hand it (or run yourself) this block — non-interactive, from the project root, no sudo needed:
curl -fsSL https://raw.githubusercontent.com/av/agent-store/master/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
agent-store --version
touch AGENTS.md CLAUDE.md # init adds its block only to files that exist
agent-store init
The script picks the build for your OS and architecture (Linux x86_64/arm64, macOS x86_64/arm64), verifies its SHA-256 checksum, and installs to ~/.local/bin without root or prompts; any failure exits nonzero. The export PATH line covers the current shell; the installer prints the line for your shell profile when ~/.local/bin isn't on your PATH. touch makes sure AGENTS.md and CLAUDE.md exist (existing files keep their content): init adds its instructions block only to existing files, and that block is what reliably points Claude Code (CLAUDE.md) and Codex (AGENTS.md) at the store (details). Installer options: Install details.
Other ways to install¶
For humans installing by hand, or platforms the script doesn't cover:
- Homebrew (macOS and Linux; includes man page and completions):
brew install av/tap/agent-store. - Nix (flakes; includes man page and completions):
nix profile install github:av/agent-store, ornix run github:av/agent-storeto try it without installing.nix developgives a dev shell with the Rust toolchain, clippy, and rustfmt. - cargo-binstall (prebuilt, no compile):
cargo binstall --git https://github.com/av/agent-store agent-store-cli(the crate isagent-store-cli; the binary is stillagent-store) - Build from source (needs Rust 1.78+ and a C compiler — the bundled SQLite compiles from source, so
apt install gccfirst on a fresh machine):cargo install --git https://github.com/av/agent-store - Prebuilt binaries for Linux (x86_64 and arm64, each gnu/musl), macOS (x86_64/arm64), and Windows (x86_64) from GitHub Releases — each with a SHA-256 checksum and a signed build-provenance attestation. The Linux arm64 build covers Graviton and Ampere servers, Raspberry Pi OS 64-bit, and arm64 containers on Apple Silicon.
Windows: the install script is unix-only. Use cargo binstall or cargo install above, or the PowerShell download-and-verify block in Install details. Hooks and schedules need a bash on PATH (Git Bash or WSL); everything else works natively.
Manual checksum/attestation verification, shell completions, the man page, and upgrade/uninstall paths: Install details.
Quickstart¶
$ touch AGENTS.md CLAUDE.md
$ agent-store init
Initialized .agent-store/
Installed .agents/skills/agent-store/SKILL.md
Installed .agents/skills/agent-store-patterns/SKILL.md
Installed .agents/skills/agent-store-pipelines/SKILL.md
Installed .claude/skills/agent-store/SKILL.md
Installed .claude/skills/agent-store-patterns/SKILL.md
Installed .claude/skills/agent-store-pipelines/SKILL.md
Added instructions block to AGENTS.md
Added instructions block to CLAUDE.md
$ agent-store create task title="ship v0.1" status=pending
4juoi3
$ agent-store set 4juoi3 status=done
Updated 4juoi3
$ agent-store ctx
Quick Context
Records: 1
Record kinds:
task: 1
fields: status, title
status: done=1
Hooks: 0
Schedules: none
Latest activity: 2026-10-23T05:34:08.084Z
Recent records:
4juoi3 task status=done title='ship v0.1'
init creates .agent-store/ (and gitignores it), installs the builtin skills into .agents/skills/ and .claude/skills/, and adds managed agent-store instructions to AGENTS.md and CLAUDE.md (only to files that already exist, hence the touch). ctx is what an agent runs at session start: the whole store, summarized, in one block that never outgrows its budget.
IDs are short and prefix-resolvable: any unambiguous prefix works wherever a command takes an ID (get, set, unset, rm, link, ...).
How agents use it¶
After init (with AGENTS.md and CLAUDE.md in place), the agent finds the store itself: the skills teach it the commands, and the instructions block points it at ctx. That makes the store available, not mandatory; a SessionStart hook and a few lines of convention make it a habit (init does not write these; see the tutorial below). As it works, the agent records what matters:
# Session 1 — the reqwest decision from the top of this page, plus the follow-up work:
$ agent-store create decision area=http choice=reqwest reason="no openssl dep"
w4054s
$ agent-store create task title="Migrate HTTP client to reqwest" status=pending
ff14fh
$ agent-store link ff14fh implements w4054s
Linked ff14fh implements w4054s
The session ends. The context window is gone; the records are not. Days later, the next session opens with ctx:
Quick Context
Records: 2
Record kinds:
decision: 1
fields: area, choice, reason
task: 1
fields: status, title
status: pending=1
Links: 1
implements: 1
...
Recent records:
ff14fh task status=pending title='Migrate HTTP client to reqwest'
w4054s decision area=http choice=reqwest reason='no openssl dep'
The agent sees the pending migration and the reasoning behind it without being told, finishes the work, and runs agent-store set ff14fh status=done. No re-discovery, no contradicted decisions.
For the full walkthrough — Claude Code setup, SessionStart hook that injects ctx automatically, CLAUDE.md conventions — see the Claude Code tutorial.
Why not just...?¶
You already have something that sort of works. Here's an honest comparison:
- ...a
MEMORY.md/TODO.md? The better tool while the list is short and a human co-edits it. It stops working when the agent re-reads a growing file every turn: notes can't answerfind kind=task status=pending --sort created_at --limit 5, and they grow whilectxstays a fixed size.jq -R -c '{kind:"note",fields:{text:.}}' MEMORY.md | agent-store create --stdinimports the file you already have, one record per line (a structured variant keeps headings queryable). - ..."my agent greps the repo"? Grep finds what the code says, not what you decided — the rejected alternative, the dead end that cost an afternoon, the convention that isn't written anywhere. Those live only in the transcript, and the transcript is gone. (The store itself is grep-friendly: one record per line.)
- ...a vector-memory MCP server? Different problem: semantic similarity ("notes vaguely about auth") with embeddings and a server per harness. This is exact, deterministic recall (
find kind=decision area=auth) from a plain CLI. For fuzzy search use a vector store; most agent memory is "what's pending and what did we decide". - ...git history? Commits record what changed, not the decisions, findings, and open tasks around the change — and querying prose with
git log --grepis archaeology, not recall. The store is untouched by branch switches; agit worktreegets its own store unless you link it.
The FAQ has the longer versions, including why not raw sqlite3 + jq.
Commands¶
| Command | What it does |
|---|---|
init |
Initialize the store, install skills, wire up AGENTS.md/CLAUDE.md |
create (cr) |
Create a record; --stdin bulk-imports JSONL |
find (ls) |
Query records; --sort, --desc, --limit, --count, --timestamps |
get |
Print one record by ID prefix |
set / unset |
Update or remove fields atomically |
rm |
Delete a record |
link / unlink / links |
Manage directional, named links between records |
ctx (context) |
Compact Quick Context summary, capped at 8192 bytes |
hook |
add/ls/rm/runs — run a bash command on matching mutations; inspect captured runs |
schedule |
add one-shot (at) or recurring (every) commands; tick runs what's due; enable wires up crontab; plus ls/rm/runs/disable |
Everywhere: --json gives structured output on any command, any unambiguous ID prefix resolves, and agent-store <command> --help has the full details.
Query language¶
find and hook filters share a small query language — comparisons (=, !=, <, <=, >, >=, ~= substring, link.out/link.in) joined with and, or, not, and parentheses:
agent-store find 'kind=task and (status=pending or status=blocked) and not owner=bot'
agent-store find 'created_at>2026-01-01' # built-in timestamps
Value types, quoting, precedence, and link predicates: Query language.
Hooks¶
Hooks run a bash command whenever matching records mutate — useful for notifications, mirroring state into files, or nudging an agent.

agent-store hook add set kind=task -- 'notify-send "task $AGENT_STORE_ID: $AGENT_STORE_NEW_VALUE"'
agent-store hook runs # inspect recent runs and captured output
Hooks fire on create, set, unset, rm, link, and unlink; the command gets the affected record on stdin plus AGENT_STORE_* environment variables, with a 30-second timeout. Full event/variable reference and limits: Hooks.
Schedules¶
Schedules run a bash command on a time basis — one-shot reminders or recurring maintenance — with the same execution model and limits as hooks:
agent-store schedule add at 5m -- 'echo reminder' # one-shot (also absolute timestamps)
agent-store schedule add every 1h kind=task -- 'notify.sh' # recurring, once per matching record
Nothing runs in the background on its own: schedule tick executes what's due, and schedule enable sets up a crontab entry that ticks every minute. Details: Schedules.
JSON output¶
Every command supports --json for structured output, and record exports round-trip — create --stdin bulk-imports the same JSONL that find --json | jq -c '.records[]' emits (kinds and fields; imported records get new IDs and links are not carried):
$ agent-store find kind=task --json
{"records":[{"created_at":"2026-10-23T05:34:06.775Z","fields":{"status":"done","title":"ship v0.1"},"id":"4juoi3","kind":"task","updated_at":"2026-10-23T05:34:08.084Z"}]}
Scripting behaves the way a shell expects: results on stdout, errors on stderr, nonzero exit on failure (a get on a missing ID exits 1; an empty find still exits 0 with {"records":[]}). Envelope shapes, import validation, and the linked-store caveat: JSON output and import.
Skills¶
init installs three agent-facing skill docs (agent-store, agent-store-patterns, agent-store-pipelines) into .agents/skills/ and .claude/skills/, so coding agents pick up the store without prompting. They double as concise usage docs for humans. Details: Skills and agent integration, Claude Code, Codex and Cursor.
Documentation¶
- Install details — verification, completions, upgrade, uninstall
- Claude Code, Codex and Cursor — what
initwrites and which agent reads what - Claude Code tutorial — setup, conventions,
SessionStarthook, two-session example - Concepts — the mental model, with real examples
- Query language — operators, types, quoting, links, sorting
- Hooks — events, variables, limits, runs
- Schedules — one-shot and recurring commands, crontab
- JSON output and import —
--jsonshapes,create --stdin, recipes - Skills and agent integration — what agents are taught
- FAQ — alternatives, data format, worktrees, concurrency, privacy, limits
- Examples — seven runnable scripts
Stability¶
agent-store is v0.1.x — early, but the data layer is the part treated as stable. The store is a plain SQLite file with a versioned, checksummed schema; upgrades apply migrations automatically on open, so existing records, links, and hook history survive new releases (covered by tests that open old-schema stores). Pre-1.0, CLI flags, output wording, and --json shapes may still change between minor versions — pin a version if you script against exact output, and check the CHANGELOG before upgrading. Worst case, nothing is locked in: .agent-store/store.sqlite is a normal SQLite file with every record, link and hook run, and find --json exports the records as JSONL that create --stdin re-imports (without links, under new IDs).
Contributing¶
Issues and PRs welcome — see CONTRIBUTING.md for dev setup and workflow.
License¶
MIT. Third-party components bundled into release binaries (including SQLite) are listed in THIRD-PARTY-LICENSES.md.