title: Agent optimization slug: agent-optimization audience: end-user category: agents

Agent optimization

Optimization makes a saved agent faster, cheaper, and more accurate on the ERP instance you use it with. You run it once per instance; from then on every conversation with that agent skips the warm-up work and gets straight to your request.

When to use it

Optimize an agent when:

You don't need to optimize one-off or purely conversational agents.

Heads up — optimization uses AI credits. A typical run consumes around 15–20 credits (more for agents with long instructions or many referenced entities). It pays for itself quickly on agents you'll run many times, but it's not worth doing on agents you'll only use once or twice.

How to optimize

  1. Pick the ERP instance you want to optimize for from the top bar.
  2. Open the agent in the editor and go to the Optimization tab.
  3. Click Optimize next to the current instance. A new chat opens and runs on its own — you don't need to type anything.
  4. Wait for it to finish. When the row flips to Optimized, you're done.

That's it. Every later conversation with that agent on that instance will use what was learned.

How to control it

When (and how often) to re-run

A stale optimization never breaks the agent. If you added new instructions, named a new product, or something in your ERP changed since the last run, the agent will simply gather those new specifics live on each conversation — exactly like an un-optimized agent would. Everything that was captured still works and still saves time.

Use that to decide whether to re-run:

If a stored ID later disappears from your ERP (deleted customer, removed document type…), the agent notices on the next call and recovers automatically. Re-running just tidies things up.

Dynamic memory

Once an agent is optimized for an instance, it also gets a small dynamic memory for that instance — a short notebook where it can jot down broadly-useful things it learned during a run, so its future self benefits on later conversations. Think query patterns that worked well, schema quirks, recurring naming conventions, "things I wish I knew on turn 1".

Dynamic memory is only available for agents you've optimized — running optimization is what creates the notebook. It's a different layer from the main optimization artifact: clearing notes does not clear your optimization, and re-running optimization does not erase notes.

Good to know