Joining runtime, security, and evaluation in one agent architecture

← Back to Blog & Articles

The completed reference architecture is a small trusted runtime surrounding a replaceable decision component.

At ingress, an authenticated subject creates a run with a goal, authority envelope, risk tier, and budget. The context service assembles authorized evidence with provenance, freshness, trust labels, and data-flow restrictions. A model adapter returns typed proposals only; it cannot invoke tools or receive raw credentials.

The control plane validates schemas, evaluates policy, records audit events, collects approvals, enforces capabilities and kill switches, and schedules execution. The effect plane exposes narrow tools with contracts, idempotency keys, observation validation, credential brokering, sandbox profiles, and reconciliation. The evidence plane stores immutable events, checkpoints, evaluations, redacted telemetry, and retention metadata. These planes communicate with explicit identifiers and versions so that a run can be explained, replayed, paused, or recovered.

Operations close the loop. CI executes unit, property, security, simulation, and regression suites. Delivery promotes signed release units through canaries under outcome and safety gates. Production monitors correlate traces, metrics, logs, policy decisions, and tool receipts. Incident response can isolate scopes while preserving recovery evidence. Readers can run the core locally using free open-source components; Linux is the full isolation reference, but the laptop profile is portable and does not require macOS.

The architecture is deliberately not a claim that agents become safe by construction. It is a way to make uncertainty, authority, failure, and evidence explicit enough for engineers and operators to control. Every extension must preserve the central invariant: probabilistic reasoning may recommend an action, but independently verifiable software decides whether the action is authorized, safe enough, affordable, observable, and recoverable.

Continue with the book

Explore the full treatment, worked examples, and exercises in Building Production-Grade AI Agents.


Companion article for Building Production-Grade AI Agents, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.

Scroll to Top