May we use cookies so Meta, Google, LinkedIn and ChatGPT see your visit and we learn which ads work? PrivacyMay we use cookies to see which pages help, and let Meta, Google, LinkedIn and ChatGPT see your visit, so we know which of our ads work? That way we spend less on ads that do not work. We do not sell your data, and the site works the same if you decline. You can change your answer at any time under Cookie settings at the foot of the page. Privacy policy
Loading...
This idea carries a full system design question on its own. Each walks through the full answer.
AI Engineering · Llm Genai Ops
Free preview: the first 2 parts of this 14-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI courseread the rest of this lesson in
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by card or PayPal
See the Generative AI and Agentic AI coursein Llm Genai Ops
This lesson is part of the AI Engineering course. Unlock the full course, a separate one-time payment, for lifetime access.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime AccessFoundation lessons of this course are free, no payment needed. Try them now
A team builds a support agent. You type "the customer says their order never arrived, sort it out," and the agent looks up the order, checks the shipping status, and issues a refund. In the demo it works perfectly. Everyone claps.
Two weeks after launch, an on-call engineer gets paged. One customer has been refunded four times for the same 42 dollar order. The logs tell the story. The agent called issue_refund, the payment API timed out, the agent read the timeout as "that did not work," and it tried again. And again. And again. The refund actually went through every single time. The API was slow, not broken.
Nobody wrote a bug. The code was fine. The model made a reasonable-looking decision at every step, and the sum of those reasonable decisions was four refunds and an angry finance team. This is the defining property of an agent in production: it does not fail loudly with a stack trace, it fails quietly by making a chain of locally sensible choices that add up to a bad outcome.
A chatbot that gives a wrong answer wastes a few seconds. An agent that takes a wrong action moves money, deletes data, or emails the wrong person. The stakes are completely different.
The design of the agent loop is covered elsewhere in this track. This lesson is the operator's counterpart: not how an agent is built, but how you run one without fear. Deployment shape, the budgets that bound a run, the tracing that makes a failure legible, the rollout process for a change you cannot prove safe in staging, and the handful of numbers that tell you a fleet of agents is healthy. This is the last lesson in the LLM and GenAI Ops chapter, and it is the one that separates a slick demo from something you can run on a Friday night.
The first thing to unlearn is that an agent is a clever prompt. In production it is a service, and it has the anatomy of one. A user message arrives at a gateway that authenticates it, rate limits it, and stamps it with a request id. The gateway turns that message into a run, and it attaches a budget to the run before a single token is generated. From there the request moves through an orchestrator that executes the loop, a governor that can stop it, a sandbox where tools actually run, and a model plane that routes and caches the model calls. Underneath all of it sits an observability plane that taps every step.

Read the planes as a division of responsibility. The control plane is code you own end to end: the gateway, the orchestrator that builds each prompt and reads each tool call, and the governor that is the only component allowed to stop a run. The execution plane is where side effects happen, and every one of them is contained: tools run in a sandbox with a timeout and least-privilege credentials, and the tools that change state or spend money sit behind a tighter scope than the tools that only read. The model plane treats the model as an interchangeable dependency, routing cheap steps to a small model and hard steps to a frontier one, failing over to a second provider so a single vendor incident does not take the agent down, and the stable system and tool block so the prompt you rebuild every turn is billed at a fraction.
The plane that people skip, and then regret skipping, is the observability plane. Because an agent fails quietly, "the model got it wrong" is a useless bug report. You need to see which of a dozen steps went sideways, what the model was thinking, which tool it chose, what came back. The trace is what turns that four-refund mystery into a one-line answer. Everything after this slide is one of these boxes, examined up close.