Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering
This paper analyzes token consumption patterns in LLM-based multi-agent software engineering systems, revealing that the iterative code review stage and input tokens dominate resource usage, thereby highlighting that the primary costs lie in automated refinement and verification rather than initial code generation.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you hire a team of AI robots to build a piece of software for you. You might think the most expensive part of the job is the actual "building" (writing the code). However, this paper suggests that's like thinking the most expensive part of building a house is laying the bricks, when in reality, the cost comes from the endless meetings where the team argues over whether the paint color is right.
Here is a simple breakdown of what the researchers found:
The Big Idea: "Tokenomics"
The authors invented a new word, "Tokenomics," to describe the "economics" of AI. Just like a human team burns money on salaries and coffee, AI teams burn "tokens" (the currency AI uses to think and talk). Every time the AI reads a prompt or writes a line of code, it costs tokens. The researchers wanted to answer one simple question: Where exactly does this money go?
The Experiment: A Virtual Software Factory
To find out, the researchers set up a virtual software company called ChatDev. They gave this AI team 30 different jobs, ranging from simple math problems to building a chess game. They used a very smart AI model (GPT-5) to power the team.
They watched the AI team work step-by-step, tracking every single token they used, and mapped those steps to real-world software stages:
- Design: Planning what to build.
- Coding: Writing the first draft.
- Code Review: Checking the work and fixing mistakes.
- Testing: Breaking it to see if it works.
- Documentation: Writing the manual.
The Surprising Results
1. The "Code Review" is the Money Pit
You might expect the "Coding" phase to be the most expensive. It's not.
- The Analogy: Imagine a construction crew. The actual hammering of nails (Coding) is fast and cheap. But the part where the foreman and the architect walk around the site, pointing at the same wall, arguing, rewriting the plans, and checking the measurements over and over again? That's the Code Review.
- The Finding: The researchers found that 59.4% of all the tokens (money) were spent just on this "Code Review" phase. The AI agents were constantly talking to each other to refine and fix the code, which was incredibly expensive.
2. The "Listening" Tax
AI tokens are split into three types: Input (what the AI reads), Output (what the AI writes), and Reasoning (what the AI thinks).
- The Analogy: Imagine a group of people trying to solve a puzzle. They spend 2 minutes reading the instructions and looking at the pieces (Input), but only 1 minute actually placing the pieces (Output).
- The Finding: The AI spent 53.9% of its time just reading the context (Input). The researchers call this the "Communication Tax." Because the agents talk to each other in a loop, they keep passing the entire conversation and code back and forth. They are spending most of their budget just repeating what they already know, rather than creating something new.
3. Different Jobs, Different Costs
- Coding: This was actually the cheapest part. It was "Output-heavy," meaning the AI was busy writing new things.
- Documentation & Review: These were "Input-heavy." The AI had to read huge amounts of existing code to write a tiny summary or find a small bug.
The Bottom Line
The paper concludes that the high cost of using AI to build software isn't because the AI is bad at writing code. It's because the AI teams are inefficient at talking to each other.
They spend the vast majority of their resources in a loop of checking and re-checking work (Code Review) and re-reading the same context (Input). The researchers suggest that if we want to make AI software development cheaper and faster, we shouldn't focus on making the AI write code faster; we should focus on making the AI team stop arguing and re-reading so much.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.