The local database for AI agents.
Read any file. Search every workspace. Remember long-term context.
OpenDB · Website · Agent protocol · PyPI
pip install open-db[cli]
opendb index ./my_workspace
opendb serve-mcpOpenDB gives any MCP-compatible agent a private, local database for files, search, and memory. It can read PDFs, Word documents, spreadsheets, presentations, code, text, and images; search across workspaces; store and recall durable memories; and switch projects at runtime.
Agents waste too much context and time writing one-off parsing scripts, scanning entire folders, and re-learning facts from previous sessions. OpenDB makes the simple path fast:
- Local-first: SQLite by default, Postgres when shared access matters.
- Zero embeddings required: SQLite FTS5 and Postgres
tsvectorbefore vector infrastructure. - MCP native: twelve tools for read, search, glob, memory, and workspace switching.
- Long-term memory: semantic facts, dated episodes, reusable procedures, pinned context, and recency-aware recall.
- File-native: structured output for pages, rows, slides, code lines, and document chunks.
| Metric | OpenDB |
|---|---|
| LongMemEval_S R@5 | 98.5% |
| LongMemEval_S R@10 | 99.1% |
| Median memory recall | 3.0 ms |
| Token savings vs command parsing | 55-73% |
| Embedding calls for retrieval | 0 |
Full methodology lives in the benchmark report.
OpenDB is designed around a simple protocol:
- Check local files and memories before external search.
- Read the smallest useful page, row, slide, or line range.
- Store durable memories carefully, with provenance and type.
- Keep the runtime boring: deterministic indexing, timestamps, FTS, and small schemas.
Start with AGENTS.md or the fuller agent protocol.
| Repository | Description |
|---|---|
| openDB | Core database, MCP server, CLI, parsers, memory service, and benchmarks. |
| official-web | Static official website for OpenDB. |
| .github | Organization profile and shared GitHub metadata. |
OpenDB stays useful without an embedding API. Prefer deterministic indexing, full-text search, timestamps, provenance, and small schemas before adding new infrastructure.