---
title: "Guild Optimizer: Make Your Agents Cheaper Automatically"
canonical: "https://www.guild.ai/blog/product/optimizer-announcement"
---

# Guild Optimizer: Make Your Agents Cheaper Automatically

- **Category:** Product
- **Author:** Ganesh Asapu
- **Published:** Sep 01, 2026
- **Reading time:** 5 min

AI agents are getting useful enough that the next problem is becoming obvious: how do you keep getting the same work done without continually spending more tokens to do it?

It’s easy to make an agent more capable by giving it a larger model, a bigger prompt, more context, and more tools. It’s much harder to answer a different question. _How much of that does the agent actually need?_

Today, we've added a new tool to Guild called **Guild Optimizer**. It’s a new way to automatically reduce the cost of production agents while maintaining the quality of the work they produce. It’s the next step in what we're building with Guild Insights, which helps you understand where AI resources are being consumed. Optimizer helps you act on it.

## From understanding spend to improving it

Most AI cost-management tools stop at visibility. They can tell you how many tokens you used, which models generated them, and how much they cost. That matters. But ultimately the useful question is _’Could we have achieved the same outcome for less?_**’**

Optimizer is designed to answer that question. Once an agent has been running on Guild and has accumulated just 10 production sessions, Guild can use that history to understand the work the agent is performing. From there, Optimizer can automatically test different ways of running that agent more efficiently. Instead of asking teams to manually rewrite prompts, switch models, remove tools, run tests, and compare results, Guild can do much of that work. The goal is simple.

## Production traffic becomes your tester

The difficult part of optimizing an agent isn't coming up with cheaper configurations. It's knowing whether those changes made the agent worse. That normally requires evals: a representative set of inputs and expected outcomes used to measure agent quality. Anyone who has built serious agentic systems knows creating and maintaining good evals can be a lot of work.

Guild takes a different approach.

Optimizer can use an agent's existing production sessions to automatically create an evaluation set representing the work the agent is already doing. That gives Guild a quality baseline. We can then change how the agent runs, replay representative work, and ask: _Does the optimized version still perform as well as the current version?_

The initial evaluation can use an LLM-as-judge approach to score results, while giving teams the ability to inspect and adjust the evaluation criteria themselves. The important part is what happens next. Once you have an eval, optimization becomes measurable rather than speculative.

Guild lowers costs in the following ways

- Model Optimization
- Tool Optimization
- Prompt Optimization (coming soon)
- Code Optimization (coming soon)

## Model Optimization: Try more efficient models—without guessing

One of the first things Optimizer tests is whether an agent needs the model it is currently using. A team might have selected a highly capable model when an agent was first built because it was the fastest way to get the workflow working. But that doesn't mean every production task requires it forever.

Optimizer can run the same evaluation using a less expensive model and compare the results. At the same time, there are occasions when choosing a model with higher per token prices results in lower overall cost. A model with better reasoning can process the same workload with fewer tool calls. Fewer tool calls means fewer total tokens consumed, resulting in lower prices. Optimizer is designed to compare and contrast across those different dimensions, ensuring that if there are savings to be found, it will find them. Sometimes in unlikely places.

