Aletheia Core Engine
The Rust-powered temporal memory engine that runs anywhere. Self-host, embed, or integrate.
What is Aletheia Core?
Aletheia Core is a standalone Rust binary that provides persistent, temporal, multi-model memory for AI agents. It is designed to run on any machine — from a developer laptop to a production server — without requiring a cloud account, a database cluster, or an internet connection.
The engine combines four storage substrates under one roof: a vector index (HNSW via usearch), a full-text search index (BM25F on redb), a typed knowledge graph (RDF-style adjacency lists on redb), and a deterministic analytics vault for numeric metric extraction. All four are written into the same binary with zero external dependencies at runtime.
How It Works
Think of Aletheia Core as a database purpose-built for agent memory. You send it observations (facts, conversations, events) via REST endpoints, and it indexes them across all four substrates simultaneously. When you query, it performs hybrid retrieval — fusing vector similarity scores with BM25F lexical scores using Reciprocal Rank Fusion — and returns temporally-ordered, fact-consistent results.
The engine tracks time natively. Every memory carries a timestamp, and the retrieval pipeline uses temporal recency scoring to prefer recent memories while still surfacing relevant historical facts. Facts can be superseded (new truth replaces old truth), creating a continuously updated world model.
What Runs Where
Binary size
~45 MB
Single statically-linked executable, no runtime deps.
Startup time
< 1s
Cold-start from scratch, all indexes in memory.
Memory per 100K observations
~800 MB
Includes all index overhead. Configurable via retention.
Query latency
< 50ms p99
Hybrid vector + lexical search with semantic rerank.
Getting Started
- Download the binary from the GitHub releases page or build from source: cargo build --release.
- Set your API key: export ALETHEIA_API_KEY=your-secret-key.
- Choose an embedding model: export ALETHEIA_EMBEDDING_MODEL=BAAI/bge-small-en-v1.5.
- Run: ./aletheia. The engine starts on port 3000 by default.
- Ingest your first memory: POST /ingest with a JSON payload containing text, entity_id, and timestamp.
- Query: POST /query with a textual_query and limit. The engine returns ranked, temporally-scored results.
docker run -p 3000:3000 \
-e ALETHEIA_API_KEY=my-secret \
-e ALETHEIA_EMBEDDING_MODEL=BAAI/bge-small-en-v1.5 \
-v ./data:/data \
ghcr.io/sharjeel619/aletheia:latestcurl -X POST http://localhost:3000/ingest \
-H "Content-Type: application/json" \
-H "x-api-key: my-secret" \
-d '{
"entity_id": "user-1",
"memory_id": "mem-001",
"timestamp": 1700000000000,
"textual_content": "Alice enjoys hiking in the mountains on weekends.",
"kind": "Fact"
}'curl -X POST http://localhost:3000/query \
-H "Content-Type: application/json" \
-H "x-api-key: my-secret" \
-d '{
"textual_query": "What does Alice enjoy?",
"limit": 5
}'Deployment Models
- Self-hosted binary: Download, run. No cloud, no lock-in. Works on macOS, Linux, Windows.
- Docker: Official container images with pre-baked models on GitHub Container Registry.
- Embedded library: Link Aletheia as a Rust crate in your own application (coming soon).
- Platform-managed: Deploy on the Aletheia Platform for one-click provisioning, billing, and team management.