Architecture · Execution · Evaluation
The engineering behind reliable agents.
Define what an agent can do. Understand how it makes decisions. Build the controls that keep its execution accountable.
Start with the architecture
Define the agent, its responsibilities and the runtime around it.
Your model is not your runtime: where the harness belongs
Separate model reasoning from the runtime that controls tools, state and delivery.
Architecture guide05Define an agent before designing its harness
Separate the agent specification, execution policy and independent success criteria.
Guide + Python exercise06ADK agent, runner and harness: who owns what?
Place the framework lifecycle inside application-owned identity, budgets and delivery checks.
Guide + Python exerciseMake the right handoff
Build teams, prepare routing data and decide when to abstain.
Design an agent team without creating a delegation loop
Use typed handoffs, capability checks and a shared budget to keep specialist teams accountable.
Guide + Python exercise08Build a small Markov agent router from transition counts
Calculate interpretable route scores, apply smoothing and preserve an explicit fallback.
Guide + Python exercise09Choose routing thresholds using error costs and abstention
Measure coverage and routing mistakes before promoting a faster decision path.
Guide + Python exercise10Prepare routing JSONL without teaching the router its own mistakes
Preserve label provenance and separate task families before evaluating routing updates.
Guide + Python exerciseUnderstand what went wrong
Trace execution, recover safely and recognise stalled progress.
The retry that charged twice: durable checkpoints for agents
Use durable checkpoints and idempotency to recover without repeating an effect.
Architecture guide04Trace the failure without turning the trace into the truth
Connect traces to independent outcome checks and investigate misleading success.
Architecture guide11Detect agent stalls using evidence of progress
Combine task-specific progress signals with global turn, time and redirect limits.
Guide + Python exerciseSet the boundaries for release
Control abuse, choose models and require evidence before promotion.
A self-improving harness needs a promotion gate it cannot edit
Keep evaluation and approval independent of the system proposing a change.
Architecture guide12Prevent agent abuse at the tool boundary
Enforce resource scope, exact-action approval and independent outcome verification.
Guide + Python exercise13Choose models using task evidence and hard constraints
Filter incompatible candidates before comparing measured quality, latency and cost.
Guide + Python exercise14Release an agent and its harness as one evaluated unit
Bind approvals to the complete execution configuration and preserve rollback evidence.
Guide + Python exerciseMake the example your own.
Each Python exercise includes an expected result and a change to try next. Run it locally, inspect the outcome, and test the assumptions.
Python 3.11 or newer · Standard library · No API key required
Exercises use synthetic data to demonstrate specific design principles. They are separate from the interactive application and do not deploy agents.