CrewAI + ODEI: Governed Multi-Agent Teams
CrewAI is great for orchestrating multi-agent workflows. ODEI adds constitutional governance: validation before every consequential action.
The Integration
from crewai.tools import BaseTool
import requests
class ConstitutionalGuardrail(BaseTool):
name: str = "constitutional_guardrail"
description: str = "Validate action before executing. Call before consequential operations."
def _run(self, action: str) -> str:
r = requests.post(
"https://api.odei.ai/api/v2/guardrail/check",
json={"action": action, "severity": "medium"}
).json()
return f"Verdict: {r["verdict"]}. {r.get("reasoning","")[:200]}"
guardrail = ConstitutionalGuardrail()
# Give to agents that need safety validation
safe_agent = Agent(
role="Financial Agent",
goal="Execute financial transactions safely",
tools=[guardrail, ...other_tools]
)
Multi-Agent World Model
All agents in a crew can read the shared world model:
from crewai.tools import BaseTool
class WorldModelQuery(BaseTool):
name: str = "world_model_query"
description: str = "Query shared knowledge graph for team context."
def _run(self, query: str) -> str:
r = requests.post(
"https://api.odei.ai/api/v2/world-model/query",
json={"queryType": "search", "searchTerm": query}
).json()
return str(r)
Why This Matters
Multi-agent systems amplify both capabilities AND risks. Agent A might approve something Agent B executes harmfully. Constitutional validation at each step prevents cascade failures.
Production
ODEI processes on Virtuals ACP with 92% success rate since January 2026.
- API: https://api.odei.ai/integrate/
- MCP:
npx @odei/mcp-server - Examples: https://github.com/odei-ai/examples
Top comments (0)