50 releases (9 breaking)
| new 0.11.57 | May 22, 2026 |
|---|---|
| 0.11.36 | Apr 26, 2026 |
| 0.9.9 | Mar 31, 2026 |
#328 in Database interfaces
Used in dakera-cli
430KB
8K
SLoC
dakera-rs
Rust client for Dakera AI — the memory engine for AI agents
Why Dakera?
| Dakera | Others | |
|---|---|---|
| LoCoMo accuracy | 87.8% (1,540 Q standard eval) | 60–92% |
| Deployment | Single binary, Docker one-liner | External vector DB + embedding service required |
| Embeddings | Built-in — no OpenAI key needed | Requires external embedding API |
| Search modes | Vector · BM25 · Hybrid · Knowledge Graph | Usually one or two |
| Transport | HTTP (reqwest) + gRPC (tonic), zero-copy | HTTP only |
→ Full benchmark results · dakera.ai
Run Dakera
docker run -d \
--name dakera \
-p 3300:3300 \
-e DAKERA_ROOT_API_KEY=dk-mykey \
ghcr.io/dakera-ai/dakera:latest
curl http://localhost:3300/health # → {"status":"ok"}
For persistent storage with Docker Compose:
curl -sSfL https://raw.githubusercontent.com/Dakera-AI/dakera-deploy/main/docker-compose.yml \
-o docker-compose.yml
DAKERA_API_KEY=dk-mykey docker compose up -d
Full deployment guide (Docker Compose, Kubernetes, Helm): dakera-deploy
Install
# Cargo.toml
[dependencies]
dakera-client = "0.11"
tokio = { version = "1", features = ["full"] }
serde_json = "1"
Feature flags:
| Feature | Default | Description |
|---|---|---|
http-client |
✅ | Async HTTP via reqwest |
grpc |
— | gRPC transport with connection pooling via tonic |
full |
— | Both HTTP and gRPC |
For gRPC (lower latency in high-throughput workloads):
dakera-client = { version = "0.11", features = ["grpc"] }
Quick Start
use dakera_client::{DakeraClient, StoreMemoryRequest, RecallRequest};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = DakeraClient::builder("http://localhost:3300")
.api_key("dk-mykey")
.build()?;
// Store an agent memory
let mem = client.store_memory(StoreMemoryRequest {
agent_id: "my-agent".to_string(),
content: "User prefers concise responses with code examples".to_string(),
importance: Some(0.9),
..Default::default()
}).await?;
println!("Stored: {}", mem.memory_id);
// Recall memories (semantic search)
let response = client.recall(RecallRequest {
agent_id: "my-agent".to_string(),
query: "what does the user prefer?".to_string(),
top_k: Some(5),
..Default::default()
}).await?;
for m in &response.memories {
println!("[{:.2}] {}", m.importance, m.content);
}
// Upsert vectors
client.upsert("my-namespace", dakera_client::UpsertRequest {
vectors: vec![dakera_client::Vector {
id: "vec1".to_string(),
values: vec![0.1, 0.2, 0.3],
metadata: None,
}],
}).await?;
// Hybrid search (vector + BM25)
let results = client.hybrid_search("my-namespace", "completed task", 5).await?;
for r in &results.results {
println!("{}: {:.3}", r.id, r.score);
}
Ok(())
}
Features
- Agent Memory — store, recall, search, and forget memories with importance scoring
- Sessions — group memories by conversation with auto-consolidation on session end
- Knowledge Graph — traverse memory relationships, find paths, export graphs
- Vector Search — ANN queries with metadata filters and batch operations
- Full-Text Search — BM25 ranking with stemming and stop-word filtering
- Hybrid Search — combine vector similarity with keyword matching
- Text Auto-Embedding — server-side embedding generation (no local model needed)
- Namespaces — isolated vector stores per project, tenant, or use case
- Feedback Loop — upvote/downvote/flag memories to improve recall quality
- Entity Extraction — GLiNER NER for automatic entity detection
- SSE Streaming — Server-sent event subscriptions with auto-reconnect
- Dual Transport — HTTP (default) and gRPC with connection pooling
- Typed Filters —
filter::eq(),filter::gt(),filter::contains()DSL From<T>for FusionStrategy — ergonomic enum conversions, idiomatic Rust API- Retry & Rate Limiting — built-in exponential backoff and rate-limit header tracking
- Builder Pattern — fluent
DakeraClientBuilderfor configuration
Connect to Dakera
use dakera_client::DakeraClient;
// Self-hosted
let client = DakeraClient::builder("http://your-server:3300")
.api_key("your-key")
.build()?;
// Cloud (early access)
let client = DakeraClient::builder("http://localhost:3300")
.api_key("your-key")
.build()?;
// With custom timeouts
let client = DakeraClient::builder("http://localhost:3300")
.api_key("your-key")
.timeout_secs(60)
.max_retries(5)
.build()?;
Examples
See the examples/ directory:
basic.rs— vectors, namespaces, queries, filtersmemory.rs— store/recall memories, sessions, agent statsadvanced.rs— text embedding, full-text, hybrid search, filter DSL
Run examples with:
cargo run --example basic
cargo run --example memory
cargo run --example advanced
Resources
| Documentation | Full API reference and guides |
| Rust SDK docs | docs.rs API reference |
| Benchmark | LoCoMo evaluation results |
| dakera.ai | Website and early access |
| GitHub Org | All public repos |
| dakera-deploy | Self-hosting guide |
Other SDKs
| SDK | Package |
|---|---|
| dakera-py | dakera (PyPI) |
| dakera-js | @dakera-ai/dakera (npm) |
| dakera-go | github.com/dakera-ai/dakera-go |
| dakera-cli | CLI tool |
| dakera-mcp | MCP server for Claude/Cursor |
dakera.ai · Docs · Benchmark · Request Early Access
Built with Rust. Single binary. Zero external dependencies.
Dependencies
~6–15MB
~193K SLoC