What components does a production-ready AI agent need? At minimum: a scoped identity, approved context, durable workflow state, model and instructions, typed tools, enforceable policy, evaluation, observability, human escalation and named ownership. The model may choose a next step, but deterministic systems must still authenticate, authorize, validate, record and confirm important actions.
A reference architecture for production AI agents
The architecture below is intentionally vendor-neutral. It describes the control path that should exist whether the agent uses one model or several, a custom orchestration layer or an SDK, direct APIs or MCP-connected tools.
A run begins with an authenticated trigger and a bounded job. The agent receives only the context and tools allowed for that job. It selects or proposes a next step, while policy checks decide whether that step is permitted. The tool executes through a validated contract. The system then confirms the result, records the evidence and either continues, completes or escalates.
OpenAI's current agent documentation packages models, instructions, tools, guardrails, hand-offs and structured outputs as explicit runtime concepts. Its observability and evaluation guidance treats traces and workflow-level tests as first-class parts of the implementation. NIST's AI RMF adds the organizational layer: governance, mapping, measurement and management across the lifecycle. A dependable architecture needs both views.
The ten components and what “ready” means
| Component | Responsibility | Evidence of readiness |
|---|---|---|
| Identity | Separate service identity or delegated user identity, tenant boundary and authenticated initiator. | Every tool call is attributable; access is revoked when the job or user no longer qualifies. |
| Context | Minimum current records and approved knowledge needed for the case. | Sources are permission-filtered, freshness is visible and evidence can be cited. |
| Workflow state | Durable run status, completed steps, deadlines, retries, approvals and hand-offs. | A restart does not duplicate actions or lose ownership. |
| Model and instructions | The reasoning capability plus the job, constraints, output contract and stop rules. | Model choice is validated against representative cases, not selected by reputation alone. |
| Tools | Typed read and action interfaces to business systems. | Inputs are authorized and validated; writes are idempotent where possible; failures are explicit. |
| Policy and guardrails | Deterministic authorization, content and business-rule controls around model decisions. | Sensitive or unusual actions pause, block or escalate before execution. |
| Evaluation | Offline cases, online outcome checks and release gates. | Quality, task success, policy compliance and safety thresholds are measured by workflow segment. |
| Observability | Traces, logs, metrics, tool results, costs, corrections and business outcomes. | Operators can reconstruct what happened without exposing unnecessary sensitive reasoning. |
| Escalation | A designed hand-off with reason, evidence, current state and required decision. | The person receives enough context and authority to resolve the case. |
| Ownership | Named people responsible for workflow, systems, data, evaluation and incidents. | The agent can be changed, paused and retired through normal operational governance. |
1. Identity: every run and action needs a principal
An agent should never operate as an untraceable super-user. Decide whether it acts as a dedicated service identity, on behalf of an authenticated person, or through a carefully scoped combination. Bind each run to the organization, workspace or customer it belongs to. Carry that identity into every retrieval and tool call.
Authorization should happen at the action boundary, not only in a prompt. The model can request “update opportunity,” but application code must verify that this agent, for this user and this case, may update those exact fields. Do not give a broad credential to the model and rely on instructions to keep it within scope.
Use separate credentials for test and production. Rotate and revoke them through the normal identity system. Record which principal initiated the run and which service executed each action. This is the foundation for least privilege, auditability and incident containment.
2. Context: relevant, permissioned and current
Production agents need context from systems of record, maintained knowledge and the current workflow. More context is not automatically better. Minimize what the agent receives; filter records by identity and purpose; expose timestamps and source references; and prevent one customer or department from leaking into another.
Separate three kinds of context:
- Business state: current customer, order, invoice, project or ticket records.
- Knowledge: approved policies, procedures, product information and examples.
- Run state: what the agent has already attempted, observed, approved and deferred.
The source system remains authoritative. Retrieval should not create a shadow database with unclear retention. If the agent cannot establish that a source is current enough for the decision, it should ask, refresh or escalate.
3. Durable state: make the workflow resumable and idempotent
Agent runs often outlive a single model response. They wait for a customer, an approval, a scheduled time or an external system. Store workflow state outside the model conversation: run ID, current stage, completed actions, tool result references, deadlines, retry count, approval status and owner.
Every action needs a stable business key or idempotency key where the target supports it. If a timeout occurs after an update, the system must determine whether the action succeeded before retrying. Otherwise a recoverable network failure becomes a duplicate email, order, payment or record.
Define terminal states: completed, rejected, expired, cancelled, failed safely and handed to a person. A “still thinking” agent is not an operational state model.
4. Model and instructions: one component, not the whole system
The model interprets unstructured input, plans within the permitted workflow and produces structured decisions or outputs. Its instructions should define the job, relevant policies, action boundaries, required evidence, output schema, stop conditions and escalation rules.
Do not ask the model to enforce rules that application code can enforce exactly. Amount limits, role checks, allowed destinations, mandatory fields, duplicate checks and approval status belong in deterministic policy and validation. The prompt explains how to work; the system decides what can actually execute.
Choose the least costly model that passes the evaluation for each stage. Extraction, routing and complex exception analysis may need different capabilities. Changing the model is a release: rerun representative evaluations and inspect latency, cost and failure patterns before expanding traffic.
5. Tools: small contracts around real systems
Tools should expose business capabilities, not raw infrastructure. Prefer get current order, prepare refund request and schedule approved visit over unrestricted database or browser access. Give each tool a clear name, description, typed inputs, typed result, authorization rule and documented error modes.
Separate read, prepare, write, send, approve, pay and delete capabilities. The agent may need five read tools but only one draft-writing tool. Tool results should distinguish success, validation failure, authorization denial, transient failure and uncertain outcome so the agent can respond appropriately.
When an application lacks an API, browser automation may be necessary, but it increases fragility and evidence requirements. Constrain navigation, verify the intended record before action and capture a result the business can reconcile. The MCP business guide explains how standardized connections help discovery without replacing authorization or controls.
6. Policy and guardrails: enforce the operating boundary
Production guardrails are layered. Input checks can detect missing fields, unsupported file types or prompt injection. Policy checks can restrict tools, records, amounts and destinations. Output validation can enforce schema, required evidence and business rules. Human approval can protect high-consequence actions.
A guardrail must have an operational response: block, redact, request clarification, downgrade to draft-only, route to a person or stop the run. Logging a warning while the action continues is not a control.
OpenAI's agent guidance supports tool-level approvals and guardrails around agent runs. Treat these as application controls, not proof of safety by themselves. Threat-model the workflow, validate authorization outside the model, and test whether untrusted content can influence tool selection or arguments.
7. Evaluation: test decisions and outcomes, not eloquence
A production agent needs a versioned evaluation set drawn from the real workflow. Include ordinary cases, rare exceptions, missing context, conflicting records, outdated policy, unauthorized requests, tool failures and adversarial instructions. Protect the evaluation set from becoming a demo script that no longer reflects production.
Evaluate by segment:
- retrieval relevance and permission correctness;
- decision and routing accuracy;
- tool selection and argument validity;
- policy compliance and refusal behaviour;
- task completion and downstream business outcome;
- quality of escalation and evidence;
- latency, cost and reviewer effort.
Use deterministic checks where the answer is exact, human review for nuanced quality, and model-based graders only after validating that their judgments align with the workflow owner. Set release thresholds and explicit stop conditions. “Looks good in chat” is not an acceptance criterion.
8. Observability: reconstruct the run without guesswork
Operators need a trace that connects the initiating event, selected context, model request, decision, tool call, policy result, external response, retry, approval, final state and business outcome. Correlation IDs should follow the run across services.
Track technical metrics—errors, latency, token use, tool calls and retries—but also workflow metrics such as completion rate, exception rate, reviewer correction, reopened cases, duplicate prevention and the business measure the system was designed to improve.
Observability does not mean retaining every sensitive input or hidden reasoning artefact. Log the evidence needed for audit and support, apply access and retention controls, and redact secrets and unnecessary personal data. OpenAI's current documentation supports tracing and external observability integrations; the architecture still needs a business-level event model around those traces.
9. Escalation: a product feature, not a failure message
Escalation should transfer a workable case, not tell the user “contact support.” Define triggers: missing authority, conflicting policy, repeated tool failure, low confidence on a consequential decision, unusual value, customer distress, potential security incident or exceeded deadline.
The hand-off should contain the goal, current state, relevant evidence, actions already attempted, reason for escalation, deadline and exact decision required. Assign the case to a role or queue with a service level. Record the person's resolution so the workflow completes and future evaluations capture the edge case.
Keep a manual continuity path. If the agent or one tool is unavailable, the organization should still know how to complete urgent work. Resilience is not only automatic retry; it is the ability to operate safely without the agent.
10. Ownership: production is an organizational state
A technical deployment is not a production-ready business capability until people own its outcome, rules, systems, data, evaluation and incidents. One person may hold several roles in a small company, but the responsibilities must be explicit.
| Role | Owns | Decision right |
|---|---|---|
| Business owner | Outcome, risk tolerance, prohibited actions and value measure | Accepts operational accountability and expansion decisions |
| Workflow owner | Process rules, exceptions, service levels and manual continuity | Reviews cases, resolves ambiguity and owns day-to-day performance |
| System owner | Authentication, permissions, tool contracts, reliability and recovery | Maintains integrations and prevents uncontrolled access |
| Knowledge/data owner | Approved sources, quality, freshness, classification and retention | Corrects source problems and certifies access |
| Evaluation owner | Test set, graders, thresholds, regression cadence and release evidence | Determines whether behaviour is good enough for the scope |
| Incident owner | Alerts, triage, containment, communication and post-incident changes | Can pause the agent and restore a safe operating path |
NIST's Govern function emphasizes clear roles, responsibilities and lines of communication. That is practical architecture. Without an owner who can change scope, repair source data, revoke access or pause the agent, the system is not controllable.
Data flow for a bounded service agent
Consider an agent that prepares and, for low-risk cases, sends appointment confirmations:
- A scheduled event starts a run under the appointment-confirmation service identity.
- The policy service confirms that the clinic, user and channel are eligible.
- The context layer retrieves only the appointment, customer preference and approved message policy.
- The model classifies whether the case is ordinary or exceptional and returns a structured proposed action.
- Deterministic validation checks destination, consent, timing, required fields and prohibited content.
- Ordinary messages execute through a narrow send tool with an idempotency key; unusual cases create a draft for approval.
- The tool result is reconciled with the messaging provider, and the appointment record is updated.
- The trace records sources, policy version, proposed action, approval if any and confirmed outcome.
- Failures follow bounded retries; uncertain sends are checked before retry; unresolved cases enter the staff queue.
The model is important in step four, but production readiness is created by the full path.
Common failure states to design before launch
- Wrong identity or tenant: block before retrieval; never rely on the model to notice cross-customer data.
- Missing or stale context: refresh, ask or escalate; do not silently fill gaps.
- Prompt injection in retrieved content: treat external text as data, restrict tools and validate every action independently.
- Tool timeout after a possible write: reconcile by idempotency key before retrying.
- Conflicting policies: stop and route to the policy owner with both sources attached.
- Repeated low-confidence loop: cap attempts and hand off; more retries do not create authority.
- Evaluation regression after change: block release or roll back to the last accepted version.
- Monitoring outage: downgrade or pause actions that cannot be safely operated without evidence.
- Human queue overload: reduce volume or authority rather than hiding the backlog.
Production deployment checklist
- Job: outcome, trigger, completion, exclusions and prohibited actions are documented.
- Identity: every run and tool call is authenticated, tenant-bound and attributable.
- Context: sources are approved, permission-filtered, current and minimal.
- State: runs are durable, resumable, idempotent and explicitly terminal.
- Tools: contracts are narrow, typed, authorized, validated and failure-aware.
- Policy: hard limits execute outside the model; high-risk actions require approval.
- Evaluation: representative normal, edge, failure and adversarial cases pass release thresholds.
- Observability: traces and business outcomes are visible with appropriate redaction and retention.
- Escalation: hand-offs reach a staffed owner with evidence and a service level.
- Recovery: retries, reconciliation, rollback, shutdown and manual continuity are tested.
- Ownership: workflow, systems, knowledge, evaluation and incidents have named decision makers.
- Economics: full operating cost and measured outcome are reviewed after limited launch.
Start with the smallest end-to-end slice that proves this operating system. The 30-day AI pilot plan provides a controlled route from baseline to limited launch, and the AI agent security checklist adds a focused access and threat review.
The production test is control under imperfect conditions
A demo shows that a model can complete a happy path. Production readiness shows that the organization can operate the agent when data is incomplete, instructions conflict, a tool fails, a person needs to intervene or the system changes.
The architecture should make each responsibility visible. Identity establishes who is acting. Context establishes what the system may know. Policy establishes what it may do. Evaluation establishes what evidence is good enough. Observability establishes what happened. Escalation and ownership establish who takes responsibility when the workflow meets reality.
Primary sources checked
Checked 31 August 2026. OpenAI product details can change; implementation should follow the current official documentation.
- OpenAI Developers — Agent definitions
- OpenAI Developers — Guardrails and human review
- OpenAI Developers — Integrations and observability
- OpenAI Developers — Evaluate agent workflows
- NIST — AI Risk Management Framework
- NIST — Generative AI Profile
Review the complete control path
Request a production agent architecture review
I will map one proposed agent across identity, context, tools, policy, evaluation, observability, escalation and ownership—then identify the gaps between a working demo and a controllable production system.
Request an architecture review