Skip to course content
Free CrewAI course

CrewAI for Multi-Agent Automation

Unit 03.03: What each process costs per run

The manager's cost is easy to overlook because it does not appear in any output a user sees.

Delegation decisions are billed

Hierarchical charges a manager call per delegation plus a final assembly call. On a four-task crew that is five extra model calls.

The code prices both processes over a thousand runs.

TASKS = 4
WORKER_TOKENS = 3_000
MANAGER_TOKENS = 1_200
RATE = 0.003 / 1000

sequential = TASKS * WORKER_TOKENS
hierarchical = TASKS * WORKER_TOKENS + (TASKS + 1) * MANAGER_TOKENS

print(f"{'process':14} {'tokens/run':>11} {'$/1k runs':>11}")
for name, tokens in [("sequential", sequential), ("hierarchical", hierarchical)]:
    print(f"{name:14} {tokens:>11,} {'$' + format(tokens * RATE * 1000, '.2f'):>11}")

overhead = (hierarchical - sequential) / sequential
print(f"\nmanager overhead: {overhead:.0%} more tokens for the same work")

# The manager is charged per delegation decision plus a final assembly call.
# On a four-task crew that is a fifth of the run's budget spent on routing you
# could often have written as an if statement.

The manager adds about half again on top of the work itself. That proportion holds roughly across crew sizes, because the manager scales with the number of tasks just as the workers do.

The comparison worth making is not sequential against hierarchical in the abstract. It is: what does the manager's error rate cost, plus its tokens, against the cost of writing the routing rule down once?

The mistake this prevents

The mistake is measuring cost only at the end of a run. The manager's spend is spread across delegation decisions that produce no visible artefact, so a run's total looks like the workers' cost unless tokens are attributed per agent - which is what Module 7 builds.

Takeaway

Hierarchical costs meaningfully more tokens for the same work, and the overhead buys routing you could often have written as a conditional. Attribute tokens per agent or the manager's share stays invisible.