![](https://images.prismic.io/guild-ai/Ugzt9Ir4xQ64vUjR_factory-compare-4-.png?auto=format,compress)

If quality falls, nothing changes. If the lower priced model produces results that meet the existing quality bar, Guild can recommend the change and show the expected savings. This turns model selection from a one-time architectural decision into something that can be continuously tested against the actual work an agent performs.

## Tool Optimization: Give agents only the tools they need

Tools create another hidden source of agent cost. It’s common to give an agent a large collection of tools so that it has everything it might need. But every additional tool adds context the model has to process, so removing unnecessary tools reduces the number of tokens used—even when the agent rarely or never uses it.

![](https://images.prismic.io/guild-ai/D-WG2q-sdgBhVAg0_factory-compare-3-.png?auto=format,compress)

Optimizer analyzes production sessions to determine which tools are actually being used. It can then test the agent with unnecessary tools removed. Again, the eval provides the guardrail. If the smaller toolset maintains quality, Guild recommends the more efficient configuration. Instead of asking teams to manually determine which capabilities an agent might safely lose, the system can test that question against real behavior.

## Prompt Optimization: Analyzes product behavior to propose a better replacement

Prompts tend to grow over time. Teams add instructions as new situations appear, but rarely revisit whether older guidance is still useful. The result can be a prompt that consumes unnecessary tokens, encourages unneeded tool calls, or leaves the model to spend extra turns deciding what to do.

Prompt Optimization (coming soon) addresses this. It enables Optimizer to analyze the agent’s current prompt alongside its production behavior and proposes a more cohesive replacement. That might mean removing instructions that no longer help, sharpening guidance that prevents unnecessary exploration, or combining steps that the agent currently performs separately. The goal isn’t simply to shorten the prompt, but to reduce the cost of completing the work. Sometimes clearer instructions save more by preventing unnecessary steps.

![](https://images.prismic.io/guild-ai/BXVAdX7ZpaVyTpwX_factory-compare-1-.png?auto=format,compress)

Guild then builds and evaluates the rewritten version against the current agent. Teams can inspect the before and after prompt, compare measured quality and cost, and decide whether to accept or reject the recommendation.

## Code Optimization: Use code when you don't need a model

Another important source of efficiency is determining which parts of an agent workflow need an LLM at all. Agents often begin life as large prompts because that is the fastest way to build them. Over time, however, repeated and predictable parts of those workflows can often be handled much more efficiently with deterministic code.

Code Optimizer (coming soon) streamlines this part of the development process. Guild identifies opportunities to replace portions of an LLM-driven workflow with code while using the same evaluation framework to verify that the overall result still meets the required quality bar. That improves more than cost. Deterministic execution is faster and more predictable than repeatedly asking a model to perform work that software can reliably do itself.

## Review the recommendation. Then install it.

Optimizer isn't designed as a black box that silently changes production agents. For each optimization run, Guild produces a report showing the agents evaluated, the changes tested, and the impact on cost and quality. Teams can inspect recommendations individually and choose whether to accept or dismiss them. When a recommendation is accepted, Guild can install the optimized version into the workspace. And because Guild operates the agent runtime, this process can happen in the same system where the agents are already running.

## Costs reduced - in a single step

We've been using the same approach against our own agents at Guild. In one optimization run across a workspace containing four agents, we reduced the cost of a run from roughly **$13 to $7.50** while maintaining the required quality. In another internal agent used for issue triage, optimization reduced the cost per run by approximately **87%**, in part by moving work that didn't require an LLM into deterministic code.

To be clear, those are individual examples rather than promises of a universal savings rate. Different agents have different workloads, models, prompts, tools, and opportunities for optimization. Substantial inefficiency can exist inside an agent that isn't visible simply by looking at its token bill. The only way to find it safely is to optimize against the outcome.

## Guild’s different incentive model for AI infrastructure

There’s also a broader reason we're building this. Model providers naturally benefit when applications consume more model inference. Guild's job is different.

We want organizations to get the most useful work possible from the AI resources they pay for. That means helping you determine when a powerful model is necessary—and when it isn't. Which tools an agent actually needs—and which it doesn't. Which work requires intelligence from a model—and which work should simply be code.

## From agents you run to agents that improve

AI adoption will increasingly be measured by outcomes rather than token consumption. As companies deploy more agents, it won't be enough to know that they're running. Teams will need to understand what those agents cost, what they're accomplishing, and whether there's a better way to produce the same result.

That's what we're building toward with Guild.

**Insights shows you what's happening. Optimizer helps you improve it.**

## Make your agents more valuable with Guild

Find out how Guild can help you control spend and deliver ROI at scale.
