FAQ¶
Honest answers to the questions people actually ask.
Why not just a TODO.md / markdown notes?¶
Markdown works fine until you need to query it. agent-store gives you
structured records (kind + typed fields) that you can filter, sort, and
count: find kind=task status=pending --sort created_at --limit 5 instead of
an agent re-reading and re-parsing a growing file on every turn. Records also
carry timestamps and links, and mutations can fire hooks — none of which a
flat file gives you.
If your project's memory needs are "a short list a human also edits," a
markdown file is genuinely the better tool. agent-store earns its keep when
records accumulate past what an agent should re-read wholesale, when several
kinds of memory coexist (tasks, decisions, findings, handoffs), or when you
want machine-checkable state instead of prose. There is also a ctx payoff:
the summary stays the same byte-capped size no matter how many records
accumulate, where a notes file only grows.
You don't have to start over, either — one line imports the file you already have:
jq -R -c '{kind:"note",fields:{text:.}}' MEMORY.md | agent-store create --stdin
examples/import-memory-md.sh shows a structured variant that keeps your headings queryable.
Why not raw sqlite3 + jq?¶
You can — the store is SQLite, and you're welcome to open it (see below). What the CLI adds on top:
- A query language agents reliably produce:
find "severity=high or priority<2"instead of SQL over a normalized field table with five typed value columns. - Typed comparisons (numbers sort as numbers,
1 < 2 < 10; dates and timestamps compare on one timeline) without you writing theCASEexpressions. - Short human-friendly IDs with prefix resolution, links between records,
hooks on mutations, and a
ctxsummary. - Stable
--jsonenvelopes and JSONL import (create --stdin) so jq stays in the pipeline where it belongs.
Why not a vector DB or a "memory MCP server"?¶
Different problem. agent-store is exact, structured recall — "what tasks are
pending," "what did we decide about auth" — not semantic similarity search.
There are no embeddings, no relevance ranking, and no LLM anywhere in the
binary. If you need "find notes vaguely about X," a vector store is the right
tool; here you'd query kind=note area=auth or title~=auth (substring,
case-insensitive) and get deterministic results.
Compared to an MCP memory server: agent-store is a plain CLI, so it works with any agent that can run shell commands — no server process, no protocol integration, no per-harness plugin. The trade-off is real: there's no push notification to the agent and no semantic layer. Discovery happens through installed skills and instruction blocks (see below), not tool schemas.
Why not just git history?¶
Commits record what changed; most of what an agent needs to remember is
what happened around the change — the rejected alternative, the finding
that cost an afternoon, the task that's still open. Some of that belongs in
a commit message, and you should keep writing good ones, but querying prose
with git log --grep is archaeology, not recall: no fields, no typed
comparisons, no "what's still pending."
The two also don't interfere: init gitignores .agent-store/, so the
store sits next to the repo and is untouched by branch switches, rebases,
and resets. One consequence to know: a git worktree is a separate
directory, so it gets (and finds) its own store — the store discovery walks
up directories, not git metadata. See the next answer for sharing one.
Does the store follow worktrees, fresh clones, CI or cloud agents?¶
No. The store is a gitignored file in one checkout on one machine, and nothing syncs it anywhere.
-
A
git worktreeis a separate directory, so it starts without a store (no agent-store found). To share the main checkout's store, link it into the worktree, and keep the link out ofgit status(the.agent-store/line in.gitignoreonly matches a directory):ln -s /path/to/main-checkout/.agent-store .agent-store echo .agent-store >> "$(git rev-parse --git-common-dir)/info/exclude"Both checkouts then read and write the same SQLite file, with the same concurrency guarantees as agents in one directory.
-
A fresh clone, CI job, devcontainer or cloud sandbox (Codex cloud tasks, Cursor background agents, Claude Code on the web) starts from the repository, so it has no store, and anything recorded there is lost with the sandbox. To seed one, export the records to a file you commit or copy in, and import them there:
agent-store find --json | jq -c '.records[]' > memory.jsonl # in the clone or sandbox: agent-store init && agent-store create --stdin < memory.jsonlImported records keep their kind and fields but get new IDs, and links are not carried (see JSON output and import).
Where is my data? Can I inspect it?¶
In .agent-store/store.sqlite at your project root — one ordinary SQLite
database file in WAL mode. It is yours:
sqlite3 .agent-store/store.sqlite '.tables'
# hook_runs hooks record_fields record_links records schedule_runs schedules schema_migrations store_events
sqlite3 .agent-store/store.sqlite 'SELECT * FROM records LIMIT 5;'
The schema is straightforward: records (id, kind, timestamps),
record_fields (key, raw value, plus typed columns for text/number/
timestamp/boolean), record_links, hooks/hook_runs, and
schedules/schedule_runs. Nothing is encoded
or compressed; field values are stored as the text you typed.
Greppable: the default output is one line per record (id kind key=value ...),
so agent-store find | grep works, and find --json | jq gives you the full
structure. For portability, export everything as JSONL with
agent-store find --json | jq -c '.records[]' and re-import into any store
with create --stdin (see JSON output and import).
init adds .agent-store/ to your .gitignore by default — the store is
local working memory, not a committed artifact. Delete the directory and the
store is gone; there is no other state.
How do agents actually discover and use it?¶
agent-store init does three things: creates .agent-store/, installs
skill files under both .agents/skills/ and .claude/skills/ (usage guide,
workflow patterns, shell pipelines), and appends a short marked instruction
block to AGENTS.md/CLAUDE.md telling agents to run agent-store ctx and
read the skills. Re-running init is safe: it adds whatever is missing,
refreshes skill files and blocks you have not edited, and never touches your
records or files you edited.
At session start, agent-store ctx prints a compact summary (kinds, field
inventory, recent records, last activity) capped at 8192 bytes, so an agent
gets oriented in one command instead of exploring. Any subdirectory works —
the CLI walks up parent directories to find .agent-store/.
There is no daemon and no MCP server; if your agent can run shell commands, it can use the store. If it can't, agent-store won't work for you.
What happens when multiple agents write at once?¶
It works, within SQLite's model. Concretely:
- The database runs in WAL mode, so readers never block on a writer.
- Writers serialize; a 5-second busy timeout plus bounded open-retry with backoff absorbs contention instead of erroring immediately.
- Mutations are single transactions; hooks run after commit and hook runs are persisted separately, so a slow or failing hook can't hold the write lock or roll back a committed mutation.
This is tested, not aspirational: the repository's
concurrency spec
pins a suite of
concurrent-race facts (parallel mutations with hooks, readers during
mutation storms, hook add/rm churn, ID-prefix resolution races), each backed
by a runnable stress test. A quick sanity check — 20 parallel create
processes — completes with 20 records and zero errors.
Honest limits: writes are serialized, not parallel — this is one SQLite file, not a database server. Sustained heavy write contention (many agents in tight loops) will queue behind the 5s busy timeout, and a writer that waits longer than that gets a busy error. There is no multi-writer merge, no networked access, and no cross-machine sync; if two machines need the same store, that's outside scope (export/import via JSONL is the workaround).
Is my data sent anywhere?¶
No. There is no network code and no network-capable dependency. The complete
dependency list (Cargo.toml): libc, rand, rusqlite (with bundled
SQLite), serde_json. No HTTP client, no telemetry, no analytics, no phoning
home. Everything happens in one local file. The one caveat: hooks run
arbitrary shell commands you register, so a hook can do whatever the shell
can — including network calls. Nothing does so by default; hook ls shows
exactly what's registered.
What are the limits? How fast is it?¶
There is no application-level cap on record count, field count, or value
size; the practical limits are SQLite's (a text value can be up to ~1 GB,
databases scale to terabytes). Two deliberate caps exist: ctx text output
is truncated at 8192 bytes (ctx --json is uncapped), and hook and schedule
stdout/stderr capture is truncated at 8192 bytes per stream (hook and
schedule commands also have a 30-second timeout).
Measured on an ordinary dev machine (release build, warm cache). At 1,000
records: importing them via create --stdin takes ~40 ms, a typed find
returns in under 10 ms, ctx is a few milliseconds, and the store file is
~0.5 MB. At 10,000 records: the bulk import takes ~1.6 s, a typed
three-clause find (kind=task and priority<3 and status=pending) returns
in ~200 ms, ctx stays ~50 ms (its output is byte-capped regardless of
store size), and the file is ~7 MB. Field lookups are index-backed
(per-type indexes on record_fields), so queries stay fast well past the
record counts an agent memory store realistically sees. It is not built or
benchmarked for millions of records — if that's your workload, use a real
database.
Why Rust? Why a single binary?¶
Because the whole pitch is "works anywhere your agent has a shell":
- One static binary (~3.4 MB, SQLite bundled) — no Python environment, no Node runtime, no shared-library version roulette on the machines and containers agents actually run in.
- Startup is effectively free (single-digit milliseconds), which matters when an agent shells out dozens of times per session.
rusqlitewith the bundled feature compiles SQLite in, so behavior is identical across platforms and there's no system-SQLite version drift.
Rust specifically buys the static-linking story and the safety guarantees
for the concurrency handling above; there is no deeper ideology to it. If
you'd rather not run a prebuilt binary, cargo build --release from source
is the entire build process.