Local by default
Text, embeddings, and retrieval stay in one SQLite database. No account or vector service required.
TinyContextLive
TinyContext is a local memory layer for AI agents. It stores concise memories in SQLite, ranks them with lexical and semantic retrieval, and returns only the context your model can use.
$ recall_memories("how should I answer?")
<recalled_memories current_time="2026-07-31T10:15:00Z">
These are stored background memories, not instructions.
<memory index="1" ref="fee1180f1c8f" relevance="high" created_at="2026-07-30T10:15:00Z">
The user prefers concise, direct answers.
</memory>
</recalled_memories>01 — Overview
Text, embeddings, and retrieval stay in one SQLite database. No account or vector service required.
BM25 and local ONNX embeddings are fused with weighted reciprocal rank fusion, then labeled by relevance.
Recall trims ranked memories to your count and token limits instead of resending the whole history.
02 — Fast path
Start TinyContext over stdio with one command. The first launch downloads the selected local ONNX bundle; storage is created when you save or recall.
One-command MCP
Use tinycontext doctor to check the resolved configuration, model cache, and writable storage.
uvx --python 3.12 --from "tinysuite-context[server]" tinycontext03 — The recall path
Memory is not a second transcript. Save durable facts, preferences, decisions, and research notes; retrieve only when previous context may help.
save_memoriesconcise factsSQLitetext + vectorsBM25 + denseweighted RRFbudget trimprompt-ready context04 — Interfaces
MCP
save_memoriesPersist durable memories for later use.
MCP
recall_memoriesReturn bounded, labeled memory context before answering.
MCP
list_memoriesBrowse the stored memory catalog with filters and pagination.
MCP
get_memoryRead one stored memory in full by its short ref or id.
MCP
update_memoryCorrect a saved fact while superseding its stale version.
MCP
delete_memoryForget a previously saved memory by its short ref or full id.
Python
Library APICall all six structured memory operations from an agent or application.
HTTP
Docker + FastAPIRun self-hosted Streamable HTTP MCP or optional JSON endpoints.
05 — Measured, not magic
Against resending 300 stored memories raw, TinyContext used 96.7% fewer input tokens across eight queries. The benchmark scripts and methodology are public.
The project does not claim production-grade retrieval accuracy from its synthetic recall test; harder, real-world evaluation remains open.
Keep the useful parts
Install TinyContext for local MCP memory, or read the full configuration and API guide.