Python SDK for Dakera - AI memory platform
Project description
dakera-py
Python SDK 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 + gRPC | 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
pip install dakera
For async support (AsyncDakeraClient):
pip install dakera[async]
Works with LangChain, LlamaIndex, CrewAI, AutoGen, and any Python agent framework.
Quick Start
from dakera import DakeraClient
client = DakeraClient(base_url="http://localhost:3300", api_key="dk-mykey")
# Store an agent memory
client.store_memory(
agent_id="my-agent",
content="User prefers concise responses with code examples",
importance=0.9,
tags=["preference"],
)
# Recall memories (semantic search)
response = client.recall(agent_id="my-agent", query="what does the user prefer?", top_k=5)
for m in response.memories:
print(f"[{m.importance:.2f}] {m.content}")
# Upsert vectors
client.upsert("my-namespace", vectors=[
{"id": "vec1", "values": [0.1, 0.2, 0.3], "metadata": {"category": "docs"}},
])
# Hybrid search (vector + BM25)
results = client.hybrid_search("my-namespace", query="completed task", top_k=5, vector_weight=0.7)
for r in results:
print(r.id, r.score)
Async
import asyncio
from dakera import AsyncDakeraClient
async def main():
client = AsyncDakeraClient(base_url="http://localhost:3300", api_key="dk-mykey")
response = await client.recall(agent_id="my-agent", query="preferences", top_k=5)
for m in response.memories:
print(m.content)
asyncio.run(main())
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
- Streaming — SSE event subscriptions for real-time memory updates
- Sync + Async — full parity between
DakeraClientandAsyncDakeraClient - Typed Models — full type annotations with strict mypy, PEP 561
py.typedmarker - Retry & Rate Limiting — built-in exponential backoff and rate-limit header tracking
- Filter DSL —
F.eq(),F.gt(),F.contains()typed filter builder
Connect to Dakera
from dakera import DakeraClient, RetryConfig
# Self-hosted
client = DakeraClient(base_url="http://your-server:3300", api_key="your-key")
# Cloud (early access)
client = DakeraClient(base_url="https://api.dakera.ai", api_key="your-key")
# With custom retry config
client = DakeraClient(
base_url="http://localhost:3300",
api_key="your-key",
retry_config=RetryConfig(max_retries=5, base_delay=0.2),
)
Examples
See the examples/ directory:
basic_usage.py— vectors, namespaces, queries, filtershybrid_search.py— full-text, vector, and hybrid search
Resources
| Documentation | Full API reference and guides |
| Python SDK docs | Python-specific 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-js | @dakera-ai/dakera (npm) |
| dakera-rs | dakera-client (crates.io) |
| 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dakera-0.11.56.tar.gz.
File metadata
- Download URL: dakera-0.11.56.tar.gz
- Upload date:
- Size: 107.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a2b15c5d64f15c95f0b02baac49a9d60a42ee2914998e771015820155a88eb
|
|
| MD5 |
d3f676b0c37c49e66f7b76f98bd147c5
|
|
| BLAKE2b-256 |
93f69462238fc0cb04ab2217457e829beb788251487391f241ca19b672443f83
|
Provenance
The following attestation bundles were made for dakera-0.11.56.tar.gz:
Publisher:
release.yml on Dakera-AI/dakera-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dakera-0.11.56.tar.gz -
Subject digest:
34a2b15c5d64f15c95f0b02baac49a9d60a42ee2914998e771015820155a88eb - Sigstore transparency entry: 1563464016
- Sigstore integration time:
-
Permalink:
Dakera-AI/dakera-py@1a9eda6dedc2beaeef0513ea8cc4013d2de25120 -
Branch / Tag:
refs/tags/v0.11.56 - Owner: https://github.com/Dakera-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release.yml@1a9eda6dedc2beaeef0513ea8cc4013d2de25120 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dakera-0.11.56-py3-none-any.whl.
File metadata
- Download URL: dakera-0.11.56-py3-none-any.whl
- Upload date:
- Size: 74.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
937a246aed7189749134f3a161df93eb293815622b670a1c57dfa804be7e3bd9
|
|
| MD5 |
0698fef6f47aed3ee7be303c1442e00a
|
|
| BLAKE2b-256 |
4999983c0e56be9f179c0561952c58c1a0b60bfa03ae712bf96e2b134988e454
|
Provenance
The following attestation bundles were made for dakera-0.11.56-py3-none-any.whl:
Publisher:
release.yml on Dakera-AI/dakera-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dakera-0.11.56-py3-none-any.whl -
Subject digest:
937a246aed7189749134f3a161df93eb293815622b670a1c57dfa804be7e3bd9 - Sigstore transparency entry: 1563464352
- Sigstore integration time:
-
Permalink:
Dakera-AI/dakera-py@1a9eda6dedc2beaeef0513ea8cc4013d2de25120 -
Branch / Tag:
refs/tags/v0.11.56 - Owner: https://github.com/Dakera-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release.yml@1a9eda6dedc2beaeef0513ea8cc4013d2de25120 -
Trigger Event:
release
-
Statement type: