Machine Learning pathway increased my salary by 40%
Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering
The gap between a working agent and a running service is operations: deployment topology, evaluation gates, tracing, cost control, latency budgets and someone who knows what to do at three in the morning.
This chapter covers production engineering for agent systems: deployment architecture across cloud, hybrid and private environments; containerisation and Kubernetes considerations; agent runtime management; AgentOps alongside MLOps and LLMOps; CI/CD with evaluation gates; version and configuration management; the testing pyramid from functional to multi-agent simulation and red-teaming; distributed tracing and observability; token, latency and cost engineering; reliability, disaster recovery, incident management and service-level objectives.
What this covers
- Who this is for
- Platform and site reliability engineers, DevOps leads, engineering managers and service owners taking agent systems into production.
- What it assumes
- Chapters 01 to 09, plus practical experience of CI/CD, container platforms and production incident response.
- What you will be able to do
- Design a deployment topology, build a pipeline with evaluation gates, instrument tracing and cost attribution, define SLOs that reflect agent behaviour, and run an incident response that can stop and reconcile an autonomous process.
- Reading time
- About 28 minutes including the question bank and glossary.
Deployment topology and environment strategy
Agent workloads have an unusual topology profile: the orchestration layer is stateful and durable, the agent workers are stateless and bursty, the model endpoint is an external dependency with variable latency, and the tool layer is latency-sensitive because it sits in the critical path. Designing for these differences avoids the common failure where a stateless autoscaling pattern is applied to a stateful orchestrator and cases are lost on scale-in.
Cloud-native deployment suits most enterprises: managed durable workflow services for orchestration, containerised workers for agent execution, managed model endpoints, and a secrets manager for tool credentials. Hybrid deployments arise where data cannot leave a private network; there the model endpoint becomes an internally hosted model or a private link, and the evaluation discipline must be stronger because model updates are less visible.
Environments need to mirror the evidence, not only the code. Development and staging need representative documents, a sandbox for each integrated system, and the evaluation case set. A staging environment with clean PDFs and a shared test account will pass work that fails immediately in production.
- Durable managed orchestration; stateless agent workers; latency-sensitive tool layer.
- Separate sandbox credentials per integrated system, never production read-write.
- Representative documents in non-production, including the awkward ones.
- Managed secrets with per-environment isolation.
AgentOps: the operational discipline
AgentOps is the set of practices that keep agent behaviour correct over time, as distinct from keeping infrastructure healthy. It covers evaluation on every change, prompt and model versioning, drift detection on inputs and outputs, cost and latency monitoring per process, and the feedback loops from human overrides into evaluation cases.
The critical difference from conventional MLOps is that the change surface is much larger. A conventional model changes when you retrain it. An agent changes when you edit a prompt, add a tool, change a retrieval filter, upgrade a model or alter a document corpus — and several of those can happen without a deployment. AgentOps must therefore control configuration as strictly as code, with review, versioning and rollback for prompts and tool schemas.
The second difference is that failures are often silent. A model returning a worse answer does not throw an exception, so operations must be built on quality signals — evaluation deltas, override rate, escalation mix and groundedness samples — rather than on error rates alone.
If a prompt can change without review and a rollback, you do not control your production behaviour — someone else does.
CI/CD and evaluation gates
A workable pipeline for an agent system runs four gates before deployment. Schema and contract tests validate tool interfaces. Unit evaluation scores each agent role against its rubric. Integration tests exercise the state machine with mocked and sandboxed tools, including failure paths. Regression evaluation runs the full case set and fails the build on a quality delta beyond threshold, not only on absolute failure.
The gate thresholds must be explicit and owned. A common failure is a gate that blocks on nothing because nobody defined what worse means. Define a baseline, an allowed tolerance per metric, and a named owner who approves exceptions with a documented reason.
Promotion should be staged: shadow mode where the new version runs alongside without acting, then a small traffic percentage with elevated sampling, then full rollout. For consequential processes, shadow mode is the only responsible way to evaluate a change, because it produces evidence of what would have happened.
| Gate | Blocks on | Owner |
|---|---|---|
| Contract tests | Tool schema or interface change | Platform |
| Unit evaluation | Per-role rubric below threshold | Agent owner |
| Integration | State machine or failure-path regression | Engineering |
| Regression | Quality delta beyond tolerance | Agent owner |
| Shadow comparison | Disagreement on consequential cases | Process owner |
The testing pyramid for agent systems
Unit testing applies to deterministic components and to each agent's structured output: given this input, the extraction must contain these fields; given this policy text, the classification must be one of the permitted values. These tests are cheap and catch most regressions.
Integration testing covers the state machine: transitions, retries, timeouts, compensations and idempotency. Multi-agent simulation runs whole scenarios against mocked tools to observe coordination behaviour — which is where handoff defects, dependency ordering errors and duplicate actions appear. Simulation is also the cheapest place to test long-running behaviour by advancing time rather than waiting.
Red-teaming tests adversarial exposure: injected instructions in documents, poisoned records, malformed files, requests to exceed scope, and attempts to chain tools. It should run on a schedule as well as on release, since the threat model changes as sources and tools are added.
- Unit: deterministic logic and structured agent outputs.
- Integration: transitions, retries, timeouts, compensations, idempotency.
- Simulation: multi-agent coordination with mocked tools and advanced time.
- Red team: injected content, poisoned records, scope escalation attempts.
- Chaos: dependency failure, latency injection, duplicate delivery.
Tracing, logging and quality telemetry
Traces must be case-centric and complete: process and policy version, every agent identity, prompt and model version, each tool call with arguments and status, verification verdicts, approvals and the committed result. The test of sufficiency is whether an engineer can explain a specific failure without asking anyone.
Quality telemetry sits alongside technical telemetry. Track straight-through rate, exception mix, escalation and override rates, groundedness samples and evaluation deltas per version. Alert on changes in distribution rather than only on absolute thresholds, because a slow drift in override rate is the earliest signal of behavioural regression.
Logging discipline matters for privacy as well as cost. Traces routinely contain personal data, so access must be restricted and retention defined. A common audit finding is an unbounded trace store containing customer documents in a tool with wide access.
Latency, token and cost engineering
Latency in agent systems is dominated by sequential model calls and retrieval round trips. The levers are structural: parallelise independent branches, route routine steps to smaller models, reduce context by summarising, cache stable retrieval results and avoid verification calls where a deterministic rule suffices. Measure the per-step distribution and set budgets per step, not only end to end.
Cost engineering follows the same shape. Attribute spend per process, per agent and per case; set ceilings; monitor the ratio of successful completions to tokens consumed. The most expensive pattern is retry storms under a failing dependency, which is why backoff, circuit breakers and iteration limits are cost controls as much as reliability controls.
Optimise against completed cases, not model calls. A cheaper model that increases escalations can raise total cost, because human handling is expensive. The metric that matters is cost per completed case including escalations and rework.
Publish a latency and cost budget per stage with the owner of that stage. Budgets without an owner drift immediately.
Reliability, SLOs, disaster recovery and incidents
Service-level objectives for agent systems need to reflect business outcomes as well as availability. Useful SLOs include proportion of cases completed within target duration, straight-through rate against baseline, error rate by class, and quality score on sampled review. An SLO of ninety-nine per cent availability alongside a collapsing straight-through rate is not a healthy service.
Disaster recovery must address state, not only compute. Durable orchestration state needs backup and tested restore; tool credentials need rotation without downtime; in-flight cases need a defined disposition. A recovery plan that cannot answer what happens to cases mid-flight is incomplete.
Incident management needs an agent-specific element: the ability to stop the agent without stopping the business. That means a kill switch per process, a documented procedure for reconciling partially applied actions, and an escalation path to the accountable owner. Runbooks should be tested — the first real use of an untested kill switch is during an incident.
- SLOs on completion time, straight-through rate, error class and sampled quality.
- Back up and restore orchestration state; define in-flight case disposition.
- Per-process kill switch with a tested procedure.
- Reconciliation runbook for partially applied actions.
- Named accountable owner reachable during an incident.
Key focus areas
- Topology profile
- Durable stateful orchestration, stateless bursty workers, external model latency, latency-sensitive tools.
- Environment fidelity
- Representative documents and sandboxed systems, or staging passes what production fails.
- AgentOps
- Evaluation on every change, versioned prompts and tools, drift detection and override feedback.
- Configuration control
- Prompts and tool schemas reviewed, versioned and rollback-capable like code.
- Evaluation gates
- Contract, unit, integration, regression and shadow gates with named owners.
- Shadow mode
- Running a new version without acting, to compare would-be outcomes before rollout.
- Simulation testing
- Whole scenarios with mocked tools and advanced time to catch coordination defects.
- Red teaming
- Scheduled adversarial testing of injected content, poisoned records and scope escalation.
- Case-centric tracing
- Every version, tool call and verdict attached to a case identifier.
- Quality telemetry
- Straight-through, exception and override rates as the earliest behavioural signals.
- Latency budgets
- Per-step distributions and ceilings, not only end-to-end averages.
- Cost per completed case
- The metric that includes escalations and rework, unlike cost per call.
- Outcome SLOs
- Completion time, straight-through rate and sampled quality alongside availability.
- Kill switch
- The tested ability to stop an agent without stopping the business.
Key takeaways
- Design the topology for durable state and bursty stateless workers separately.
- Staging must mirror document reality or it proves nothing.
- AgentOps differs from MLOps because prompts, tools and corpora change behaviour without a deployment.
- Control prompts and tool schemas as strictly as code.
- Gate deployments on quality deltas with named owners, not on error counts.
- Shadow mode is the responsible way to evaluate consequential changes.
- Simulation catches coordination defects that unit tests cannot.
- Red-team on a schedule because the exposure surface grows.
- Traces must be sufficient to explain a specific failure without asking anyone.
- Alert on distribution shifts in override and exception rates.
- Parallelise, route, summarise and cache before buying more capacity.
- Measure cost per completed case, not per call.
- Set outcome SLOs, not only availability.
- Test the kill switch before you need it.
- Define what happens to in-flight cases in a recovery.
Glossary
- AgentOps
- Operational practices keeping agent behaviour correct: evaluation, versioning, drift and feedback.
- Backoff
- Increasing delay between retries to avoid amplifying a failing dependency.
- Chaos testing
- Deliberate injection of failures to verify resilience.
- Circuit breaker
- A control that stops calls to a failing dependency for a period.
- Cost per completed case
- Total spend including retries, verification and escalations, divided by completed cases.
- Drift detection
- Monitoring input and output distributions for change over time.
- Evaluation gate
- An automated quality check that blocks promotion on regression.
- Golden case set
- A versioned, curated set of representative cases used for regression evaluation.
- Kill switch
- A mechanism to halt an agent or process immediately.
- Latency budget
- An allocated time allowance per stage within an end-to-end target.
- LLMOps
- Operational practices specific to language-model-based systems.
- Red teaming
- Adversarial testing of a system's ability to resist misuse and attack.
- Runbook
- Documented procedure for operating and recovering a service.
- Shadow mode
- Running a version in parallel without side effects to compare outcomes.
- Simulation
- Executing whole scenarios against mocked systems to observe behaviour.
- SLO
- Service-level objective — a target for a measurable service property.
- Structured output test
- A test asserting that an agent response conforms to a required schema.
- Trace
- The correlated record of steps and tool calls for one unit of work.
- Version pinning
- Fixing a model, prompt or tool version so behaviour does not change silently.
- Warm pool
- Pre-initialised capacity that reduces cold-start latency.
5 questions to test the model
Why can a prompt change bypass conventional release controls?
What is the correct use of shadow mode?
Which SLO best reflects agent behaviour rather than infrastructure?
A cheaper model increases escalations. How should this be evaluated?
What must a recovery plan define for in-flight cases?
Questions this page answers
Do we need Kubernetes for agent workloads?
How do we version prompts and tools?
What is the minimum evaluation gate for a first release?
How do we test long-running processes?
How much tracing is too much?
What belongs in an operations dashboard?
How do we set a cost ceiling per case?
How do we handle model version upgrades?
What is the right incident severity model?
What should the kill switch actually stop?
How do we reconcile after a bad deployment?
How do we monitor quality continuously without reviewing everything?
What performance targets are realistic?
How do we reduce cold-start latency?
Should agent workers be stateless?
What belongs in the runbook?
How do we handle multi-region requirements?
What is the biggest operational surprise for teams?
How do we keep evaluation fast enough for CI?
How does this chapter connect to Chapter 11?
What does Contract tests mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (CI/CD and evaluation gates)?
What does Unit evaluation mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (CI/CD and evaluation gates)?
What does Integration mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (CI/CD and evaluation gates)?
What does Regression mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (CI/CD and evaluation gates)?
What does Shadow comparison mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (CI/CD and evaluation gates)?
What does Topology profile mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Environment fidelity mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does AgentOps mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Configuration control mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Evaluation gates mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Shadow mode mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Simulation testing mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Red teaming mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Case-centric tracing mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Quality telemetry mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Latency budgets mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Cost per completed case mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Outcome SLOs mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does Kill switch mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Key focus areas)?
What does AgentOps mean in Enterprise Deployment, DevOps, AgentOps, Observability and Performance Engineering (Glossary)?
Sources and standards
- Google SRE Workbook — SLOs and error budgets
Objective-setting and incident practice adapted to agent services.
- Temporal documentation — durable execution and versioning
State durability, retries and workflow versioning.
- Kubernetes documentation — workloads and autoscaling
Container orchestration considerations for agent workers.
- OpenTelemetry documentation
Tracing and metrics instrumentation standards.
- NIST AI RMF — Measure and Manage
Measurement and monitoring expectations.
- OWASP Top 10 for LLM Applications
Adversarial testing coverage for red-team suites.
Continue through the twelve chapters
Chapter 11 turns operational capability into a funded programme: readiness, business cases, TCO and ROI, roadmaps and the operating model that sustains it.
Continue this lesson with a subscription
Multi Agentic Enterprise Workflow Automation is part of the paid catalogue. You have read the free preview. A subscription opens the rest of this lesson, the classroom slides and the assessment questions.
- The full lesson for this topic and every other catalogue topic
- Every classroom slide deck and worked example
- All assessments, with a verifiable certificate on completion
The Free-To-Learn library stays open to everyone and is not affected by this.
