CrewAI's Default Context Model Can Multiply Token Costs Up to 15x, Audit Finds
A cost audit of CrewAI, one of GitHub's most popular AI agent orchestration frameworks, has revealed a quadratic token cost problem in its default context-passing behavior. When no explicit context is set, CrewAI automatically feeds every prior task's full output into each subsequent agent's prompt, causing token counts to grow exponentially rather than linearly. A five-agent crew with modest 500-token outputs already consumes 9,000 input tokens against a naive estimate of 4,000, and costs can climb 8–15x when memory, delegation, and verbose mode are enabled. The issue stems from the framework's _get_context method, which performs no summarization, truncation, or deduplication before injecting accumulated outputs into new prompts. Developers can mitigate the problem by explicitly defining context lists for each task, limiting which prior outputs each agent actually receives.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in