Skip to content
Fin Pünjer AI Workflow Consulting

AI agents

AI Agents in Production: 7 Lessons from Running 30+ Agents

What really goes wrong when you run more than 30 AI agents in production – and how to prevent it. Seven lessons from GardenPilot, with measurements, not theory.

Fin Pünjer By Fin Pünjer · 6 min read

A lot is written about AI agents, mostly about what they could do. This article is about what actually happens in production. It is based on GardenPilot, my own AI product for garden planning, where an orchestrator works with four specialised sub-agents for visualisation, concept, planning and guidance.

As of August 2026, 24 agents ran on Anthropic models, 11 on OpenAI and two directly on Google Gemini. On top of that comes an image pipeline with a fallback chain across five image models.

All seven lessons below grew out of real incidents. For companies introducing AI agents, they matter more than any model leaderboard.

1. A prompt is not a guardrail

The most important insight first: language models follow instructions most of the time, but not always. “Most of the time” is not enough when a rule must never be broken.

Three examples from production:

  • The orchestrator was clearly instructed to never call a certain sub-agent in one step. It did anyway.
  • A text was supposed to be kept “verbatim” according to the prompt. The model rephrased it regardless.
  • In five out of eight test rounds, an agent offered a step change as an answer option, even though the prompt explicitly forbade it.

The fix was the same every time: the rule moves from the prompt into the code. Today, code filters which sub-agents can be called at each step. A foreign agent is not forbidden – it simply does not exist. Even an explicit request to call it produced zero calls in testing. A second lock discards proposals that do not fit the current step.

The principle behind it: guardrails are code and policies, not sentences in a prompt. The model expresses an intent; code checks it and carries it out.

2. What must stay unchanged should never reach the model

If a text must not be altered under any circumstances, the safest approach is not to hand it to the model for editing at all.

An example from translating content: code detects the language of every single field itself. Only for unclear values does it ask a model – and the answer is restricted to two possible values, “de” or “en”. The model sees the text but cannot return it, so it cannot change it. Only fields confirmed as German go to the translator.

In a test with mixed-language content, 24 of 70 values were translated this way. The remaining 46 stayed byte-for-byte identical.

3. Values from catalogues, not from imagination

Language models like to invent plausible values. That is fine for prose, not for master data.

At GardenPilot this applies to colours, for example. The model never returns a colour name, only an identifier from a fixed catalogue. Code looks up the name. Technically, the list of allowed values is injected directly into the response schema, so the model cannot return anything else.

One exception is deliberate: the model may read the exact colour value from the image, if it actually had an image. Measured, these readings deviated by a median ΔE of 2.0; randomly chosen colours came to 14.6. The rule: meaning from the catalogue, measurement from the image.

4. Dry run first, real data second

Before a model changes data, it runs against a record that must not change. Only when nothing happens there does it touch production data.

That sounds pedantic. But it prevented 22 themed worlds from being silently rephrased – exactly the case from lesson 1, where the model ignored the “keep verbatim” instruction. Without the dry run, it would have surfaced weeks later.

5. Silent failures are the most dangerous

A failure that crashes loudly gets fixed immediately. The dangerous ones are those where everything looks like success.

Example 1: a new model breaks parsing. After switching to a so-called reasoning model, ten functions suddenly returned no result. The cause was a detail: the new model puts an initially empty reasoning block in front of its answer. The code took the first element with content – and in JavaScript an empty array counts as “present”. The planning flow was down without anyone noticing. Today, the code iterates over all output parts, and for every new model the raw response is logged and inspected once.

Example 2: truncated answers with status 200. A sub-agent had an output limit of 2,048 tokens, but the tool calls it had to produce needed between 2,804 and 4,235 tokens. Responses were silently cut off, confirmations were lost – and the interface still reported success. Since then: hitting a token limit is a hard error, never a success without a result.

6. “Deployed” does not mean “done”

In a system with many components, a success message is not proof.

A concrete case: a function had been rolled out with the right setting, but a parallel development session deployed an older version over it shortly afterwards. The safeguard was missing in production. It only came to light because a test created two jobs instead of one.

Conversely, in another case the command-line tool reported 15 successful deployments as failures.

Since then, every deployment is verified by its content: the delivered bundle is downloaded and searched for a unique marker. Only then is the change considered live.

7. Measure model switches – don’t take them on trust

New models are announced with better scores and the same prices. Whether that holds for your use case only shows in a parallel run with real requests.

Comparing two Claude generations for the orchestrator showed:

Metric Result
Tool choice in five test scenarios identical (5 of 5)
Response time 20.6% faster
Input tokens per request 28.1% more (new tokenizer)

Same price per token does not mean the same price per request. For one reviewing agent, the older model deliberately stayed in place: the new one returned an unparsable verdict in one of three test runs, which would automatically have triggered a free re-generation for the customer.

Cost measurement has its own traps. A billing field for cache writes appeared in no price table; without it, costs would have been calculated 8.7% too low. With another provider, reasoning tokens were counted separately from output, which in the test run meant underestimating by a factor of ten.

One more rule from the fallback chain: a backup model may only step in during the first turn. Once a tool is running, there is no switch – so no action is ever executed twice.

What this means for your business

The good news: reliability can be measured and improved. Over 14 days, 698 of 698 image generations succeeded; over 120 days, 99.93%. But that does not come from better prompts alone – it comes from architecture.

Before an AI agent goes live in your company, you should be able to answer yes to these six questions:

  1. Are the rules that must never be broken secured in code, not just in the prompt?
  2. Does the agent only see the tools and data it needs for the current step?
  3. Does master data such as categories, accounts or colours come from a fixed catalogue?
  4. Is there a dry run before the agent changes real data?
  5. Do truncations, limits and empty responses lead to a visible error rather than silent success?
  6. Is every change to the live system verified by its content?

If you are unsure about any of these, an outside view pays off. That is exactly part of my AI workflow consulting.

More articles

All articles

Ready to streamline your processes with AI?

In a no-obligation first call we look at how your business runs today and identify the two or three places where AI pays for itself fastest.