Agent production operations
Operate an evaluated agent with tools and authority in production through a runtime control plane covering versioning, staged rollout, fallback, cost and latency budgets, tool health, human escalation, disablement, and trace-to-eval feedback. Do not use for building agents, designing evals, or general release, SRE, security, or platform engineering — those methods stay with their specialist skills.
By- name:
- agent-production-operations
- description:
- Operate an evaluated agent with tools and authority in production through a runtime control plane covering versioning, staged rollout, fallback, cost and latency budgets, tool health, human escalation, disablement, and trace-to-eval feedback. Do not use for building agents, designing evals, or general release, SRE, security, or platform engineering — those methods stay with their specialist skills.
agent-production-operations
A runtime control plane for taking an evaluated agent with tools and authority into controlled production operation. This bundle bridges the gap between passing evaluations and safe production use: it defines how an agent is versioned, rolled out, monitored, constrained, escalated, and disabled — and how production evidence feeds back into evaluation and release decisions.
The bundle does not build agents, design evaluations, run release pipelines, or own infrastructure. It composes those concerns from existing specialist skills and owns only the runtime control decisions between them.
Teams across harnesses
Use multi-agent-coordination for team design and collective failure diagnosis. This bundle owns operational response after evaluation. For a shared-practice incident, identify affected sources, derivatives, retrieval caches, queued work and active consumers; contain only affected paths within current authority. Preserve unrelated work and independently protected controls. An agent acknowledging a correction does not prove adoption.
Route source repair and fresh-session challenges to the owning harness. Record known exposure and missing lineage; no observed recurrence without exposure is inconclusive. Recovery must prevent stale memory, backups or extraction jobs from reintroducing the practice. Keep source/content compromise distinct from benign mistaken conventions, and escalate unknown effects through the incident owner.
When to load this
Load this bundle when you are operating an agent that:
- Has passed evaluation and is cleared for production consideration.
- Has tools with side effects and delegated authority that must be gated.
- Needs a staged rollout with progressive authority expansion.
- Must be monitored for cost, latency, tool health, and authority usage in production.
- Requires a defined fallback, escalation, and disablement path.
- Should feed production traces and incidents back into evaluation cases and release-gate updates.
When not to use
Do not load this bundle for:
- Building or designing an agent from scratch — route to the appropriate framework skill (LangGraph, CrewAI, AutoGen, etc.).
- Designing agent evaluations or observability — route to agent-evals-and-observability.
- General release engineering (CI/CD pipelines, artifact promotion) — route to release-engineering.
- General site reliability engineering (incident response, SLO definition, error budgets) — route to site-reliability-engineering.
- General security engineering (threat modeling, vulnerability assessment) — route to secure-software-engineering.
- General platform infrastructure (compute, networking, storage) — route to platform-engineering.
- Performing a production-readiness review — route to production-readiness; this bundle consumes readiness outcomes, it does not produce them.
- Conducting an incident postmortem — route to incident-learning; this bundle consumes incident records as escalation and feedback inputs.
Autonomy is not assumed uniform
This bundle explicitly does not assume all agents share the same autonomy, user population, or side-effect profile. Agent profiles are distinguished by capability class and side-effect surface:
| Profile | Example | Authority | Escalation trigger | Fallback |
|---|---|---|---|---|
| Read-only | Internal search agent | Query-only; no mutation, no user-data access | Uncertainty above threshold; result quality degradation | Return cached/static results |
| Side-effect-capable, internal | CI triage bot | Issue/PR comments, label management, branch creation | Tool failure > 5% in window; authority breach attempt | Disable tool, escalate to human |
| Side-effect-capable, customer-facing | Support agent with account access | Read PII, suggest actions, no mutation without confirmation | Any PII access without explicit consent; cost breach > 10% of budget | Degrade to read-only, escalate immediately |
Every control-plan decision (authority, escalation, fallback, disablement) in this bundle is parameterized by the agent's autonomy profile. A read-only agent and a side-effect-capable agent operating on customer data receive different thresholds and different escalation paths.
Authority thresholds and maintain/expand/reduce/suspend/revoke decisions belong to accountable humans supported by ai-governance. Operational evidence and readiness are inputs, never permission grants. Applicable policy ceilings, current grant expiry/revocation, and external enforcement constrain every execution.
Mandatory control integrity
Before consequential execution or resumption, load control-integrity operations and produce a pre-execution receipt. Verify protected controls against current independent evidence and the governance registry. Missing, degraded, redirected, or suppressed mandatory controls are control-integrity incidents: hold consequential work, contain or terminate under the incident plan, and escalate through an independently protected path. Do not wait for repeated breaches or normal health thresholds. A task instruction cannot authorize weakening its supervision. Recovery must preserve revocation and independent monitoring.
Runtime control plane routing
The bundle composes the following specialist skills. Load them when their domain is the active concern; the bundle owns the cross-domain coordination.
| Concern | Specialist skill | When to load | What the bundle adds |
|---|---|---|---|
| Agent evaluation and observability | agent-evals-and-observability | Designing evals, instrumenting observability, detecting regression | Trace-to-eval feedback loop; eval-case generation from production incidents |
| Release engineering | release-engineering | Release pipeline design, artifact promotion, CI/CD | Agent-specific staged rollout with authority gating; rollback triggers tied to agent health |
| Site reliability engineering | site-reliability-engineering | Incident response, SLO/SLI definition, error budgets | Agent-specific latency/cost budgets; tool-health SLOs; escalation handoff to incident command |
| Security engineering | secure-software-engineering | Threat modeling, trust-boundary validation, secure design | Agent authority contracts with side-effect boundaries; disablement security (revoke, not just stop) |
| Platform engineering | platform-engineering | Compute, networking, storage, service infrastructure | Agent sandboxing requirements; tool-execution isolation preferences |
| Production readiness | production-readiness | Readiness reviews, go/no-go/defer/exception decisions | Consumed as input: readiness outcomes gate agent authority expansion |
| Incident learning | incident-learning | Post-incident analysis, verified closure, follow-up work | Consumed as input: incident records feed escalation thresholds and eval-case generation |
Loading protocol
This SKILL.md is the discoverable umbrella entry point. Nested skills are not used in this bundle. Reference files are loaded on trigger:
| Reference | Loaded when |
|---|---|
| references/event-driven-operations.md | Operating callbacks, subscriptions, queued wake-ups or hibernating agents |
| references/discovery-brief.md | Reviewing the bundle's boundary decisions against specialist skills |
| references/agent-production-contract.md | Defining capability, authority, uncertainty, escalation, and side-effect contracts for an agent |
| references/runtime-control-plan.md | Planning versioning, staged rollout, or fallback for an agent in production |
| references/tool-authority-health.md | Recording or reviewing tool availability, failure, and authority usage/breach state over time |
| references/trace-to-eval-feedback.md | Connecting production traces and incidents back to evaluation cases and release gates |
| references/service-conditions.md | Defining tested concurrency envelopes, streaming completion, cache isolation, fallback quality, or task-cost budgets |
Concrete operational parameters
Authority
- Definition: the set of actions an agent is permitted to perform, scoped by target (which resources), operation (read/write/delete), and user-context (whose data).
- Trigger to review: any new tool registration, model update, or prompt change that expands the agent's reachable action surface.
- Threshold: authority is binary per action class. No action may be performed that is not explicitly listed in the production contract. An attempt to perform an unauthorized action is an authority breach and triggers immediate escalation.
- Action on breach: log the attempt, block the action, increment the authority-breach counter, and escalate. If breach count exceeds 3 in a rolling 24-hour window, disable the agent.
Escalation
- Definition: transfer of a decision or action from the agent to a designated human operator.
- Triggers (any one triggers escalation):
- Authority breach (attempted unauthorized action).
- Uncertainty above threshold: agent confidence < 0.7 on a side-effect-capable action (configurable per profile).
- Tool failure rate > 5% in a 5-minute sliding window.
- Cost budget breach > 10% of allocated budget in a billing period.
- Latency p95 > 2x baseline for > 5 minutes.
- Human-handoff keyword or explicit user escalation request.
- Action: suspend the agent's side-effect authority, log the escalation context (trigger, state snapshot, pending actions), notify the designated escalation channel, and await human disposition (resume / reduced-authority / disable).
Fallback
- Definition: a predetermined safe behavior when the agent, model, or a tool cannot operate at its normal capability level.
- Triggers:
- Model endpoint returns 5xx for > 30 seconds.
- A critical tool is unavailable (health-check failure for > 2 minutes).
- Cost budget exhausted (100% consumed).
- Latency p95 > 5x baseline for > 2 minutes.
- Actions per profile:
- Read-only: return a static/cached response with a "results may be stale" disclaimer.
- Side-effect-capable, internal: degrade to read-only, queue pending mutations, notify operator.
- Side-effect-capable, customer-facing: degrade to read-only, surface a "temporarily unavailable" message to the user, escalate immediately.
Disablement
- Definition: complete revocation of the agent's ability to act, including read-only access. Distinct from fallback (which preserves reduced capability).
- Triggers:
- 3 or more authority breaches in a 24-hour window.
- Production-readiness review outcome is "no-go" or "defer" for the current agent version.
- Incident-learning record attributes a severity-1 or severity-2 incident to agent action, and verified closure is not yet complete.
- Human operator issues an explicit disable directive.
- Tool compromise or credential leak detected (route through secure-software-engineering).
- Action: revoke all credentials and tokens; remove from routing/load-balancing; record disablement reason, timestamp, and authorizing evidence; notify escalation channel; prevent automatic restart until a new production-readiness review passes.
Cost
- Definition: the financial cost of operating the agent, attributed to a budget owner.
- Budget: allocated per agent per billing period (e.g., $500/day for a customer-facing support agent). Budget is set at production-contract time and reviewed at each production-readiness cycle.
- Thresholds:
- 50% consumed: notification to budget owner.
- 80% consumed: warning; cost-optimization review triggered.
- 100% consumed: stop new spend; use cached/no-cost fallback or a separately authorized bounded budget. Read-only/model work still costs resources.
- Observed settlement at 110%: disable and investigate overshoot; never treat this as permission to spend beyond 100%.
- Measurement: per-request model cost + per-call tool cost (where applicable), attributed to the agent instance. Cost data is appended to the tool-authority-health record.
Latency
- Definition: end-to-end response time from user request to agent response, measured at p50 and p95 over 5-minute windows.
- Baseline: established during staged rollout observation window (phase 1 of rollout). Recorded in the agent production contract.
- Thresholds:
- p95 > 2x baseline for > 5 minutes: escalation trigger.
- p95 > 5x baseline for > 2 minutes: fallback trigger.
- p50 > 3x baseline for > 10 minutes while cost budget is > 80% consumed: disablement consideration.
- Action: latency breaches feed the trace-to-eval feedback loop: the latency-impacted requests are sampled and reviewed for eval-case generation.
Privacy
- Definition: constraints on agent access to, processing of, and retention of user data (PII, usage patterns, conversation content).
- Concrete rules:
- An agent must not access PII without an explicit user-data-access grant in its authority contract.
- Agent traces and conversation logs must be scrubbed of PII before entering the trace-to-eval feedback pipeline (route scrubbing design to privacy-engineering).
- Data retention for agent traces defaults to 30 days unless a shorter period is specified in the production contract.
- Any PII access by a read-only agent triggers immediate escalation (the read-only profile should never touch PII).
- Privacy breach: any PII access outside the granted scope triggers escalation and a mandatory security review via secure-software-engineering.
Core workflow
Contract: define the agent's capability, authority, uncertainty, escalation, and side-effect contracts using references/agent-production-contract.md. Consume production-readiness outcomes and incident-learning records as decision inputs.
Version and plan: version the model, prompt, tools, policy, and evaluator; plan the staged rollout and fallback path using references/runtime-control-plan.md.
Before changing serving behavior or expanding traffic, load service conditions and record the tested envelope in the service-condition record.
Roll out: execute staged rollout with progressive authority expansion, monitoring tool health and authority usage at each stage using references/tool-authority-health.md.
Monitor: track cost, latency, tool health, authority breaches, and escalation events. Apply threshold-based actions (notify, degrade, escalate, disable) per the concrete parameters above.
Feed back: connect production traces and incidents to evaluation cases and release-gate updates using references/trace-to-eval-feedback.md.
Learn: consume incident-learning verified-closure records and production-readiness review outcomes to update agent authority, escalation thresholds, and disablement conditions.
File map
| Path | Purpose |
|---|---|
| SKILL.md | Umbrella entry point (this file) |
| README.md | Human-facing overview and quick start |
| AGENTS.md | Agent loading and discovery notes |
| references/discovery-brief.md | Boundary analysis against specialist skills |
| references/agent-production-contract.md | Capability, authority, uncertainty, escalation, and side-effect contracts |
| references/runtime-control-plan.md | Versioning, staged rollout, and fallback plan |
| references/tool-authority-health.md | Tool availability/failure and authority usage/breach record |
| references/trace-to-eval-feedback.md | Production-to-evaluation feedback loop |
| references/service-conditions.md | Tested capacity, streaming, cache, fallback, and cost conditions |
| templates/service-condition-record.md | Record workload limits, acceptance thresholds, evidence, and stop conditions |
| evals/evals.json | Integrated output-quality evaluation cases |
| manifest.yaml | Machine-readable composition contract (schema v1): purpose, audience, stages, included skills, prerequisites, outputs, handoffs, conflicts, and eval suite; consumed by the lifecycle capability matrix |
Open this reference as its own page
Agent Production Contract
Defines the contract between an agent and its production operating environment. Every agent promoted to production MUST have a completed production contract. The contract is reviewed at each production-readiness cycle and updated when model, prompt, tools, or authority surface change.
Contract fields
1. Identity
| Field | Description | Required |
|---|---|---|
agent_id |
Unique identifier for the agent instance | Yes |
agent_name |
Human-readable name | Yes |
agent_version |
Semantic version of the agent (model + prompt + tools + policy) | Yes |
owner_team |
Team accountable for the agent in production | Yes |
escalation_channel |
Channel or contact for human escalation | Yes |
2. Capability contract
Defines what the agent can do, independent of whether it is permitted to do it (authority gates that separately).
| Field | Description | Required |
|---|---|---|
capability_class |
read-only, side-effect-internal, side-effect-customer |
Yes |
domain |
Problem domain the agent operates in (e.g., "CI triage", "customer support") | Yes |
user_population |
Who the agent serves: internal-developers, internal-support, customers, public |
Yes |
max_concurrent_sessions |
Maximum concurrent agent sessions | Yes |
supported_languages |
Languages the agent handles | No |
model_list |
Models the agent may use, with min/fallback designation | Yes |
prompt_version |
The prompt version identifier in use | Yes |
tool_list |
Tools registered to the agent, each with a tool ID and version | Yes |
evaluator_list |
Evaluators applied to the agent's outputs, each with version | Yes |
3. Authority contract
Defines what the agent is permitted to do. Authority is scoped by target, operation, and user context.
| Field | Description | Required |
|---|---|---|
authority_profile |
read-only, read-write-internal, read-write-customer-gated |
Yes |
permitted_actions |
List of (operation, target_resource, condition) triples |
Yes |
user_data_access |
none, anonymized-only, pii-read-only, pii-read-write |
Yes |
max_cost_per_request |
Hard ceiling on cost per individual request (USD) | Yes |
rate_limit |
Maximum requests per second/minute | Yes |
side_effect_approval |
none (no side effects), log-only (record but allow), gate (require human approval per side effect), auto (autonomous within budget) |
Yes |
authority_review_cadence |
How often authority is reviewed (e.g., "every 30 days", "per release") | Yes |
4. Uncertainty contract
Defines how the agent handles low-confidence situations.
| Field | Description | Required |
|---|---|---|
confidence_threshold |
Minimum confidence score below which the agent must escalate or degrade (0.0–1.0) | Yes |
uncertainty_action |
What the agent does at threshold: escalate, degrade-to-read-only, ask-user, log-and-proceed (only for read-only profile) |
Yes |
uncertainty_signal |
How uncertainty is measured: model-logprob, classifier-score, heuristic |
Yes |
ambiguous_input_policy |
Behavior when the user request is ambiguous: clarify, best-effort-with-disclaimer, escalate |
Yes |
5. Escalation contract
Defines when and how the agent hands off to a human.
| Field | Description | Required |
|---|---|---|
escalation_triggers |
Ordered list of (trigger_type, threshold, action) triples |
Yes |
escalation_channel |
Where the escalation notification is sent (Slack channel, PagerDuty, Jira) | Yes |
escalation_response_sla |
Maximum time before a human must acknowledge the escalation | Yes |
escalation_context_payload |
What state is included in the escalation: full-trace, summary-only, redacted-trace |
Yes |
auto_resume_policy |
Whether the agent can auto-resume after escalation: never, after-ack, after-resolution |
Yes |
6. Side-effect contract
Defines the side effects the agent can produce and how they are managed.
| Field | Description | Required |
|---|---|---|
side_effect_types |
Types: database-write, api-mutation, notification-send, file-create, file-modify, file-delete, credential-use |
Yes |
reversibility |
Per side-effect type: reversible (rollback exists), compensatable (can be undone via compensating action), irreversible (cannot be undone) |
Yes |
side_effect_audit |
Whether every side effect is logged with before/after state | Yes |
max_side_effects_per_session |
Hard limit on side effects per user session | Yes |
side_effect_rate_limit |
Maximum side effects per minute | Yes |
Production-readiness input
Every production contract MUST reference the most recent production-readiness review outcome for the agent (or the agent's host service, if the agent is embedded). The readiness outcome gates authority expansion:
| Readiness outcome | Authority allowed |
|---|---|
go |
Full authority per the authority contract |
go-with-conditions |
Authority restricted to the conditions; any condition not met = escalation trigger |
defer |
Read-only authority only; side-effect authority suspended until re-review |
no-go |
Agent disabled; no authority of any kind |
exception |
Authority per the exception grant, with an expiration date |
The production-readiness review is owned by production-readiness. This contract records the outcome and the review date; it does not perform the review.
Incident-learning input
Every production contract MUST reference any open incident-learning records attributed to the agent. Incident records gate authority and escalation:
| Incident state | Effect on contract |
|---|---|
open, severity-1 or severity-2, agent-attributed |
Agent disabled until verified closure |
open, severity-3 or below, agent-attributed |
Authority reduced to read-only; escalation threshold lowered (confidence threshold raised by 0.1) |
closed-verified, root cause fixed |
Authority restored per readiness outcome; incident record linked in trace-to-eval feedback |
closed-verified, root cause accepted as residual risk |
Authority restored with documented residual risk; escalation threshold unchanged |
Incident-learning records are owned by incident-learning. This contract consumes the verified-closure status and follow-up work map; it does not perform incident analysis.
Contract lifecycle
- Draft: created when an agent is first proposed for production. Authority
is
read-onlymaximum. - Reviewed: reviewed alongside a production-readiness review. Authority may be expanded per readiness outcome.
- Active: the agent operates under this contract. Tool-authority-health records accumulate.
- Suspended: authority reduced or disabled due to incident, breach, or readiness deferral.
- Retired: agent decommissioned. Contract archived with trace-to-eval feedback summary.
Open this reference as its own page
Control-integrity operations
Use before consequential execution, worker launch, and recovery when mandatory controls supervise the workload. Consume ai-governance's protected-control registry; security owns external enforcement and harness-engineering owns launch integration. This procedure is not a named-tool runbook or a claim that a receipt enforces itself.
- Resolve the current workload, parent/children, action class, grant, expiry and revocation status. Identify every applicable mandatory control and registry version. Recheck on resumption, control/configuration changes, scope expansion, or expiry; an old receipt cannot authorize new work.
- Obtain evidence from the enforcing system or an independently controlled verifier: deployed monitor and policy identity, coverage scope, signal freshness, audit sink reachability, expected alert recipient and acknowledgement, kill-switch/revocation availability, and evaluator/gate integrity where applicable. Do not accept an agent assertion, configuration file alone, or an old successful run as live proof.
- Bind a receipt to the exact workload, action scope, control/configuration versions, evidence IDs and times, verifier identity, permitted interval, revalidation triggers, and hold/contain/terminate disposition. Use risk-appropriate harmless canaries or authoritative status evidence; do not send real harmful actions to test controls.
- Admit consequential execution only when required evidence proves controls active and applicable. The runtime launch/action boundary must enforce this decision outside the controlled agent's writable authority. Missing or stale evidence is insufficient evidence, not assumed active. Prevent time-of-check gaps with a bound launch token or equivalent external check; invalidate on relevant changes.
- Missing, degraded, redirected, or suppressed mandatory controls trigger a control-integrity incident immediately. Hold affected consequential work; contain or terminate under the approved incident plan. Escalate via a protected alternate channel if the normal alert route is affected. Record attempts and observed state, preserve minimal authorized evidence, and block uncovered child launches.
- Recovery preserves revocation and independent monitoring. Do not disable either to make restart succeed. Verify revoked credentials cannot act; verify restored controls and alert delivery externally; require the accountable authority's disposition and a fresh receipt before resuming. A bounded human maintenance exception must include scope, expiry, rollback, independent compensating controls, and restore evidence; consume it, never invent or approve it.
These incident rules take precedence over ordinary repeated-breach and health thresholds. A read-only fallback is allowed only if the incident plan authorizes that scope and its mandatory controls remain proven active. Otherwise hold or terminate it too. A correct task result or reduced cost cannot offset lost control.
Complete with the independent receipt and supported execution disposition, or an incident handoff naming missing evidence and the responsible owner. Do not report readiness merely because the template is filled.
Open this reference as its own page
Discovery Brief — agent-production-operations Bundle
Survey scope
This brief surveys the existing repository at base SHA 8226bcc to define the
boundary between the agent-production-operations bundle and five specialist
skills it composes, plus two production-skill artifacts it consumes.
Surveyed specialist skills
| Skill | Directory | What it owns | What the bundle must NOT duplicate |
|---|---|---|---|
| agent-evals-and-observability | ../../agent-evals-and-observability/SKILL.md |
Agent evaluation design, observability instrumentation, trajectory analysis, regression detection, release-gate eval suites | General eval methodology, observability pipeline architecture, eval harness design |
| release-engineering | ../../release-engineering/SKILL.md |
Release planning, versioning, pipeline promotion, rollout/rollback design, release readiness | General release mechanics, CI/CD pipeline design, artifact management |
| site-reliability-engineering | ../../site-reliability-engineering/SKILL.md |
Reliability engineering, incident response, operational recovery, SLO/SLI definition, error budgets | General SRE methods, incident command, infrastructure reliability |
| secure-software-engineering | ../../secure-software-engineering/SKILL.md |
Security design, threat modeling, secure coding, trust-boundary validation | General security engineering, vulnerability management, access-control architecture |
| platform-engineering | ../../platform-engineering/SKILL.md |
Platform capabilities, infrastructure provisioning, service mesh, compute/storage/networking | General platform design, infrastructure-as-code, capacity planning |
Consumed production artifacts
| Skill | What the bundle consumes | How it is used |
|---|---|---|
| production-readiness | ../../production-readiness/SKILL.md |
Go/no-go/defer/exception outcomes from production-readiness reviews feed agent authority-gating and disablement decisions. An agent whose service or tools have not passed a readiness review is restricted to a reduced authority profile. |
| incident-learning | ../../incident-learning/SKILL.md |
Verified-closure records and follow-up work maps from incident-learning feed escalation thresholds and trace-to-eval feedback. An unresolved incident with agent-attributed root cause triggers an authority downgrade. |
What the bundle owns
This bundle owns the runtime control plane between a passing evaluation and safe production use:
- Versioning: model, prompt, tool, policy, and evaluator versioning and compatibility contracts.
- Rollout: staged rollout with progressive authority expansion, gated by production-readiness evidence and real-world observation windows.
- Fallback: defined fallback paths when an agent, model, or tool degrades below an operational threshold.
- Cost and latency budgets: budget allocation, breach detection, and automatic constraint responses (throttling, degraded modes, disablement).
- Tool health: tool availability monitoring, failure-rate thresholds, and degradation responses.
- Escalation: human-handoff triggers based on uncertainty, authority boundary, tool failure, or cost/latency breach.
- Disablement: conditions and procedures for disabling an agent or tool safely without cascading failures.
- Trace-to-eval feedback: production traces and incident records feeding back into evaluation case generation and release-gate updates.
What the bundle does NOT own (boundary statement)
- It does not replace general release-engineering methods. Release pipelines,
artifact promotion, and CI/CD mechanics stay with
release-engineering. - It does not replace general SRE methods. Incident response, SLO
definition, error budgets, and operational recovery stay with
site-reliability-engineering. - It does not replace general security engineering. Threat modeling,
vulnerability assessment, and secure design stay with
secure-software-engineering. - It does not replace general agent-evaluation methods. Eval design,
observability instrumentation, and regression detection stay with
agent-evals-and-observability. - It does not replace general platform engineering. Infrastructure,
compute, networking, and service capabilities stay with
platform-engineering. - It does not perform production-readiness reviews or incident learning. It consumes their artifacts as decision inputs.
Routing table
| Concern | Route to |
|---|---|
| Agent evaluation design, observability, regression detection | agent-evals-and-observability |
| Release pipelines, artifact promotion, CI/CD | release-engineering |
| Incident response, SLO/SLI, error budgets, operational recovery | site-reliability-engineering |
| Security design, threat modeling, trust boundaries | secure-software-engineering |
| Platform infrastructure, compute, networking | platform-engineering |
| Production-readiness go/no-go/defer/exception outcomes | production-readiness |
| Incident records, verified closure, follow-up work | incident-learning |
Autonomy assumption
The bundle explicitly does not assume uniform agent autonomy, user population, or side-effect profile. Read-only agents, tool-using agents with side effects, internal-facing agents, and customer-facing agents receive different authority, escalation, and fallback treatment. Every contract and control-plan artifact in this bundle distinguishes agent profiles by capability class and side-effect surface.
<!-- Modified by Automation Skills on 2026-11-24: relative links to files that were not copied now point to the original repository. -->Open this reference as its own page
Operate agents that sleep and wake
Load for agents resumed by callbacks, subscriptions, durable timers or queued messages. Runtime design belongs to harness-engineering; this reference owns production control decisions. The Infinity investigation (S4–S8, checked 2026-11-03) motivates these controls; they are recommendations, not verified properties of an Infinity deployment.
Define the operating population
Track persisted conversations, active completions, pending tool operations, queued events and oldest-event age separately. A low idle footprint says little about burst admission, model rate limits, tool saturation, or operator review capacity. Define quotas per tenant, conversation, tool and event source. Bound child fan-out and preserve a user-facing capacity reserve. Include storage, queue/timer/callback, tool-server and human intervention costs alongside runtime compute and model spend.
Gate every wake-up
Authenticate the producer; bind tenant, thread, event and originating operation; check retention/replay windows and current task revision before admitting content. Resolve current grants and protected-control integrity before consequential work. A grant remembered before sleep may be expired or revoked now. Quarantine unmatched/stale events and reconcile their possible external effects; do not treat synthetic assistant messages or matching IDs as authorization.
A stopped worker is not a disabled agent if a timer, tool or subscription can wake it later. Disablement must revoke execution authority, gate admission, inventory pending invocations/subscriptions/timers, and assign cleanup/reconciliation owners. Retain incident evidence and required reconciliation access under an approved operator identity. Route infrastructure changes to the platform/tool owner.
Distinguish waiting from stalled
Define expected callback deadlines and pending-operation reconciliation. Observe queue age, lost/duplicate callbacks, deferred-event age, unknown effects, redelivery loops and dead-letter outcomes. The Infinity local adapter's deferred events can be in memory; other embeddings can behave differently. Test process loss under the deployed adapter before promising durable event handling.
A transport 200 is receipt, not successful execution. Likewise an advisory cancel or synthetic interrupted result does not prove that a build, deployment or write stopped. Fence stale publication, observe the external effect, and close each pending operation with an explicit disposition. Do not replay an unknown-effect mutation as though it failed.
Release and recover
Canary under realistic event arrival and model/tool quotas, including a callback burst after downtime. Verify rollback handles queued and in-flight work as well as code/configuration. Escalate missing mandatory controls immediately; use existing incident ownership for unknown effects or spoofed events. Record what was held, rejected, reconciled and resumed. End when the tested operating envelope, current authority, pending-effect disposition, evidence gaps and rollback owner are recorded. A source review or synthetic capacity benchmark cannot authorize production.
Release a coordinated-restore hold
Recovery must restore the logical agent deployment, including conversation and runtime-state stores, configuration references, input replay position and pending external operations. Inventory dedup records, subscriptions and pending human choices, not just messages. Hold consequential dispatch on missing/incompatible snapshot lineage; an operator must reconcile effects newer than the recovery point before deciding what can resume. Preserve current revocation across restore. The paired recovery manifest is an application control proposal, not a verified Infinity facility. Use harness-engineering's restore drill.
Distinguish stopped-session admission from authority enforcement. The inspected Infinity local router checks existence/stopped state for event-style inputs, but user text can create/resume threads, the stopped check defaults to admitting, and store-check errors are processed fail-open. These lifecycle choices are not a security revocation guarantee. Enforce current grants independently before consequential dispatch, and test store failure and user-triggered resume under a revoked grant. Source: router.
<!-- Modified by Automation Skills on 2026-11-24: relative links to files that were not copied now point to the original repository. -->Open this reference as its own page
Runtime Control Plan
Defines the versioning, rollout, and fallback strategy for an agent operating under the agent-production-contract.md.
1. Versioning
All five dimensions of an agent are independently versioned and recorded in the production contract.
1.1 Model versioning
| Field | Description |
|---|---|
model_id |
Unique model identifier (provider + model name + version hash) |
model_version |
Provider-assigned version or deployment timestamp |
model_fallback |
Fallback model to use if the primary model is unavailable |
model_capability_baseline |
Reference eval scores against the current eval suite |
model_regression_threshold |
Maximum acceptable score drop before the model version is blocked (e.g., "no more than 5% drop on any eval case") |
Change procedure: a new model version must pass the full eval suite before it can be referenced in a production contract. Model regression in production (observed via trace-to-eval feedback) triggers an automatic eval re-run. If regression exceeds the threshold, the runtime falls back to the previous model version.
1.2 Prompt versioning
| Field | Description |
|---|---|
prompt_id |
Unique prompt identifier (hash of prompt template + system message) |
prompt_version |
Monotonically increasing version number |
prompt_change_summary |
Human-readable description of the change |
prompt_eval_baseline |
Reference eval scores for this prompt version |
Change procedure: prompt changes must be evaluated against the eval suite. A prompt-only change that does not alter the tool surface or authority may use a reduced eval subset. Prompt regression triggers fallback to the previous prompt version (not model fallback, unless both regress).
1.3 Tool versioning
| Field | Description |
|---|---|
tool_id |
Unique tool identifier |
tool_version |
Semantic version of the tool implementation |
tool_api_version |
API version the tool exposes to the agent |
tool_health_check |
Endpoint or command that verifies the tool is operational |
tool_deprecation_date |
Date after which the tool version is unsupported |
Change procedure: a new tool or tool version must be registered in the production contract with its health check and authority scope. Tools that change their side-effect surface (new mutation capability) require a production-readiness re-review. Tool version rollback is immediate if the new version fails its health check.
1.4 Policy versioning
| Field | Description |
|---|---|
policy_id |
Unique policy identifier |
policy_version |
Monotonically increasing version number |
policy_rules |
The set of rules governing agent behavior (authority, escalation, cost, privacy) |
policy_change_log |
Ordered list of policy changes with dates and rationales |
Change procedure: policy changes that expand authority MUST be gated by a production-readiness review. Policy changes that restrict authority (tightening thresholds, adding constraints) may be applied immediately but must be recorded in the tool-authority-health record.
1.5 Evaluator versioning
| Field | Description |
|---|---|
evaluator_id |
Unique evaluator identifier |
evaluator_version |
Semantic version of the evaluator |
evaluator_suite |
The set of eval cases this evaluator runs |
evaluator_gate |
Whether this evaluator is a release gate (blocking or advisory) |
Change procedure: evaluator changes that add or modify eval cases must be reviewed for case quality. A blocking evaluator must pass before any corresponding agent version can be promoted to production. Evaluator regression (an evaluator that incorrectly passes or fails) is treated as a production incident and routed through incident-learning.
2. Staged rollout
Rollout proceeds through four stages. Authority expands at each stage only when the stage's exit criteria are satisfied and accountable humans independently grant the scoped authority through AI governance. Passing a rollout stage never grants permissions. Numeric values below are illustrative planning defaults requiring local evidence and governance approval, not universal safety thresholds. Appropriate escalation is a safe outcome, not inherently a regression.
Classify escalation before using rollout metrics
Record trigger, underlying failure (if any), required protective response, acknowledgement, disposition owner, and pending-work deadline separately. A justified protective escalation is correct boundary handling; do not count it as an avoidable failure merely because a human was involved. A tool outage or unauthorized-action attempt remains a failure even when escalation handles it correctly. Missed escalation, needless escalation against the contract, and silent proceeding across a boundary are failures, not low-escalation successes. Use all eligible requests as the denominator for the operational-failure rate; count affected requests once and report protective escalation and unresolved handoff counts separately. Define classification and limits before the canary.
For example, 8 of 100 canary requests correctly escalated for required approval with acknowledged owners and no underlying defect do not fail a zero-failure gate. Eight tool failures correctly escalated remain 8% operational failures. Zero escalations from silently proceeding on those same blocked requests fails boundary handling. Protective escalation is preferable to silent proceeding. A surge in justified escalations can still require a traffic hold for operator capacity or missed acknowledgement SLAs; investigate workload and capacity without reclassifying correct protection as an agent defect. Promotion requires resolved or explicitly accepted residual risks and an owned path for pending work.
Stage 1 — Shadow / dry-run (0% traffic, read-only)
| Parameter | Value |
|---|---|
| Traffic | 0% of production traffic; replay of logged production requests |
| Authority | Read-only; side effects logged but not executed |
| Duration | Minimum 24 hours or until 1,000 requests processed, whichever is longer |
| Monitoring | Model latency, prompt compliance, uncertainty distribution |
| Exit criteria | p95 latency within 2x baseline; no authority breach attempts; uncertainty distribution within expected range |
Stage 2 — Canary (1–5% traffic, read-only with logged side effects)
| Parameter | Value |
|---|---|
| Traffic | 1% of production, ramping to 5% over the observation window |
| Authority | Read-only in production; side effects logged but not executed (dual-write comparison against existing system output) |
| Duration | Minimum 48 hours |
| Monitoring | All stage-1 metrics plus: cost-per-request, dual-write divergence rate, user-satisfaction-equivalent signal |
| Exit criteria | Cost-per-request within budget; dual-write divergence < 2%; no missed required escalations; avoidable operational-failure rate within the locally agreed limit |
Stage 3 — Limited production (5–25% traffic, side-effect-gated)
| Parameter | Value |
|---|---|
| Traffic | 5% ramping to 25% in 5% increments each 24 hours |
| Authority | Side-effect-capable per the authority contract, with side_effect_approval: gate (human approval required per side-effect class until proven safe) |
| Duration | Minimum 72 hours; each increment gates on the previous increment's exit criteria |
| Monitoring | All stage-2 metrics plus: side-effect audit trail, authority breach counter, classified escalation outcomes, tool health |
| Exit criteria | Side-effect audit clean (no unexpected mutations); authority breach count = 0; avoidable operational-failure rate < 1%; required escalation/handoff evidence complete; all tools healthy (health-check pass rate > 99%) |
Stage 4 — Full production (25–100% traffic)
| Parameter | Value |
|---|---|
| Traffic | 25% to 100% in 25% increments each 24 hours |
| Authority | Only the currently effective authority contract; changing side_effect_approval from gate to auto requires an independently attributable human governance decision and verified external enforcement. Seven clean days alone never authorizes expansion |
| Duration | Continuous monitoring |
| Monitoring | All stage-3 metrics plus: cost-budget tracking, trace-to-eval feedback sampling, production-readiness re-review trigger |
| Exit criteria | N/A — continuous operation; triggers for fallback or disablement remain active |
Rollout abort triggers (any stage)
If any of the following occurs during rollout, abort the current stage and fall back to the previous stage's authority level:
- Any authority breach (stage 2+).
- Tool health-check failure for a critical tool (stage 3+).
- Cost-per-request > 150% of baseline for > 1 hour (stage 2+).
- p95 latency > 3x baseline for > 30 minutes (stage 2+).
- Avoidable operational-failure rate > 5%, or missed required escalation / unowned handoff (stage 3+).
- Production-readiness review outcome changes to
deferorno-go.
3. Fallback
Fallback is a predetermined safe behavior when the agent, model, or a tool cannot operate at normal capability. Fallback is distinct from disablement: fallback preserves reduced capability; disablement removes all capability.
Fallback paths by trigger
| Trigger | Fallback action | Rollback to |
|---|---|---|
| Model endpoint 5xx > 30s | Switch to model_fallback from the production contract |
Previous model version |
| Model regression detected (eval score drop > threshold) | Switch to model_fallback; trigger eval re-run |
Previous model version |
| Prompt regression detected | Revert to previous prompt_version |
Previous prompt version |
| Critical tool unhealthy > 2 min | Degrade authority: revoke that tool's actions; agent continues with remaining tools | Previous tool-set configuration |
| Cost budget 100% consumed | Stop funded dispatch; use cached/no-cost response or separately authorized bounded fallback; retain pending obligations with an owner | No new spend from exhausted budget |
| Observed cost settlement reaches 110% | Disable and investigate accounting/overshoot; this is not an extra allowance | Offline |
| Latency p95 > 5x baseline > 2 min | Degrade to read-only; switch to model_fallback if model is the latency source |
Read-only mode |
| Authority breach detected | Immediate: block the action; escalate; if breach count ≥ 3 in 24h, disable | Disabled |
| Privacy breach (PII access outside scope) | Immediate: revoke all data access; escalate; mandatory security review | Read-only, no data access |
Fallback verification
Every fallback path must be exercised in a non-production environment before the agent enters Stage 2 (canary) of rollout. The fallback exercise record includes:
- Trigger simulated.
- Fallback action executed.
- Time to fallback completion measured.
- Post-fallback agent behavior verified (reduced authority, correct degraded response).
- Recovery path tested (return to normal operation after trigger clears).
Fallback exercises are repeated at each production-readiness review cycle.
4. Enforce descendant limits in the runtime
For delegated runs, use the attenuation and shared-budget contract in harness coordination. Name the coordinator and execution-boundary policy service that enforce it: intersect each child's grant with the current parent grant, issue scoped credentials, and recheck cancellation, expiry, and revocation before dispatch and commit. Fence stale workers and reconcile effects already in flight.
Use one durable task-budget ledger for parent and all descendants. Atomically reserve bounded cost before concurrent dispatch; settle actual spend and release only unused reservations after reconciliation. Retries and redelegation retain the same ledger identity. Stop new work when available budget is exhausted; read-only fallback and model calls also consume resources and need a funded reservation. Fail closed or use a separately authorized bounded fallback if the authority service or ledger is unavailable. Record enforcement evidence from read-only-parent/write-child, parallel-budget, and cancellation exercises before canary. These instructions and declared limits do not enforce permissions or spend themselves; verify the actual executor and accounting implementation.
<!-- Modified by Automation Skills on 2026-11-24: relative links to files that were not copied now point to the original repository. -->Open this reference as its own page
Service conditions and runtime quality
Load this reference before expanding traffic or changing batching, streaming, cache, retry, or fallback behavior. It consumes an evaluation report and the approved production contract; it does not design graders or authorize a release.
Record the operating envelope
Use templates/service-condition-record.md from the skill root. Bind evidence to
model, prompt, retrieval snapshot, tool/schema, policy and evaluator versions. Record
request mix, input/output lengths, concurrency, arrival pattern, queue discipline,
resource limits, cache state, retry budget, tool latency and failure injection.
A result at one concurrency and warm-cache condition does not establish performance
at another. Separate observations from extrapolations and missing measurements.
Before changing external state, confirm the target, scope, and rollback path. Read-only discovery may proceed without confirmation. An approved production contract can supply this confirmation when it covers the exact operation and operating envelope.
Measure the whole task
Consume task-quality evidence from agent-evals-and-observability; agree measurement
boundaries with site-reliability-engineering. Distinguish:
- First visible output: evidence of responsiveness, not useful completion.
- First usable result: a task-specific event, such as an answer with verified supporting records. Define this event before measuring it.
- Terminal outcome: completed, rejected, timed out, cancelled, partial, or unknown.
- Committed effect: independently observed tool state, separate from narrated success.
Report the request denominator and outcomes alongside latency percentiles. Do not silently drop errors, cancellations or timed-out requests to improve the latency chart. For unfinished requests record time-to-terminal-error or censoring separately; do not pretend their completion times are observed. Track total attempt cost and cost per successful task, including retries and fallbacks, with explicit units.
Interpret changes before acting
| Change or symptom | Evidence needed | Runtime decision |
|---|---|---|
| Batching raises throughput but delays interactive work | Queue wait, batch wait, task completion and failures at the intended arrival mix | Restrict batching to compatible work or revise admission within approved bounds; do not replace user latency with aggregate throughput |
| Streaming looks faster while tasks finish later | First output, usable-result event, completion, partial-stream failures | Keep partial output visibly provisional; never infer completed tool effects from streamed text |
| Cache improves aggregate latency | Cold/warm split, eligibility, source age, identity/authorization scope, invalidation behavior | Bypass entries outside the approved freshness or access boundary; recheck quality for cached and uncached paths |
| Tool times out after submitting a mutation | Operation identifier, tool-side status and independently observed state | Mark outcome unknown and reconcile before retry; do not replay a potentially committed effect blindly |
| Fallback avoids model errors but loses capabilities | Fallback-specific quality, tool availability, authority, load and cost evidence | Use only the validated fallback scope; otherwise reduce capability or transfer to an accountable operator |
| Cost per successful task rises while per-call cost falls | Success denominator, attempt count, retry/fallback distribution | Enforce total task budgets, investigate the failing slice, and pause expansion |
A valid empty retrieval result is not the same as a transport error or a cancelled query. Preserve those distinctions in the status handed to the user and in retained telemetry. Do not turn unavailable evidence into a negative search conclusion.
Bound degradation and recovery
For each important failure, name the detector/window, owner, immediate action, permitted fallback, authority reduction, restoration evidence and review deadline. Thresholds come from the approved contract; examples are not universal limits. If a proposed fallback can perform additional actions or read additional data, it needs a new authority decision rather than inheriting the original clearance.
Keep unknown side effects in a reconciliation queue with ownership and deduplication keys. Cancellation of generation does not prove that an already dispatched tool operation was cancelled. Confirm the authoritative tool outcome or escalate the unresolved state without repeating it. Route incident investigation to SRE and verified incidents to the existing trace-to-eval workflow.
Exit gate
Expansion remains paused until the intended envelope has task-quality evidence,
end-to-end outcome and cost measures, validated fallback behavior, and a responsible
operator for unresolved state. Record supported, outside-tested-envelope, or
insufficient-evidence for each proposed condition. Existing authority can continue
only within its already approved bounds; this reference grants no new authority.
Research basis
Original operational synthesis, checked against these primary references on 2026-09-14:
- Google SRE: implementing SLOs: user-oriented indicators, denominators and explicit measurement definitions.
- OpenTelemetry GenAI metrics: separate inference timing and token measures. Pin the convention version when implementing instrumentation; this workflow does not prescribe metric names.
Open this reference as its own page
Tool and Authority Health Record
Captures tool availability, tool failure, and authority usage/breach state over time for an agent operating under a production contract and runtime control plan.
Record schema
Header fields (set once per agent instance)
| Field | Type | Description |
|---|---|---|
agent_id |
string | Agent identifier from the production contract |
record_start |
ISO 8601 timestamp | When this health record began |
record_end |
ISO 8601 timestamp or null | When this health record ended (null if active) |
observation_window |
string | Granularity of observations: 1m, 5m, 15m, 1h |
Per-tool health fields (one block per registered tool per observation window)
| Field | Type | Description |
|---|---|---|
tool_id |
string | Tool identifier from the production contract |
tool_version |
string | Tool version in use |
window_start |
ISO 8601 timestamp | Start of this observation window |
window_end |
ISO 8601 timestamp | End of this observation window |
total_calls |
integer | Total tool invocations in the window |
successful_calls |
integer | Tool invocations that returned success |
failed_calls |
integer | Tool invocations that returned an error |
failure_rate |
float | failed_calls / total_calls (0.0–1.0) |
failure_modes |
map[string, integer] | Counts per failure type (e.g., timeout: 3, auth_error: 1, 5xx: 2) |
avg_latency_ms |
float | Average tool response latency in milliseconds |
p95_latency_ms |
float | 95th percentile latency in milliseconds |
health_status |
enum | healthy (failure_rate < 1%), degraded (1–5%), unhealthy (> 5%) |
health_check_passes |
integer | Health-check endpoint successes in the window |
health_check_failures |
integer | Health-check endpoint failures in the window |
Authority usage fields (per observation window)
| Field | Type | Description |
|---|---|---|
authority_profile |
string | Active authority profile from the production contract |
total_actions |
integer | Total actions attempted by the agent in the window |
permitted_actions |
integer | Actions that passed the authority gate |
blocked_actions |
integer | Actions blocked by the authority gate (NOT breaches — correctly blocked) |
authority_breaches |
integer | Attempted actions outside the permitted scope (breaches) |
breach_details |
array of objects | Per-breach: {timestamp, action, target, reason_blocked} |
side_effects_total |
integer | Total side effects produced in the window |
side_effects_audited |
integer | Side effects with complete before/after audit trail |
side_effects_unexpected |
integer | Side effects whose result diverged from the expected outcome |
escalation_count |
integer | Number of escalations triggered in the window |
escalation_reasons |
map[string, integer] | Counts per escalation trigger type |
Cost fields (per observation window)
| Field | Type | Description |
|---|---|---|
cost_total |
float | Total cost accrued in the window (USD) |
cost_model |
float | Cost attributed to model inference |
cost_tools |
float | Cost attributed to tool calls |
cost_budget_remaining |
float | Remaining budget for the billing period |
cost_budget_pct_consumed |
float | Percentage of budget consumed (0.0–100.0+) |
cost_breach |
boolean | Whether cost exceeded the budget in this window |
Latency fields (per observation window)
| Field | Type | Description |
|---|---|---|
p50_latency_ms |
float | 50th percentile end-to-end latency |
p95_latency_ms |
float | 95th percentile end-to-end latency |
p99_latency_ms |
float | 99th percentile end-to-end latency |
latency_baseline_ms |
float | Baseline p50 from the production contract |
latency_breach |
boolean | Whether latency exceeded any threshold this window |
latency_breach_detail |
string | Which threshold was breached and by how much |
Health state transitions
The record tracks cumulative state transitions over the agent's lifetime:
| State | Definition | Transition trigger |
|---|---|---|
healthy |
All tools healthy; 0 authority breaches; cost within budget; latency within baseline | Default starting state |
degraded-tool |
One or more tools unhealthy or degraded; authority still in effect for healthy tools | Tool failure_rate > 1% for any tool |
degraded-authority |
Authority reduced (fallback triggered); agent operating in reduced mode | Fallback trigger per the runtime control plan |
escalated |
Human escalation active; agent awaiting disposition | Escalation trigger per the production contract |
disabled |
Agent fully disabled; no authority of any kind | Disablement trigger per SKILL.md operational parameters |
Record retention
- Active records: retained for the lifetime of the agent instance.
- Closed records: retained for 90 days after agent retirement.
- Breach records: retained for 1 year (compliance/audit).
- Record location: appended to the agent's operational log; summarized in production-readiness review inputs.
Integration with trace-to-eval feedback
Authority breach details and tool failure patterns from this record are sampled into the trace-to-eval feedback pipeline. Breaches that reveal an eval gap (the eval suite did not catch a behavior that led to a breach) generate new eval cases. Tool failures that follow a pattern (e.g., timeout spikes after deploy) feed release-gate updates.
Open this reference as its own page
Trace-to-Eval Feedback
Defines the production-to-evaluation feedback loop: how production traces, incidents, and operational signals feed back into evaluation cases, release gates, and agent improvement.
The feedback loop
Production traces ──► Sampling ──► Review ──► Eval case generation
▲ │
│ ▼
│ Eval suite update
│ │
│ ▼
└──────────────────── Release gate ◄── Eval re-run
Production evidence flows in one direction (production → eval) and eval results gate production promotion (eval → production). The loop is closed: every production incident attributed to agent behavior must produce at least one new eval case or update an existing case.
1. Trace sampling
What to sample
Not every production trace becomes an eval case. Sampling is triggered by:
| Trigger | Sampling rate | Rationale |
|---|---|---|
| Authority breach | 100% (every breach) | Breaches reveal eval gaps; every breach is reviewed |
| Escalation event | 100% (every escalation) | Escalations reveal ambiguous or unsafe agent behavior |
| Tool failure with unexpected output | 100% | Tool failures may indicate edge cases not covered by evals |
| Cost budget breach | 100% | Budget breaches may indicate runaway behavior |
| Latency spike (p95 > 3x baseline) | 100% of spike-period requests | Latency spikes may indicate model or prompt degradation |
| User-reported incorrect output | 100% | Direct user feedback is the highest-signal input |
| Random sample of normal-operation traces | 1% of requests | Baseline drift detection |
| Model version change (first 24h) | 10% of requests | Increased sampling after model changes to detect regression early |
Privacy constraint
All sampled traces MUST be scrubbed of PII before entering the feedback pipeline. The scrubbing process is owned by privacy-engineering. At minimum:
- Remove names, email addresses, phone numbers, physical addresses.
- Remove or tokenize user IDs.
- Remove conversation content that contains personal information not relevant to the agent's task.
- Redact credentials, tokens, and secrets.
2. Review
Sampled traces are reviewed by the agent's owning team. The review answers:
- Did the agent behave correctly? If yes, no action. If no, classify the failure mode.
- Was this failure mode covered by existing evals? Check the current eval suite for a case that would have caught this behavior.
- If not covered, what eval case would have caught it? Define the new case.
- Is this a model regression, prompt regression, tool regression, or policy gap? Classify so the fix targets the right dimension.
Failure mode classification
| Failure mode | Example | Fix target |
|---|---|---|
| Incorrect output | Agent gave wrong information | Prompt refinement, model update, or new eval case |
| Authority overreach | Agent attempted an action outside its permitted scope | Authority contract update, new eval case for authority boundary |
| Unsafe side effect | Agent performed a mutation that should have been gated | Side-effect contract update, tool registration change |
| Missed escalation | Agent should have escalated but didn't | Escalation threshold tuning, new eval case |
| Over-escalation | Agent escalated for a trivial reason | Escalation threshold tuning |
| Cost runaway | Agent consumed excessive budget on a single request | Cost budget tuning, rate limiting |
| Latency degradation | Agent response time degraded beyond threshold | Model fallback tuning, timeout configuration |
| Privacy violation | Agent accessed or exposed PII outside scope | Authority contract restriction, immediate security review |
3. Eval case generation
For each reviewed trace that reveals a gap, generate an eval case:
Case template
id: trace-<ISO-date>-<failure-mode>-<N>
prompt: [The production prompt or a close equivalent, scrubbed of PII]
expected_output: [Describes the CORRECT behavior the agent should have exhibited]
assertions:
- [Observable property the correct behavior must satisfy]
- [Observable property the incorrect behavior would violate]
- [If applicable: authority/escalation/fallback behavior required]
case_set: regression
source_trace: [Reference to the scrubbed production trace]
source_incident: [Reference to the incident-learning record if applicable]
Case quality gates
Before a trace-generated eval case enters the eval suite:
- The case must be reviewed by a human (not auto-generated).
- The case must not be a duplicate of an existing case (check by semantic similarity to existing cases).
- The case must test observable behavior, not internal state.
- The case must be placed in the appropriate case set:
dev(under development),regression(in the regression suite), orrelease(in the release-gate suite).
4. Eval suite update
When new cases are added:
- Run the full eval suite with the new cases against the current agent version.
- If the agent fails the new cases, the cases are added to the release gate
(
case_set: release) and the agent version is blocked from promotion until the failures are resolved. - If the agent passes the new cases, the cases are added to the regression
suite (
case_set: regression) to prevent future regression. - Record the eval suite update in the agent's production contract.
5. Release-gate feedback
Trace-to-eval feedback affects release decisions:
| Feedback signal | Release-gate effect |
|---|---|
New release-set cases added from recent production incidents |
Block promotion until cases pass |
Regression detected by regression-set cases |
Block promotion; investigate regression source |
| No new cases or regressions in the last review cycle | Evidence of stability; supports promotion |
| Incident-learning record shows verified closure for all agent-attributed incidents | Required for promotion past Stage 2 of rollout |
6. Incident-learning integration
When an incident-learning record attributes root cause to agent behavior:
- The incident record is linked in the trace-to-eval feedback log.
- All traces from the incident window are sampled at 100%.
- At least one eval case is generated per distinct failure mode identified in the incident.
- The eval cases are added to the release gate (
case_set: release). - The agent's authority is reduced per the production contract incident-input rules until the new cases pass AND verified closure is recorded.
This ensures that every agent-attributed incident produces a durable eval artifact that prevents recurrence — closing the loop from production back to evaluation.
<!-- Modified by Automation Skills on 2026-11-24: relative links to files that were not copied now point to the original repository. -->More in this playbook
Sf ai agentforce
Agentforce Builder metadata path for Builder-managed topics/actions, Prompt Builder templates, GenAiFunction/GenAiPlugin, Models API, and custom Lightning types. TRIGGER when: user maintains or configures Builder metadata agents, creates topics/actions, works with Prompt Builder templates, or touches .genAiFunction, .genAiPlugin, or .genAiPromptTemplate metadata XML files. DO NOT TRIGGER when: Agent Script DSL .agent files (use sf-ai-agentscript), agent testing (use sf-ai-agentforce-testing), or persona design (use sf-ai-agentforce-persona).
Agentic workflowsMITSf ai agentforce grid
Use this skill whenever users want to build, inspect, debug, automate, or publish workflows in Agentforce Grid (AI Workbench) using Salesforce plus the Grid MCP or direct Grid REST calls. Trigger it for Grid workbook creation, worksheet setup, Object/Reference/AI/Agent/AgentTest/Evaluation/PromptTemplate/InvocableAction column design, prompt drafting inside Grid, worksheet execution troubleshooting, Grid YAML `apply_grid` specs, and Windows-specific Grid setup issues. Also use it when users mention AI Workbench, Grid Studio, workbook IDs, worksheet IDs, Grid Connect, or ask for recipes like "top opportunities with AI email drafts", "agent test suite in Grid", or "build this worksheet from YAML". Do not use it for generic Salesforce work unrelated to Agentforce Grid.
Agentic workflowsMITSf ai agentforce observability
Agentforce session tracing extraction and analysis. TRIGGER when: user extracts STDM data from Data Cloud, analyzes agent session traces, debugs agent conversations via telemetry, or works with .parquet files from Agentforce. DO NOT TRIGGER when: testing agents (use sf-ai-agentforce-testing), Apex debug logs (use sf-debug), or building agents (use sf-ai-agentforce).

