AgentLensOpen Editor →

CrewAI

How to Visualize Your CrewAI Workflow

CrewAI is a popular multi-agent orchestration framework that lets you build teams of AI agents with defined roles, tools, and handoff routes. As your crew grows more complex, understanding who hands off to whom — and why — becomes increasingly difficult from code alone. A CrewAI visualizer like AgentLens turns your agent configuration into an interactive graph, making it easy to audit routes, spot unreachable agents, and share your architecture with teammates in seconds.

What You'll Need

Step 1 — Write Your CrewAI YAML

AgentLens uses a straightforward YAML schema. A workflow file has two top-level keys: agents and routes.

Each agent requires an id (no spaces), a name, and optionally a model (common values: opus, sonnet, haiku) and a list of tools. Each route requires an id, source, target, and a label describing the handoff. An optional condition field annotates branching logic.

Here is a complete example modelling a four-agent CrewAI research pipeline:

version: "1.0.0"
name: "CrewAI Research Pipeline"
agents:
  - id: crew_manager
    name: "Crew Manager"
    model: opus
    tools: [TaskAssignment, Coordination]
    description: "Orchestrates the research crew and assigns tasks"
  - id: web_researcher
    name: "Web Researcher"
    model: sonnet
    tools: [WebSearch, BrowserTool]
    description: "Searches the web for relevant information"
  - id: data_analyst
    name: "Data Analyst"
    model: sonnet
    tools: [DataAnalysis, ChartGenerator]
    description: "Analyzes collected data and generates insights"
  - id: writer
    name: "Content Writer"
    model: haiku
    tools: [ContentGeneration]
    description: "Writes the final report from analyzed data"
routes:
  - id: r1
    source: crew_manager
    target: web_researcher
    label: "Assign research task"
  - id: r2
    source: web_researcher
    target: data_analyst
    label: "Pass raw data"
  - id: r3
    source: data_analyst
    target: writer
    label: "Pass insights"
  - id: r4
    source: writer
    target: crew_manager
    label: "Submit report"

Step 2 — Paste into AgentLens

Open AgentLens by clicking the button below. You will see a split-pane editor: paste your YAML into the left panel. The graph on the right updates automatically within 150 ms — no save button, no page reload. The layout engine arranges nodes and edges so nothing overlaps.

Step 3 — Read the Graph

Each box in the canvas represents one agent from your agents list. The arrows between boxes correspond to your routes, with the label value shown on each edge. Node color indicates the assigned model — making it easy to spot which agents use your most capable (and most expensive) models. Click any node to open the inspector panel and see the full agent configuration.

Try this CrewAI template →

Related Guides