Skip to content

CrewAI

AgentV provides native support for CrewAI, allowing you to evaluate role-based agent orchestration and collaborative task execution.

Wrap your CrewAI agents in a standard HTTP endpoint.

from crewai import Crew, Agent, Task
from fastapi import FastAPI
app = FastAPI()
@app.post("/execute_task")
async def execute(request: dict):
# Map the task_description to a CrewAI Task
# researcher = Agent(role='Researcher', ...)
# task = Task(description=request["task_description"], agent=researcher)
# crew = Crew(agents=[researcher], tasks=[task])
# result = crew.kickoff()
return {"action": "final_answer", "summary": str(result)}

Use the crewai protocol to connect the harness to your agent service.

Terminal window
agentv run \
--path scenarios/loan_scenario.json \
--protocol crewai \
--agent crewai://localhost:8000/execute_task \
--agent-name "CrewAI-Tech-Support"

The crewai:// protocol utilizes the Behavioral DNA bus to track task hand-offs between individual agents in the crew, providing a clear audit trail of who did what and why.

Terminal window
# View the agent hand-offs in the Visual Debugger
agentv console