Skip to content
Back to Blog
TechnologyArticle

AI Agents and Unit Economics: Measuring the True Return of Automation in Operations

Between 2023 and 2025, almost all large and medium-sized Brazilian companies experienced the phase of touristic fascination with generative Artificial Intelligence. Innovation committees were created, dozens of proofs of concept (PoCs) were presented on big screens, and practically every software product gained a little star icon promising an intelligent assistant.

In 2026, however, the conversation in the office of the Chief Financial Officer (CFO) and the Chief Technology Officer (CTO) changed its tone. With the opportunity cost of capital in Brazil running at high levels, no one approves million-dollar budgets anymore just because a technology is fascinating. The question now is surgical: what is the real unit economics of this AI agent in production?

Understanding the mathematics behind autonomous agent-based systems is what separates engineering teams that are generating historical productivity leverage from those that are merely swapping payroll for out-of-control dollar-denominated API invoices.

1. From "Cost per Token" to "Cost per Resolved Task"

The first mistake made by those starting to scale AI agents in operations (whether in customer service, legal triage, financial reconciliation, credit analysis, or code automation) is looking only at the price per million tokens table published by model providers.

An isolated token seems incredibly cheap. The problem is that an agentic workflow in production does not make a single simple question-and-answer call. To resolve a complex logistics ticket or analyze a tax discrepancy, an agent frequently:

  1. Reads a long context of documents and customer history (heavy input tokens).
  2. Makes internal reasoning calls (chain-of-thought or reasoning tokens).
  3. Queries two or three external tools (database, ERP, tracking API), reads the returns in JSON format, and revises the plan if it finds an error.
  4. Passes the response through a second validating model (guardrail) before displaying it to the user.

Suddenly, a single support interaction that seemed to cost fractions of a cent consumed 80 thousand tokens accumulated across five steps. If at the end of this cycle the agent fails to resolve the problem and transfers the annoyed customer to a human agent (who will need to read everything again from scratch), you paid twice: you paid the cloud in dollar and you paid the full human hour.

Therefore, the only financial metric that matters in AI engineering is the CPTR (Cost per Successfully Resolved Task):

Executive formula for CPTR: CPTR = (Inference + Infrastructure + Human Supervision) / Tasks Successfully Completed Without Rework

Operational DimensionNaive Approach (Prototype / PoC)Production Engineering with Unit Economics
Main metric trackedQuantity of messages or gross cost per tokenCost per Resolved Task (CPTR) and real resolution rate
Language model choiceA single giant frontier model for everythingRouting: small/fast models for 80% of the steps
Execution of calculations and business rulesAsking the LLM to calculate in the prompt (high risk and cost)Traditional deterministic code triggered via Tool Calling
Context handlingSending all history and manuals at each turnPrompt caching, lean vector search, and structured state
Impact on company marginUnpredictable (explodes when volume scales)Predictable, auditable, and lower than the previous manual cost

2. Four architectural techniques to cut AI costs by up to 80%

When we treat AI agents as production engineering systems subject to the laws of economic efficiency, four architectural decisions completely change the financial viability of the project:

  1. Separate what is probabilistic from what is deterministic: Large Language Models are brilliant for understanding unstructured natural language, extracting intents from messy text, or synthesizing documents. But they are expensive and slow to validate a CPF, sum items on an invoice, or check if an order is within the 7-day return window. Never spend tokens where a traditional code if/else solves the issue in microseconds with zero cost and 100% precision.
  2. Model Routing: in any business operation, about 70% to 80% of demands are variations of simple and known cases, and only 20% require deep reasoning. Put a lightweight classifier or a compact and cheap model at the entrance; trigger the large advanced reasoning models exclusively when the complexity of the task requires it.
  3. Aggressive use of Prompt Caching and lean state: if your agent needs to consult a 30-page internal policy manual on every call, ensure that these fixed instructions remain in the cached prefix of the request, reducing the repetitive reading cost by up to 75% to 90%.
  4. Strict iteration limits (loop circuit breakers): autonomous agents that receive permission to try to fix their own errors when an API fails can enter infinite loops of attempts during the night, burning thousands of dollars in minutes. Every agent in production needs to have a strict ceiling of steps (max steps) and a maximum token budget per session.

3. Overcoming Baumol's Law with financial responsibility

We have seen in other articles of this series that Brazil has suffered for thirty years from Baumol's Law: more than two thirds of our economy is in the services sector, where manual and administrative office work has grown very little in productivity.

Artificial Intelligence agents are our generation's greatest tool to break this stagnation, allowing a lean team of analysts, lawyers, doctors, accountants, or engineers to process ten times more volume with superior quality. But this revolution only sustains itself on your company's balance sheet if it is guided by the classic discipline of engineering: measuring every cent of input, auditing the quality of the output, and ensuring that technology lowers the unit cost of the operation with each passing month.


References and verifiable readings

AI Unit Economics Calculator (CPTR)

Cost Per Resolved Task (CPTR) vs. Manual Handling

Measure whether your AI agent generates real operating margin after accounting for failed runs that escalate to human operators (paying twice).

30,000
2,000150,000
75%
30%95%
R$ 0.60
R$ 0.15R$ 4.50
R$ 14
R$ 4R$ 40

Blended cost of R$ 4.94/task (65% savings or R$ 271,800/mo)

At a 75% autonomous resolution rate, pure agent CPTR is R$ 1.92, bringing overall blended unit cost (including 25% human escalations) down from R$ 14.00 to R$ 4.94.

Agent CPTR
R$ 1.92
Per autonomously resolved task
Net monthly savings
R$ 271,800
R$ 3,261,600/ano
Escalation rework cost
R$ 105,000
25% of tasks
Total monthly operating cost (R$)
Agentic operation + routingR$ 148,200
100% manual baselineR$ 420,000
Explore AI Agents technical reference →

Reference FX for cloud/token inference: R$ 5.70/USD. Includes full human rework cost on failed escalations.

Cesar Zanis / Technology

Good ideas keep the conversation going.

Share this article or publish the visual deck to your Stories and Feed.

WhatsApp ↗LinkedIn ↗X ↗
Cesar Zanis
Written by·Software Architect & Technology Leader

Cesar Zanis

15+ years leading software architecture, database performance, FinOps, and applied AI across enterprise operations. Built and scaled an engineering organization from zero to 20+ developers.

15+ yrs experienceArchitecture & DataCloud & FinOps0 → 20+ Devs

Enjoyed this article?

I publish practical analyses on software architecture, FinOps, data, AI, management, and economics directly on LinkedIn.

Continue Reading

Take this analysis further with data and sources

All visual cards of this article are ready above to share on your Stories, Feed, WhatsApp, or LinkedIn with full sources.