Listed from the MCP registry; nobody on Odel publishes it.
Local agent memory: archive anything, then search it and read back exact originals.
Runs on your machine from its package; the steps are below.
At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
docker run -i --rm ghcr.io/tobiaslogic/stratavell:0.1.2
MCP client config
{
"mcpServers": {
"stratavell": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/tobiaslogic/stratavell:0.1.2"
]
}
}
}Compress context. Preserve knowledge.
Stratavell is a provider-agnostic context management engine for long-running LLM agents, written in Go. It keeps every message, tool call and tool output in an immutable local journal. Each model request is built as a view of that journal:
Summaries are produced in the background, and the request is laid out so that prompt caches keep hitting.
It runs fully locally as a Go library, an HTTP API over TCP or a Unix socket, an MCP server and a single static executable. It needs no external database, no embedding model and no API key.
Research preview (v0.1.2). The results below come from generated, fixed-trajectory workloads, reconstructed baselines and a simulated prompt-cache model. Real autonomous coding-task performance has not been evaluated yet. See limitations.
flowchart LR
host["Agent host<br/>(your loop, framework or tool)"]
subgraph interfaces["Provider-neutral interfaces"]
sdk["Go SDK"]
http["HTTP API v1<br/>TCP or Unix socket"]
mcp["MCP server<br/>(stdio)"]
end
subgraph engine["Stratavell engine"]
journal[("Immutable journal<br/>SQLite WAL, SHA-256 per event,<br/>content-addressed blobs")]
reduce["Deterministic reductions<br/>externalize large outputs,<br/>dedupe, epoch masking"]
compact["Background compaction<br/>progressive, async,<br/>generation CAS publish"]
dag["Summary DAG<br/>leaves point at exact<br/>event ranges"]
task["Task state<br/>pinned instructions,<br/>failures, decisions,<br/>provenance"]
index["Indexed retrieval<br/>FTS5 BM25, symbols,<br/>paths, exact ids"]
assemble["Cache-aware assembly<br/>stable prefix, snapshot plus delta,<br/>budget and emergency ladder"]
end
providers["LLM providers<br/>Anthropic, OpenAI-compatible, Ollama"]
host --> sdk & http & mcp
sdk & http & mcp --> journal
journal --> reduce --> assemble
journal --> compact --> dag --> assemble
journal --> task --> assemble
journal --> index
index -- "memory tools" --> assemble
assemble -- "rendered request" --> host
host --> providers
The engine never calls the primary model. The host sends the assembled request to its provider and appends the response. The model can recover anything archived through memory tools (memory_search, memory_expand, memory_get_event and others) that the engine executes. More in docs/architecture.md and ADR 0001.
Benchmark conditions
The comparison below is against component-matched baselines: asynchronous and synchronous progressive summarization (similar to APEC), each given the same retrieval tools and automatic evidence injection that Stratavell has.
| strategy | requests that fit | simulated input cost per session | facts recoverable | standing rules visible | foreground summarization wait |
|---|---|---|---|---|---|
| async progressive summaries + retrieval | 100% | $12.88 ± 0.44 | 97.2% | 7.3% | 0 s |
| sync progressive summaries + retrieval | 100% | $11.36 ± 0.55 | 97.2% | 7.7% | 320 s |
| Stratavell | 100% | $6.43 ± 0.20 | 100% | 100% | 0 s |
How to read the table:
Other results:
QA with a real model: in a pre-registered question-answering run (Claude Haiku 5.5 reader, 33 questions, 1 seed), the strict-correct counts were a tie:
QA after the provenance fix: the same pre-registered test with three free readers from NVIDIA, Baidu and Recursive gave 33, 33 and 32 of 33 for those three strategies, identical for every reader. The one miss traced to the rule-check error noted above: asked again with the corrected check (protocol v4.2), every reader answered it, so all three strategies scored 33 of 33. That is a tie at the test's ceiling.
200k window (400 turns, 3 seeds):
Engine latency: the measurements below used one 8-core laptop CPU, synchronous=FULL, pure-Go SQLite.
| operation | measurement |
|---|---|
| assembly, 45k-token context | 1.35 ms mean |
| engine time per benchmark turn | about 2 to 3 ms p95, varying between runs |
| search, 3.4k indexed chunks | p95 3.1 ms (v0.1.0: 10.6 ms) |
| search, 13.2k chunks | p95 6.5 ms (v0.1.0: 35.8 ms) |
| appending a small event | 0.56 ms mean (fsync on every commit) |
Tested window sizes: 64k and 200k tokens.
Search latency comes from one generated 1,200-turn session and eight queries, with v0.1.0 and v0.1.1 measured on the same machine in the same session. It is not yet a broad query benchmark.
Real autonomous coding-task success has not been evaluated. Instruction compliance was not measured either, only instruction visibility.
The full method is in docs/benchmarks.md:
Every run, including failed and superseded ones, is logged in docs/experiments.md.
Install the engine one of these ways:
| method | command |
|---|---|
| Go 1.26.11 or newer | go install github.com/TobiasLogic/stratavell/cmd/stratavell@latest |
| release binary | download an archive for Linux, macOS or Windows from releases and check it against SHA256SUMS |
| Docker | docker pull ghcr.io/tobiaslogic/stratavell (static, non-root, about 25 MB) |
Go releases before 1.26.11 have standard-library vulnerabilities that affect the HTTP server. The engine needs no cgo and no C toolchain.
Client libraries for the HTTP API, with no dependencies:
pip install stratavell
npm install stratavell
Or build from a clone:
git clone https://github.com/TobiasLogic/stratavell
cd stratavell
go build -o bin/stratavell ./cmd/stratavell
Start a local server. It listens on 127.0.0.1:7077; a non-loopback address requires a token.
stratavell serve --db demo.db
In another terminal, record a user message and a tool exchange, then assemble a request rendered for the Anthropic Messages API:
API=http://127.0.0.1:7077/v1/sessions
curl -s -X POST $API -d '{"id":"demo"}'
curl -s -X POST $API/demo/agents -d '{"id":"main"}'
curl -s -X POST $API/demo/agents/main/events -d '{"messages":[
{"role":"user","parts":[{"type":"text","text":"Fix the failing test. Never edit vendor/."}]},
{"role":"assistant","parts":[{"type":"tool_call","tool_call_id":"c1","tool_name":"bash","input":{"command":"go test ./..."}}]},
{"role":"tool","parts":[{"type":"tool_result","tool_call_id":"c1","tool_name":"bash","text":"--- FAIL: TestParse\n parse_test.go:42: expected 3, got 4\nFAIL","is_error":true}]}]}'
curl -s -X POST $API/demo/agents/main/assemble \
-d '{"format":"anthropic","model":"claude-sonnet-5-5","max_tokens":4096,"include_memory_tools":true}'
curl -s "$API/demo/agents/main/search?q=parse_test"
curl -s $API/demo/agents/main/task-state
The assemble response holds request, a body ready to send to the provider, plus token counts and a report of what the engine did. Send it, report the provider's usage to .../usage, append the assistant's reply and any tool results, and repeat.
Every integration follows that loop; docs/integration.md describes it step by step.
e, err := engine.Open(ctx, engine.Options{Path: "memory.db", Summarizer: summarize.Extractive{}})
if err != nil {
log.Fatal(err)
}
defer e.Close()
sess, _ := e.OpenSession(ctx, "task-42", engine.SessionConfig{})
agent, _ := sess.Agent(ctx, "main")
agent.Append(ctx, msg.Text(msg.RoleUser, "Fix the flaky test. Never edit vendor/."))
cx, err := agent.Assemble(ctx, engine.AssembleRequest{System: "You are a coding agent.", IncludeMemoryTools: true})
if err != nil {
log.Fatal(err)
}
req, err := anthropic.Render(cx, anthropic.Options{Model: "claude-sonnet-5-5", MaxTokens: 8192})
agentloop.Step runs one full turn against a model client: assemble, call, record usage, append, execute tools. A complete runnable program is in examples/go.
| mode | transport | what the engine controls |
|---|---|---|
| Go SDK | in process | the full context: compaction, masking, budget, cache layout, task state, retrieval |
| HTTP API | TCP (--addr) | the same, from any language; versioned under /v1, specified in docs/openapi.yaml |
| Unix socket | --socket path (mode 0600) | the same as HTTP, for local processes, without a TCP port |
| MCP server | stdio (stratavell mcp) | passive memory only: archiving and retrieval tools |
The first three are full inference-loop integration. The host routes every model request through assemble, and the engine decides what the model sees, within a token budget it enforces.
MCP alone does not replace a host's own compaction. An MCP server cannot see or rewrite the host's context. In passive mode the model can archive material with memory_archive and retrieve exact originals, but the host still decides what stays in its window. Use full integration when you control the agent loop. Use MCP for hosts you cannot change.
An MCP host configuration looks like this, with the binary:
{
"mcpServers": {
"stratavell": {
"command": "stratavell",
"args": ["mcp", "--db", "/path/to/stratavell/memory.db", "--session", "my-project"]
}
}
}
Or with Docker, keeping the archive in a named volume:
{
"mcpServers": {
"stratavell": {
"command": "docker",
"args": ["run", "-i", "--rm", "-v", "stratavell-data:/data", "-e", "STRATAVELL_SESSION=my-project", "ghcr.io/tobiaslogic/stratavell"]
}
}
}
The server is listed in the MCP Registry as io.github.TobiasLogic/stratavell.
| adapter | API | how it is tested |
|---|---|---|
adapters/anthropic | Anthropic Messages API: tool use, cache_control breakpoints, thinking blocks, token counting | unit tests against the documented request shape; not yet exercised against the live API |
adapters/openai | OpenAI-compatible chat completions | unit tests; used live through OpenRouter for the real-model benchmark runs |
adapters/ollama | Ollama native /api/chat with an explicit num_ctx | one live local smoke call; no automated tests |
Any of them can also serve as the background summarizer. The default summarizer is extractive and calls no model.
The Python and TypeScript examples use the stratavell client packages in clients/. All four examples run against a local server in CI (scripts/examples-smoke.sh):
| example | transport |
|---|---|
| Go | in-process SDK |
| Python | HTTP over a Unix socket, standard library only |
| TypeScript | HTTP with fetch, Node 22 or newer |
| Rust | HTTP with ureq |
| document | contents |
|---|---|
| docs/integration.md | the per-turn loop, full versus passive integration, provider formats, subagents, custom components |
| docs/openapi.yaml | HTTP API reference |
| docs/configuration.md | every policy field and its default |
| docs/operations.md | running, environment variables, inspection, deletion, backup, migration from palimpsest |
| docs/stability.md | which interfaces are intended to stay stable and which are experimental |
| docs/architecture.md | data model, invariants, rendering, assembly, retrieval, multi-agent model |
| docs/schema.md | storage schema and integrity checks |
| docs/benchmarks.md | benchmark method and every result table |
| docs/limitations.md | known limitations |
| docs/roadmap.md | planned work and the next evaluation phase |
Stratavell builds on published work and open-source code; docs/research/ records what was taken from each and what was not:
No third-party code or prompts were copied.
Read docs/limitations.md before relying on the numbers. In short:
Details are in docs/roadmap.md.
Apache License 2.0. See LICENSE, NOTICE and THIRD_PARTY_NOTICES.md. Contributions are welcome; see CONTRIBUTING.md. Report vulnerabilities privately as described in SECURITY.md. Changes are listed in CHANGELOG.md.