.amdb
The Open Standard for AI Context Memory
๐ The Missing Pillar
Is your AI guessing?
Most AI tools (RAG, Vector Embeddings) rely on "fuzzy" matchingโfinding text that looks similar. This is great for natural language, but terrible for code. Code is precise; dependencies are DAGs, not probability distributions.
.amdb (Agent Memory Database) introduces a Deterministic Context Layer:
- Traditional RAG: "Find code that looks like 'authentication'" โ Returns random specialized auth logic mixed with comments.
- .amdb Protocol: "Find the function calling
User::loginand all its implementations" โ Returns the exact Call Graph and Symbol references.
We bridge the gap between Fuzzy Search and Code Structure, giving your AI the "God-mode" accuracy it lacks.
๐๏ธ Architecture
.amdb runs as a high-performance local daemon, turning your codebase into a queryable knowledge graph.
graph LR
FS[File System] -->|Notify| Watcher
Watcher -->|Diff| Parser[Tree-sitter Parser]
Parser -->|AST| Engine
Engine -->|Call Graph| DB[(.amdb/store.db)]
DB -->|Query| MCPServer[MCP Server]
MCPServer -->|JSON-RPC| Client[Cursor / Claude / Copilot]
- File Detection:
notifywatches for real-time changes. - Parsing:
tree-sitterextracts symbols, ASTs, and imports (Rust, Python, JS/TS supported). - DB Storage: Relationships are stored in a local SQLite graph (
.amdb/store.db). - MCP Server: Exposes data via the Model Context Protocol to any agent.
โก Usage Workflow
1. Initialization
Turn any folder into a context-aware project:
2. Start the Daemon
Launch the background server to keep context in sync and serve the MCP API:
Note: The server binds to
0.0.0.0:3000by default.
3. Check Status
Verify that your codebase is indexed and the protocol is active:
๐ฌ How to use with AI (Crucial)
Since standard AI models rely on embeddings, you must explicitly instruct them to use .amdb for structural accuracy.
๐ Session Start Prompt
Copy and paste this prompt at the beginning of your Cursor/Claude session:
"I am using
.amdbin this project. It maintains a deterministic database of symbols and call graphs at.amdb/store.db.Rule 1: When I ask about code structure (e.g., 'Who calls this?', 'Where is X defined?'), you MUST prioritize the
.amdbdata over your internal embedding search. Rule 2: If connected via MCP, use theget_contexttool first. Rule 3: Trust the.amdbrelationships table as the source of truth for dependencies."
๐ Integration
Cursor
Cursor can natively talk to local servers. Add .amdb as a context source (feature coming soon) or use our generated .cursorrules to guide the model.
Claude Desktop (MCP)
Add the following to your claude_desktop_config.json to enable .amdb as a tool:
Now you can ask Claude: "What is the relationship between User and Session structs in this project?"
๐บ๏ธ Roadmap
- Phase 1: Local Context Map (Complete)
- Real-time file watching, Tree-sitter parsing, SQLite Graph storage.
- Phase 2: Semantic Vector Sync (In Progress)
- Hybrid search combining Deterministic Graph + Semantic Embeddings.
๐ License
This project is licensed under the MIT License.