Recipe · Recipes

Agent Runtime Cross-Cutting

Build the per-runtime substrate as named, composable patterns rather than reinventing it per agent product.

Description

The substrate every multi-step agent runtime needs underneath the agent logic itself: a uniform middleware chain for logging, rate-limiting, redaction, guardrails, and metrics; a composable termination contract covering both intrinsic stops (token budget, function call, text mention) and external signals; first-class pause/resume/cancel control surface for long-running runs; and tool-transition fusion to mine telemetry for composite tools.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.