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

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

ParameterTypeDefaultDescription
api_urlstrDakera server URL
api_keystr""API key
agent_idstrAgent identifier for memory namespacing
search_kint5Results to return per search
importancefloat0.7Importance assigned to stored memories

Configuration

export DAKERA_API_URL=http://localhost:3300
export DAKERA_API_KEY=dk-your-key

Links