CrewAI Integration
The crewai-dakera package provides persistent semantic memory for CrewAI agents. Each agent gets its own memory namespace with cross-agent recall capabilities.
Quick Start
pip install crewai-dakera
Requires Python ≥ 3.10 and a running Dakera server.
from crewai_dakera import DakeraStorage
storage = DakeraStorage(
api_url="http://localhost:3300",
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:3300"),
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']}")
Multi-agent shared memory
from crewai_dakera import DakeraStorage
researcher = DakeraStorage(
api_url="http://localhost:3300",
agent_id="crewai-researcher",
importance=0.8,
)
writer = DakeraStorage(
api_url="http://localhost:3300",
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 |
importance | float | 0.7 | Importance assigned to stored memories |
Configuration
export DAKERA_API_URL=http://localhost:3300
export DAKERA_API_KEY=dk-your-key