CrewAI Persistent Memory Backend

Your CrewAI agents forget everything between runs. Dakera gives them persistent, cross-run memory with namespace isolation per crew member, hybrid retrieval, and knowledge graphs.

Why CrewAI Needs Better Memory

CrewAI crews are powerful for multi-agent workflows, but their built-in memory resets between kickoff() calls. For crews that run repeatedly — customer support, research, monitoring — this means starting from scratch every time.

Dakera provides:

How It Works

Install Dependencies

pip install dakera crewai

Create a Memory-Aware Tool

Build a CrewAI tool that stores and recalls from Dakera.

Assign to Your Crew Agents

Each agent uses the memory tool with its own namespace for isolation.

Code Example: CrewAI + Dakera

from crewai import Agent, Task, Crew
from crewai.tools import tool
from dakera import Dakera

memory = Dakera(base_url="http://localhost:3300", api_key="dk-...")

@tool("recall_memory")
def recall_memory(query: str, agent_name: str) -> str:
    """Recall relevant memories for this agent."""
    results = memory.memory.recall(
        query=query,
        namespace=agent_name,
        top_k=5
    )
    return "\n".join([r["content"] for r in results["results"]])

@tool("store_memory")
def store_memory(content: str, agent_name: str) -> str:
    """Store a new memory for this agent."""
    memory.memory.store(
        content=content,
        namespace=agent_name,
        metadata={"source": "crewai"}
    )
    return f"Memory stored for {agent_name}"

# Create agents with persistent memory
researcher = Agent(
    role="Research Analyst",
    goal="Research topics and remember findings across runs",
    tools=[recall_memory, store_memory],
    backstory="You are a researcher who builds on previous findings."
)

writer = Agent(
    role="Content Writer",
    goal="Write content informed by research history",
    tools=[recall_memory, store_memory],
    backstory="You are a writer who maintains consistent style and builds on past work."
)

# Tasks that leverage persistent memory
research_task = Task(
    description="Research {topic}. First recall what you already know, then find new information and store it.",
    agent=researcher,
    expected_output="Research summary with new findings stored to memory"
)

write_task = Task(
    description="Write about {topic} using research findings. Store the final piece to memory.",
    agent=writer,
    expected_output="Written content that builds on previous work"
)

crew = Crew(agents=[researcher, writer], tasks=[research_task, write_task])
result = crew.kickoff(inputs={"topic": "AI agent architectures"})

Multi-Agent Memory Architecture

NamespaceAccessPurpose
researcherResearcher agent onlyResearch findings, sources, hypotheses
writerWriter agent onlyStyle preferences, past outputs, editorial decisions
crew-sharedAll agents (read)Project requirements, user preferences, shared context

What Dakera Adds to CrewAI

FeatureCrewAI Built-inCrewAI + Dakera
PersistencePer-kickoff onlyPermanent, disk-backed
RetrievalBasic embeddingHybrid (HNSW + BM25 + reranking)
Agent isolationLimitedFull namespace isolation with scoped keys
Knowledge graphsNoGLiNER entity extraction + BFS traversal
Temporal queriesNoTime-aware recall
Memory decayNo6 configurable strategies
EncryptionNoAES-256-GCM at rest

Frequently Asked Questions

How do I add persistent memory to CrewAI? +

Install the Dakera Python SDK (pip install dakera) and use it within your CrewAI crew's task callbacks or custom tools. Each agent in the crew can store and recall memories from its own namespace, providing persistent context across runs.

Can different crew agents have isolated memory? +

Yes. Dakera namespaces provide complete memory isolation. Each crew agent can write to its own namespace while having read access to shared namespaces — enabling both private agent memory and shared crew knowledge.

Does crew memory persist between kickoff() calls? +

Yes. Unlike CrewAI's built-in short-term memory which resets per kickoff, Dakera persists all memories to disk with AES-256-GCM encryption. Your crew retains knowledge across every run indefinitely.

How does this compare to CrewAI's built-in memory? +

CrewAI's built-in memory provides basic short-term and long-term memory. Dakera adds hybrid retrieval (vector + BM25 + reranking), knowledge graphs, memory decay, temporal reasoning, and cross-session persistence — scoring 87.6% on the LoCoMo benchmark.

Give Your CrewAI Agents Persistent Memory

Crews that learn and improve with every run. Self-hosted, encrypted, production-ready.

Get Started