OneLongTail

Courses · Course 6 of 7 · Guardrails, Observability, Cost

Reliable Agents in Production

Ship an agent with layered guardrails, tracing, online evals, cost and latency budgets, and a playbook for model upgrades and incidents.

trace of one request request model call tool: refundstimeout retryok model call budget1 retry, answered within budget
An illustration of the course’s subject, not a recording.
19lessons
5modules
3open now

Who it is for

Engineers and tech leads running customer-facing agents.

Each lesson is a short simulation: you read what an agent did, a config or a tool output, make one decision and see at once whether it holds. Real terms, real commands, sourced from primary documentation.

5 modules

  1. Architecture choices4 lessons
  2. Guardrails4 lessons
  3. Observability3 lessons
  4. Cost and latency4 lessons
  5. Change and incidents4 lessons

Modules · 3 of 19 lessons open, the rest are being built

01Architecture choices4 lessons
  1. 01Workflow or agentComingChoose the simplest pattern that does the job.
  2. 02Single agent firstComingMax out one agent before adding more.
  3. 03When multi-agent paysComingWeigh a +90% research gain against ~15x tokens.
  4. 04Prototype big, then shrink the modelComingStart with the most capable model, then swap smaller where evals allow.
02Guardrails4 lessons
  1. 05Layered guardrailsComingCombine relevance, PII, moderation, rules and tool safeguards.
  2. 06The lethal trifectaComingCut one leg: private data, untrusted content, external communication. Also in Tools, MCP and Skills for Agents.
  3. 07Human intervention triggersComingEscalate on high-risk actions and repeated failure.
  4. 08Human-in-the-loop by cost of errorComingPlace review where errors are costly and hard to check.
03Observability3 lessons · 1 open
  1. 09Tracing a finished runOpenCapture every LLM call, tool call, guardrail and handoff in a trace, then read a finished run's trace to find the turn where it went wrong. Also in Loop Engineering.
  2. 10OpenTelemetry across MCPComingPropagate trace context through tool servers.
  3. 11Dashboards that lead to actionComingOne place to look, alerts that matter.
04Cost and latency4 lessons · 1 open
  1. 12Where the tokens goComingBreak cost into input, output, cached and tool tokens.
  2. 13Caching and batchingComingCut cost and latency with prefix caching.
  3. 14Latency budgetsComingParallelise, stream and route to faster models.
  4. 15Budgets: turns, tokens, money, timeOpenSet hard caps on turns and money per run, cap time from outside the run (timeout, timeout-minutes), know that token caps hold per request only, and see what a loop without caps costs overnight. Also in Loop Engineering.
05Change and incidents4 lessons · 1 open
  1. 16Upgrading the model safelyComingRun regression evals and re-tune the harness before switching.
  2. 17Same job, different endingOpenMeasure a loop over k runs, then choose pass@k or pass^k by what the job needs: pass@k when one good run out of k is enough, pass^k when every run acts on its own. Also in Loop Engineering.
  3. 18Voice and multimodal agents in productionComingHandle speech, turn-taking and vision misreads.
  4. 19Capstone: production readiness reviewComingAudit a live agent against a checklist and fix the top three gaps.

Built on primary sources