A time-aware, schema-rewritable, WASM-powered memory store for autonomous agents
LLMDB combines the speed of LMDB with bitemporal versioning, embedded WebAssembly execution, and LLM-friendly APIs to create the perfect memory store for AI agents. It's designed from the ground up to be reshaped by LLMs while maintaining sub-millisecond performance.
- β‘ 60Β΅s p99 read latency on modern SSDs with zero-copy cursors
- π Full bitemporal support - query any point in valid and transaction time
- π§© Schema evolution - LLMs can reshape data structures on the fly
- π Code at data - Run WASM functions inside the database with fuel limits
- π€ LLM-aware - Special endpoints for AI agents to inspect and migrate schemas
- π¦ Tiny footprint - β€70KB static library, 5MB RSS startup
| Metric | Target | Notes |
|---|---|---|
| Read latency (p99) | < 60 Β΅s | 256-byte value on NVMe |
| Write throughput | 250 MB/s | Single writer |
| WASM map throughput | β₯ 8M pages/s | 32-byte keys |
| Startup memory | β€ 5 MB RSS | Minimal footprint |
| Max database size | 128 TB | 64-bit address space |
Perfect memory system for autonomous coding agents with temporal tracking:
- Code Analysis Evolution: Store understanding of codebases with correction trails
- Decision History: Track agent reasoning, changes, and rollbacks with full audit trails
- Context Preservation: Maintain conversation state across sessions with temporal accuracy
- Knowledge Corrections: Handle updates to agent understanding with "what did I know when" queries
- Development Workflow Memory: Track project progress, decisions, and state changes over time
# Store agent decision with temporal context
agent_key = Key(partition=0, user_key="agent:decision:refactor_auth", valid_from=timestamp)
db.put(agent_key, {
"decision": "Extract auth logic to separate service",
"reasoning": "Improves testability and separation of concerns",
"confidence": 0.85,
"context": {"files_analyzed": 15, "test_coverage": 0.73}
})
# Query historical agent knowledge for debugging
past_understanding = db.get_versions("agent:knowledge:auth_patterns")Stream inserts with WASM edge-derivation jobs running at data-latency speeds.
Store embeddings alongside knowledge graph triples in a single, queryable file.
All data and code stays on device with no cloud dependencies.
ββββββββββββββ WASM βββββββββββββββββ
β Client / βββββββββΆβ Exec Sandbox β
β LLM β βββββ²ββββββ¬ββββββ
βββββββ²βββββββ β β
βgRPC/HTTP β β
βββββββ΄βββββββ βββββ΄ββββββ΄ββββββ
β Query & β index β Schema + Meta β
β Mutation βββββββββΆβ Catalog β
β Engine β βββββ²ββββββββββββ
βββββββ²βββββββ β
βCursors β
βββββββ΄βββββββββββββββ β
β MVCC Page Cache β β
βββββββ²βββββββββββββββ β
βMMAP I/O β
βββββββ΄βββββββββββββββ
β Single-file B+Treeβ
ββββββββββββββββββββββ
# Clone the repository
git clone https://github.com/yourusername/llmdb.git
cd llmdb
# Run development setup
./scripts/dev_setup.sh # Installs Python toolchain and liblmdb
# Install with server support
pip install -e ".[server]" # Or use your favorite PEP 517 frontendfrom llmdb import KV
from llmdb.temporal_key import Key
# Open a database
db = KV("./my_data.db")
# Write with automatic bitemporal versioning
key = Key(partition=0, user_key="user:123", valid_from=1234567890)
db.put(key, {"name": "Alice", "score": 100})
# Read latest value
value = db.get(key)
# Query historical data (coming in Phase 4)
# historical = db.as_of_valid(timestamp).get(key)# Start the FastAPI server
./scripts/run_server.sh &
# Test with the example client
python examples/simple_client.py- Architecture Overview - System design and components
- AI Agent Memory Guide - Using LLMDB as agent memory store
- Bitemporal Model - Understanding temporal queries
- API Reference - Complete API documentation
- LQL Query Language - SQL-like queries with temporal extensions
- WASM Modules - Writing embedded functions
- Performance Guide - Benchmarks and optimization
- Phase 1: Repository Bootstrap
- Phase 2: Core KV Store with bitemporal keys
- Phase 3: Write Path & Recovery (In Progress)
- Phase 4: Temporal Query Operators
- Phase 5: WASM Execution Engine
- Phase 6: LQL Parser & gRPC Layer
- Phase 7: Data Model Adaptors (Graph, Document, Vector)
- Phase 8: Replication & Security
- Phase 9: Production Hardening
See TASKS.md for detailed progress.
We welcome contributions from both humans and AI agents!
- Fork the repository and create a feature branch
- Follow the coding standards in AGENTS.md
- Run
pre-commit run --all-filesbefore committing - Ensure
pytestpasses all tests - Submit a pull request with a clear description
- SPECS - Complete functional and technical specification
- ARCHITECTURE.md - Detailed component design
- SECURITY.md - Security model and best practices
- CHANGELOG.md - Version history
MIT License - see LICENSE for details.
Built with β€οΈ for the age of autonomous agents.