amdb (Agent Memory Database)
The Open Standard for AI Context Memory
Why amdb?
amdb is a local-first code search and indexing engine designed to bridge the gap between AI Agents (like Cursor, Claude) and your codebase's deep context.
Traditional text search misses the intent; pure vector search misses the structure. amdb understands both. It combines semantic understanding with structural graph analysis to provide the "complete picture" of your project to AI models, all while running locally on your machine with zero external API calls.
Whether you are debugging complex authentication flows or refactoring legacy code, amdb ensures your AI agent knows exactly what you are looking for and where it fits.
Key Features
1. 🧠 Hybrid Search (v0.1.0)
The core of amdb is its ability to fuse Deterministic Call Graphs with Semantic Vector Search.
- Local Embedding: Powered by Rust's
fastembedandort, embeddings are generated locally. No data leaves your machine. - Context-Aware: Searching for "login logic" determines the intent and finds
auth_userbased on code behavior, even if the word "login" is never mentioned. - Graph-Enhanced: It doesn't just find the function; it understands caller/callee relationships to provide the full execution context.
2. 🛡️ Security Scanner
amdb treats security as a first-class citizen.
- Real-time Detection: Automatically scans for hardcoded secrets (AWS keys, Google API keys, JWT tokens) during indexing.
- DevSecOps Ready: Prevents security accidents by warning you before sensitive data enters your context memory.
3. ⚡ High Performance
Built with Rust, amdb is designed for speed and efficiency.
- Optimized Storage: Uses
Bincodeserialization for lightning-fast vector loading (introduced in v0.2.0). - Metadata Management: Leverages SQLite for robust and efficient metadata querying.
- Zero-Latency: engineered to serve context to agents in milliseconds.
4. 🛠️ Developer Experience
- Smart Watcher: Real-time file change detection triggers automatic re-indexing.
- Polyglot Support: Native AST parsing and docstring understanding for Rust, Python, TypeScript, and JavaScript.
- Configurable: Full control via
amdb.toml.
Installation & Getting Started
Prerequisites
- Rust v1.75 or higher
Installation
You can install amdb directly from the source:
Quick Start
-
Initialize amdb in your project root:
This analyzes your project structure and downloads the necessary embedding models.
-
Start the Daemon:
This starts the background server on port 3000 (default).
-
Search:
Configuration
Control amdb's behavior using amdb.toml in your project root:
= 3000
= [
"target",
"node_modules",
"dist",
".git",
"secret_folder"
]
API Usage
amdb exposes a REST API for easy integration with your AI tools or IDE plugins.
Search Endpoint
Response Example:
Roadmap
- v0.2.0: Improved Semantic Ranking & Caching
- v0.3.0:
llms.txtGenerator – Automatically generate context files for LLMs.