Phase 14: Agent Engineering

Production Runtimes: Queue, Event, Cron

Production agents run on six runtime shapes: request-response, streaming, durable execution, queue-based background, event-driven, and scheduled. Pick the shape before you pick the framework. Observability is load-bearing at every shape. Name the six production runtime shapes and match each to a framework / product pattern. Explain why durable execution (LangGraph) matters for long-horizon tasks. Describe the event-driven runtime and when Claude Managed Agents fits. Explain the observability-as-load-bearing claim for multi-step agents. Production agents fail in ways a Jupyter notebook doesn't surface: network timeouts at step 37, user hangs up mid-voice call, cron job dies on machine reboot, background worker runs out of memory. The runtime shape determines which failures are survivable. Synchronous HTTP. User waits for completion. Only viable for short tasks (<30s). Stacks: Agno (Python + FastAPI), Mastra (TypeScript + Express/Hono/Fastify/Koa). Observability: standard HTTP access logs + OTel spans. SSE or WebSocket for progressive output. LiveKit extends this to WebRTC for voice/video (Lesson 22). Stacks: any framework with streaming support + a frontend that handles SSE/WS. Observability: per-chunk timing, first-token latency, tail latency. State checkpointed after every step; auto-resumes on failure. AutoGen v0.4 actor model isolates failures to one agent (Lesson 14). LangGraph's core differentiator (Lesson 13). Essential when step count is unknown and recovery cost is high. Job enters a queue, workers pick up, results flow back via…

Production Runtimes: Queue, Event, Cron: Production agents run on six runtime shapes: request-response, streaming, durable execution, queue-based background,…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.