CrewAI Examples
CrewAI is a framework for building multi-agent AI systems where specialized agents collaborate to complete complex tasks. AgentVisor integrates natively with CrewAI — your crews run inside a hardened sandbox with policy enforcement, credential brokering, and durable execution via Temporal.
Prerequisites
- Anthropic API key (or another LLM endpoint) — the examples use Claude via the AgentVisor proxy
- Temporal — required for durable execution
- AgentVisor CLI —
agentvisor serve .starts the runtime
Examples
| Example | Difficulty | Key Feature |
|---|---|---|
| Research Agent | Intermediate | Multi-agent crew with MCP web fetch tools |
How It Works
CrewAI agents in AgentVisor work through the CrewAI framework provider:
- Discovery: AgentVisor detects
crewai.yamland selects the CrewAI provider automatically - Schema extraction: Agent input/output schemas are extracted from task
{placeholder}tokens - Execution:
python -m agentvisor.crewai.runnerloads and runs your crew inside the sandbox - I/O: Input JSON is written to the runner's stdin; output JSON is read from stdout
Key Concepts
| Concept | What It Is | Where You'll See It |
|---|---|---|
crewai.yaml | Discovery file pointing AgentVisor to your crew classes | All examples |
@CrewBase | Decorator for declarative crew definition | All examples |
@agent, @task, @crew | CrewAI declarative decorators | All examples |
get_mcp_tools() | AgentVisor SDK function to load MCP tools for agents | Research Agent |
{placeholder} | Input variable syntax in task descriptions | All examples |
For a deep dive into CrewAI integration — including crewai.yaml format, schema discovery, and provider options — see the CrewAI Agents Guide.
Quick Start
# Create a project from the research agent template
agentvisor template create crewai/research-agent
cd research-agent
# Run with Temporal started separately
temporal server start-dev &
agentvisor serve . --sandbox=none