CrewAI + Awareness Memory
Give your CrewAI agents persistent, cross-session memory. Crew members remember past decisions, code changes, and conversations across task executions.
Installation
pip install awareness-memory-cloud[crewai]
Quick Start
from memory_cloud import MemoryCloudClient
from memory_cloud.integrations.crewai import MemoryCloudCrewAI
import openai
# Local mode (no API key needed)
client = MemoryCloudClient(mode="local")
mc = MemoryCloudCrewAI(client=client) # memory_id auto-managed
# Cloud mode (team collaboration, semantic search, multi-device sync)
client = MemoryCloudClient(base_url="https://awareness.market/api/v1", api_key="YOUR_API_KEY")
mc = MemoryCloudCrewAI(client=client, memory_id="memory_123")
# Wrap the LLM client for auto-recall + auto-capture
mc.wrap_llm(openai.OpenAI())
# Or get tool definitions for agent config
tools = mc.build_tools()
Integration Patterns
Pattern 1: Interceptor (Zero-Code Memory)
mc.wrap_llm(openai.OpenAI())
# All LLM calls within your CrewAI tasks now have cross-session memory
Pattern 2: Explicit Tools
# Register memory tools for crew agents
tools = mc.build_tools()
# Use in CrewAI agent config
agent = Agent(
role="Senior Developer",
tools=tools,
# ...
)
Pattern 3: Direct API
# Recall past context
result = mc.awareness_recall("What happened in the last sprint?")
# Record a decision
mc.awareness_record("Decided to use Redis for caching instead of Memcached")
Use Cases
- Crews that remember across task executions — knowledge persists between runs
- Shared memory between crew members — use
user_id/agent_roleto scope per member - Long-running crews — accumulate knowledge over days or weeks
- Cross-crew handoffs — new crews pick up where previous ones left off
Multi-User / Multi-Role
# Each crew member can have its own role
mc_dev = MemoryCloudCrewAI(
client=client, memory_id="memory_123",
default_metadata={"agent_role": "developer", "user_id": "alice"}
)
mc_pm = MemoryCloudCrewAI(
client=client, memory_id="memory_123",
default_metadata={"agent_role": "project_manager", "user_id": "bob"}
)
Example
See examples/e2e_crewai_cloud.py in the SDK repository for a complete end-to-end example.
Next Steps
- SDK Usage Guide — Interceptor pattern and full API reference
- LangChain Integration — Use with LangChain
- PraisonAI Integration — Use with PraisonAI
- AutoGen Integration — Use with AutoGen