Back to Blog
·6 min read·case study

Monitoring Multi-Agent Workflows: A CrewAI Cost Breakdown

How to track costs across a CrewAI multi-agent workflow where a researcher, analyst, and writer collaborate on a single task.

Multi-agent frameworks like CrewAI orchestrate multiple specialized agents on a single task. A "research report" workflow might involve a researcher agent, an analyst agent, and a writer agent — each making dozens of LLM calls. Tracking costs across this pipeline requires per-agent and per-workflow attribution.

Example Workflow

Consider a content creation pipeline with three agents:

  1. Researcher — Searches the web, reads documents, extracts key facts (Sonnet + Browserbase)
  2. Analyst — Synthesizes research into insights, identifies patterns (Opus)
  3. Writer — Produces the final report from the analyst's output (Sonnet)

Instrumenting CrewAI with AgentBurn

Register each CrewAI agent as an AgentBurn agent, and tag all cost events with a shared workflowId:

workflow_id = f"report-{uuid4()}"

# After each LLM call in the researcher agent:
ingest_event(
    agent_id="crewai-researcher",
    provider="anthropic",
    model="claude-sonnet-4-20250514",
    cost_usd=calculated_cost,
    workflow_id=workflow_id
)

# Browserbase costs for web research:
ingest_event(
    agent_id="crewai-researcher",
    provider="browserbase",
    operation="page_load",
    cost_usd=0.01,
    workflow_id=workflow_id
)

What a Dashboard Might Reveal

In a pipeline like this, based on current model pricing, per-report costs might break down roughly as:

  • Researcher: Majority of cost — multiple LLM calls plus page loads per report
  • Analyst: Moderate cost — fewer calls but larger context windows with a more expensive model
  • Writer: Lowest cost — typically just a couple of Sonnet calls

Often the research phase is the biggest cost driver — not because of LLM costs alone, but because of tool calls like web browsing. Caching previously visited URLs could significantly reduce researcher costs.

Workflow-Level Insights

AgentBurn's workflowId grouping lets you see the total cost of a business outcome (one report), not just individual API calls. This is the metric that matters for pricing decisions — if a report costs $0.53 to generate, you can price your service accordingly.

crewaimulti-agentworkflowcost-breakdown

Start tracking your AI agent costs

Open-source. Self-hosted. Free forever for the core engine.

Related Articles