CrewAI integration
crewai-dakera (0.3.0) gives CrewAI agents persistent semantic memory on a Dakera server. DakeraStorage saves and searches one agent's memories (one agent_id per instance); session, knowledge-graph, entity-extraction and namespace helpers are included. This page is for Python developers building crews with CrewAI.
Quick start
pip install crewai-dakera
Requires Python ≥ 3.10, dakera>=0.13.1 (installed automatically) and a running Dakera server. Works with Dakera server v0.12.0 and v0.11.108.
from crewai_dakera import DakeraStorage
storage = DakeraStorage(
api_url="http://localhost:3000",
api_key="dk-mykey",
agent_id="crewai-researcher",
)
storage.save("User prefers executive summary format.")
results = storage.search("formatting preferences")
Features
- DakeraStorage — persistent memory backend for CrewAI agents
- DakeraSessionManager — session lifecycle for crew runs
- DakeraKnowledgeGraph — entity-relationship operations
- DakeraEntityExtractor — automatic entity extraction
- DakeraNamespaceManager — multi-tenant namespace isolation
Examples
Basic agent memory
import os
from crewai_dakera import DakeraStorage
storage = DakeraStorage(
api_url=os.environ.get("DAKERA_API_URL", "http://localhost:3000"),
api_key=os.environ.get("DAKERA_API_KEY", ""),
agent_id="crewai-researcher",
search_k=3,
importance=0.8,
)
storage.save("Completed market analysis: AI memory market growing 40% YoY.")
storage.save("Key competitor identified: Mem0 — open-source, Python-first.")
results = storage.search("market research findings")
for r in results:
print(f" [{r['score']:.3f}] {r['content']}")
Several agents, separate memories
from crewai_dakera import DakeraStorage
researcher = DakeraStorage(
api_url="http://localhost:3000",
agent_id="crewai-researcher",
importance=0.8,
)
writer = DakeraStorage(
api_url="http://localhost:3000",
agent_id="crewai-writer",
importance=0.8,
)
# Each agent stores to its own namespace
researcher.save("Python is the most popular language for AI/ML.")
writer.save("Blog outline: Top Languages for AI Development")
# Each agent recalls its own memories
results = researcher.search("AI languages")
API reference
DakeraStorage options
| Parameter | Type | Default | Description |
|---|---|---|---|
api_url | str | — | Dakera server URL |
api_key | str | "" | API key |
agent_id | str | — | Agent identifier for memory namespacing |
search_k | int | 5 | Results to return per search |
min_importance | float | 0.0 | Minimum importance of returned memories |
importance | float | 0.7 | Importance assigned to stored memories |
Configuration
The package does not read environment variables. To keep the URL and key out of source code, read them yourself:
import os
from crewai_dakera import DakeraStorage
storage = DakeraStorage(
api_url=os.environ["DAKERA_API_URL"],
api_key=os.environ.get("DAKERA_API_KEY", ""),
agent_id="crewai-researcher",
)
Links
CrewAI + Dakera in production
Persistent memory for CrewAI agents on your own Dakera server, with no separate vector store or embedding API.
Other Python integrations: LangChain · LlamaIndex · AutoGen · TealTiger (Governance)