Cover Image for Building Agents With Economics That Scale
Cover Image for Building Agents With Economics That Scale
Avatar for Mastra
Presented by
Mastra
The open-source TypeScript framework for building AI agents
6 Going

Building Agents With Economics That Scale

Virtual
Registration
Welcome! To join the event, please register below.
About Event

Your agent works great — until finance asks why the API bill is $63,000 and you can't explain which feature spent what. Model API spending is growing fast across the industry, and that's a sign AI features are delivering value. The problem isn't the spend itself — it's spending without visibility. Most cost-reduction advice jumps straight to tactics like "use a smaller model," but without instrumentation, those are guesses.

This session starts where it actually matters: seeing what you're spending and why. You'll learn how to use Mastra's built-in observability — tracing, automatic token metrics, and cost estimation — to attribute spend to specific agents, tools, and workflow steps. Once you can see the breakdown, every optimization becomes a deliberate tradeoff instead of a shot in the dark.

But cheaper doesn't matter if it breaks things. You'll see how to set up Mastra's scorers and datasets so you can measure quality before and after any change, giving you a clear floor to optimize against. From there, the session covers the practical patterns that make the biggest difference: routing queries to the cheapest model that clears your quality bar, compressing long-running context with Observational Memory so you send far fewer tokens per turn, trimming conversation history, caching aggressively, and designing smarter handoffs between agents.

You'll also learn how to build guardrails that keep costs predictable — processors that limit token output, delegation hooks that cap subagent iterations, and patterns for circuit-breaking before runaway spend happens. Walk away with a framework for making your agent economics scale with your product, not ahead of it.


Hosted by

Recording and code examples will be available to everyone who registers.

Avatar for Mastra
Presented by
Mastra
The open-source TypeScript framework for building AI agents
6 Going