SLOs for Multi-Step Agent Pipelines
Agent SLOs must measure workflow outcomes, not component health.

An agent can approve a denial letter in a fraction of a second, return a clean 200, and log zero errors. Every dashboard the platform team watches says the system is healthy, and every one of them is wrong about the thing that actually matters.
Why Standard SLIs Stay Green While Agent Pipelines Fail
Availability, error rate, and p99 latency were built to describe stateless request-response systems: did the component answer, how fast, did it throw an exception along the way. A component inside that chain can answer correctly, quickly, and without throwing a single error while the pipeline it belongs to produces an outcome that is wrong, incomplete, or actively harmful to the person depending on it.
The claims example is not an edge case; it's the default failure pattern. Accuracy, meanwhile, drops below the threshold that was validated for that workflow, and nothing in the standard SLI set is built to notice. Traditional infrastructure metrics remain necessary, but they were never sufficient on their own: a service level for an agent has to describe the outcome it produced, not just whether its components were reachable.
Component SLIs are additive in a way that hides compounding probabilistic failure. Every gauge reads green. The outcome is still broken. This framework exists to close that gap between component health and outcome health, beginning with how failure accumulates across a chain of steps.
How probabilistic failure compounds across pipeline steps
When each step in a pipeline succeeds with some probability short of certainty, the probability that the whole pipeline reaches a valid outcome is the product of those individual probabilities, not their average. That compounding falls faster than intuition suggests as the number of steps grows. A pipeline where every step individually looks reliable can still produce an end-to-end outcome success rate that is materially lower, and that gap is invisible to any SLO set that only watches components.
The effect appears without needing a single catastrophic failure. An agent, again, is a governed sequence expected to produce a business outcome across that sequence, and the service level has to describe that outcome.
Failures in these pipelines don't just add up, either; they interact. A retrieval error at step one doesn't only fail step one. It contaminates the context that every downstream step relies on, so the step that visibly produces the wrong answer, say step ten, may have nothing wrong with it. An agent can look helpful at every turn while quietly creating operational risk nobody flagged. None of these are component failures in any sense that a traditional SLI would catch; they are outcome failures that only become visible when the workflow is evaluated as a whole.
The conclusion that follows is not optional. Meaningful SLOs for agent pipelines cannot be built by setting a target for each component and summing the results. They have to be defined and measured at the level of the workflow outcome itself, so the first real task in building this framework is defining, precisely, what the outcome is supposed to be.
Starting with the workflow outcome, not the component
The right starting point for an agent SLO is a precise description of what a valid workflow completion actually looks like, built from the outcome a user or a downstream system depends on rather than from a model accuracy number or an API status code. A request that returns 200 tells you almost nothing about whether the workflow behind it succeeded. A valid terminal state is a much longer list of conditions: the correct workflow accepted the request, retrieval returned context that was both authorized and usable, an approved model produced output in the structure the workflow required, validation and safety checks passed, any tools involved completed without leaving an unresolved partial action, the final result actually reached the target system, and the audit record contains every evidence field it's supposed to contain. Skipping any one of those turns the 200 response into decoration.
Getting to that definition takes a few concrete steps, and none of them involve picking a metric yet. And it has to specify which exclusions are legitimate: a correctly blocked prohibited request is a governance success, not an availability failure, and treating it as a failure will corrupt every number that follows.
Before any of this, platform teams need to define the agent's job in full: what workflow it supports, which systems it can touch, which tools it's allowed to call, what actions it can take, what a wrong action costs, and when a human needs to step in. The most common mistake at this stage is starting at the model layer, asking about hallucination rate or LLM latency before anyone has answered the more basic question of what the pipeline is supposed to accomplish for the person using it. This definitional work also sets the observability contract for everything downstream, because the monitoring layer can only use its traces once the SLO has said which parts of them count as success or failure.
The seven dimensions an agent SLO set must cover
Once the outcome is defined, a complete SLO set has to cover several dimensions at once, because each one can fail independently of the others and a pipeline that looks healthy on six of them can still be failing its users on the seventh.
Outcome success measures the proportion of eligible workflow runs that reach a valid terminal state, with separate accounting for user cancellation, policy rejection, business rejection, platform failure, and silent timeout. Production practice often tracks this on a rolling 28-day window, with failure categories tracked separately so that an improvement in one category can't mask a regression in another.
End-to-end latency measures time to the outcome a user actually needs, which for an interactive assistant might mean time to first useful response and time to a complete cited answer, and for an asynchronous agent might mean time to a review-ready artifact. A rolling 7-day window on the 95th percentile to a complete cited answer is one reasonable illustrative target.
Answer and action quality cannot be measured as "did it answer." Error rate shows you infrastructure failures, but task success rate shows you whether the agent actually did what it was asked. Both numbers matter, and they are not the same number. Evaluating this dimension well requires a statistically meaningful sample, versioned test cases, and production review data assessed on a regular cadence.
Tool-call correctness and policy enforcement track tool actions completed without rollback or correction, along with whether each run used an approved model, stayed inside its permitted execution zone, accessed only authorized sources, and respected its tool allowlist. So a reasonable illustrative target holds tool actions without rollback to a rolling 28-day window, but it keeps unauthorized access at zero as a continuous invariant.
Audit and evidence completeness verifies, for every governed run, the presence of initiating identity, workflow version, model version, retrieved source references, tool calls, policy decisions, approval records, final status, and required timestamps. The standard here is reconstructability: a trace that records everything except the retrieved chunks that caused a wrong answer isn't a useful audit record. So an illustrative target might require every governed run to contain every required trace field, measured on a rolling 24-hour window.
For capacity and saturation, you track queue wait, token throughput, context-size distribution, and rejected work by priority class. Cost anomalies belong in this category too: a context window growing well past baseline, or tool invocations multiplying over a short window, can indicate an agent stuck in a replanning loop before any quality signal has degraded.
Recovery and degraded operation measure detection time, failover time, retry success rate, stuck-run age, and the share of workflows that complete correctly through an approved fallback. So an illustrative target might require high-risk access revocations to be enforced within a defined time window, on a rolling 28-day basis.
Choosing measurement windows that match agent failure dynamics
A correct SLO target measured against the wrong window will let a real regression run undetected for weeks, which makes window selection nearly as consequential as the choice of indicator itself. Backend service SLOs are commonly measured on a rolling 28- or 30-day window, because that span gives continuous, non-resetting visibility into service health, and a month of data gives you a stable denominator for events that don't happen often. That same convention, applied to agent pipelines without adjustment, becomes a liability. If you measure quality regression monthly, it can accumulate for weeks before the error budget shows any breach at all, because it stays buried inside a denominator still full of healthy runs from before the problem started.
Different dimensions need different windows. Hard invariants like unauthorized access or audit completeness need no window at all: a single breach is an incident regardless of what surrounds it, and averaging it into any rolling period defeats the purpose of treating it as an invariant. The practical answer, in most cases, pairs a tight evaluation cadence for quality with continuous, non-windowed tracking for the invariants that can't tolerate any lag.
Turning SLO breaches into alerts that reach the team in time to act
An SLO that a team only checks on a dashboard after a user complains operates the same as having no SLO. The alert layer turns a measurement into something proactive. Without an alert threshold attached to it, an SLO becomes a number you glance at once something already feels wrong, rather than a system that notifies the right people while there's still time to fix the problem before it spreads.
Alerting for agent SLOs differs from infrastructure alerting in two specific ways. Infrastructure alerts typically fire on hard thresholds, CPU past a level, error rate past a rate. Agent SLO alerts need to fire on directional trends as well, because a gradual quality regression often never crosses a hard threshold until the damage is already done. Alert configurations should be scoped to the specific SLIs that warrant a response when they degrade, rather than firing on everything the system tracks, which keeps the signal worth paying attention to.
Routing matters as much as the threshold itself. Sending alerts into the channel a developer already works in, a Slack webhook, an existing on-call system, or a coding agent integration, keeps SLO monitoring alongside every other operational signal instead of demanding a separate dashboard someone has to remember to check. Lemma's architecture reflects this directly: alerts appear in Slack and connect to coding agents, so a breach, its trace, and its issue pattern are visible in one place without forcing anyone to switch context to go looking for them.
What the Monitoring Layer Must Capture for Agent SLOs
An SLO is only as useful as the trace data sitting behind it. The root cause of a wrong answer at step ten frequently traces back to a tool call at step three or a context retrieval error at step one. If a trace doesn't span the entire pipeline, a breach is detectable but not debuggable, so a team knows something failed but not why.
The traces an observability system captures supply the raw data; the SLO decides which parts of that data matter enough to govern, and the two have to be designed together. Because multi-step workflows can succeed silently at every individual step while still failing at the outcome level, catching these compounding failures requires watching the full trace and grouping patterns of correlated deviations together, something a tool built around component-level SLIs simply isn't positioned to do.
Behavioral signals belong in this layer too, as early warnings. The audit completeness SLO described earlier is only verifiable if this layer captures every required field on every governed run, since reconstructability, not logging volume, is the actual standard being measured.
One problem remains genuinely unsolved. Root cause attribution for reasoning errors, pinpointing exactly which context item, instruction, or earlier tool result caused an agent to produce a wrong plan, is not yet something production tooling handles reliably, even when the trace shows every step the agent took. Lemma audits every trace against an agent's own instructions and groups recurring failures into issues automatically, closing the gap between logging what happened and understanding whether what happened was actually correct, which is what makes a quality SLO enforceable.
Connecting error budgets to deployment gates for agent pipelines
An SLO framework without a deployment gate only describes failures after they've already reached users; it doesn't stop new ones from shipping. The error budget is what connects measurement to the decision of whether to release. The budget itself is simply the gap between the SLO target and perfect performance: if the outcome success target is set high, the budget is the share of runs allowed to fail before that target is breached, and spending it on a bad deploy costs exactly as much as spending it on an infrastructure incident.
For agent pipelines specifically, the error budget has to account for the compounding dynamic described earlier in this piece. The measurement window chosen earlier has direct consequences downstream too. If you run a tight, near-daily quality eval cycle, you catch a regression introduced early in the week before the next deploy window arrives, keeping the budget for the release that follows intact.
Embedding SLO monitoring directly into the CI/CD pipeline, so a quality SLO breach blocks a deploy the same way a failing test suite would, is the operational model that makes agent reliability something a team can actually enforce. Teams that define outcome-level SLOs, instrument the full pipeline trace, route alerts to the people who can actually fix the problem, and gate deployment on error budget consumption are in a position to ship agents with real confidence, because the team finally has a shared, measurable definition of "reliable enough" that surfaces failures before the people depending on the system have to find them first.


