Onboarding: CrewAI
Add persistent memory to your CrewAI crews. The adapter captures task completions and injects past experience into agent backstories.
Best path: Gateway (for LLM calls) or Python SDK adapter (for task-level capture) Time: 2–5 minutes Reliability: ~99% (Gateway) / ~80% (adapter)
Option A: Gateway (Recommended for LLM calls)
If your CrewAI agents use OpenAI or another provider for LLM calls, the Gateway is the simplest integration:
from openai import OpenAI
client = OpenAI(
base_url="https://api.hippocortex.dev/v1",
api_key="hx_live_...",
default_headers={"X-LLM-API-Key": "sk-..."},
)
Every LLM call gets memory automatically. ~99% reliability with graceful fallback.
Option B: SDK Adapter (For task-level capture)
Step 1: Install
pip install hippocortex[crewai]
Step 2: Set your API key
export HIPPOCORTEX_API_KEY=hx_live_...
Get a key at dashboard.hippocortex.dev if you do not have one.
Step 3: Wrap your crew
from crewai import Agent, Task, Crew
from hippocortex.adapters import crewai as hx_crewai
# Build your crew normally
researcher = Agent(role="Researcher", ...)
writer = Agent(role="Writer", ...)
crew = Crew(agents=[researcher, writer], tasks=[...])
# Add memory with one line
crew = hx_crewai.wrap(crew, api_key="hx_live_...")
# Use exactly as before
result = crew.kickoff()
Step 4: Verify
Check dashboard.hippocortex.dev to see captured task completions, agent interactions, and crew outcomes.
What gets captured
- Task descriptions and completions
- Agent interactions during kickoff
- Tool usage within tasks
- Final crew results
Auto-compile
Knowledge compilation runs automatically after every 10 captures. You do not need to call learn() manually.