Advanced Patterns
Extensibility and integration patterns for production agents: plugins, MCP, hooks, and observability.
Command and Plugin Systems
How to build a scalable command registry that supports 100+ commands through metadata-first registration, lazy loading, and multi-source merging.
Hooks and Extension Points
How typed interceptors modify agent behavior at 27+ lifecycle events without touching core loop code: four execution modes, condition syntax, and error isolation.
MCP Integration
How the Model Context Protocol turns external services into agent tools: transport selection, tool bridging, and connection lifecycle management.
Observability and Debugging
Three independent observability layers for agent systems: structured event logging, per-model cost tracking, and session tracing with span hierarchy, each answering a different debugging question.
The Advisor Strategy
How to boost agentic task performance without running a frontier model end-to-end: pair a fast executor (Sonnet/Haiku) with an Opus advisor that intervenes only at decision points.