mem for AI
Memory for any agent.
The engine behind memfor. Deterministic recall over files you own.
01
Write once, recall anywhere. Any agent can ask.
agentware gives AI agents a long-term memory and a self-learning work loop. Knowledge is stored as plain Markdown and JSON in a directory the user owns, and it runs on top of an agent runtime you already use, Claude Code or OpenAI Codex, instead of replacing it.
Where is my knowledge base stored, and can I move it to another machine?
- 1 docs/loop.md › Three Phases
- 2 README.md › Reliable Agentic Loops with persistent memory
- 3 docs/GUIDE.md › A typical session
- 4 docs/GUIDE.md › Syncing the knowledge base over git (team mode)
- 5 docs/GUIDE.md › You own your data
02
Deterministic by design. Same files, same ranking.
Recall is BM25 ranking with a token budget, and there is no LLM in the toolkit. For a fixed knowledge base and date, the ranking is identical across runs, so you can benchmark it and diff it.
How do I share one knowledge base with my team?
- 1 docs/GUIDE.md › Syncing the knowledge base over git (team mode)
- 2 docs/loop.md › Three Phases
- 3 docs/GUIDE.md › A typical session
How do I share one knowledge base with my team?
- 1 docs/GUIDE.md › Syncing the knowledge base over git (team mode)
- 2 docs/loop.md › Three Phases
- 3 docs/GUIDE.md › A typical session
The recorder ran this query twice at a pinned commit and fails unless both runs match.
03
Works over MCP and the CLI. No account, no server to host.
Ask from the command line, or serve the knowledge base to any MCP client. The MCP server is read-only: only the toolkit writes the index.
scripts/agentware recall "How do I share one knowledge base with my team?" --format json1 docs/GUIDE.md › Syncing the knowledge base over git (team mode)2 docs/loop.md › Three Phases3 docs/GUIDE.md › A typical sessionscripts/agentware mcp serve# serves your knowledge base to MCP clients over stdio; it can't write Everything in the engine. Each with its status.
-
CLI recall
AvailableReturns ranked entries within a token budget, as text or JSON.
scripts/agentware recall "<query>" --format json -
Read-only MCP server
AvailableServes your knowledge base over stdio to MCP clients. It can't write.
scripts/agentware mcp serve -
Claude Code and Codex
AvailableThe plan, execute, verify, learn loop runs on the agent you already use.
-
Semantic recall (Mode B)
Opt-inBM25 plus a pinned, on-device embedding model.
-
Local models (LM Studio)
ExperimentalRun the execute phase on a local model while planning stays on your cloud runtime.
-
Plain files, one writer.
AvailableKnowledge is plain Markdown and JSON in a directory you own. A deterministic toolkit is the only writer of the index. Licence: Apache-2.0.
Specifications. Measured, with the test conditions.
| Parameter | Value | Test conditions | Evidence |
|---|---|---|---|
| Recall@5 | 0.9140 measured | LongMemEval-S (cleaned), 470 answerable questions, session granularity, BM25, top 5, default mode | Ledger row 86 · 42d58a0 |
| nDCG@5 | 0.8831 measured | Same run | Same row |
| MRR | 0.9104 measured | Same run | Same row |
| Determinism | Identical rankings and metrics | Fixed knowledge base and --as-of date; latency excluded | test_ |
| Recall defaults | top-k 5, token budget 1,500 | n/a | recall --help at 3c25cdd |
| Third-party Python packages | 0 (default mode) | Standard library only. Still needs bash, jq, git and Python 3. Mode B adds one pinned package. | test_ |
| LLM calls in the memory path (init, learn, index, recall, query, mcp) | 0 | Your agent is an LLM; the memory path isn't. The review gate and the opt-in checkup run your agent's CLI. | README ("zero LLM in the memory path") and source |
| Vetted skills shipped | 14 | catalog/skills.json at 3c25cdd | Catalog |
| Latency | See the benchmark ledger | Hardware not yet recorded | /benchmarks#latency |
Give your agent a memory.
git clone https://github.com/r5rana/agentware.git
cd agentware
git checkout 3c25cdd
claude "hi" git clone https://github.com/r5rana/agentware.git
cd agentware
git checkout 3c25cdd
codex "hi" This installs agentware, the open-source engine behind memfor. No tagged release yet. These commands pin commit 3c25cdd.
Apache-2.0. No memfor account. Needs macOS or Linux (Windows via WSL), git, Python 3, bash, jq, and Claude Code or Codex.