Phase 14: Agent Engineering

The Actor Model for Agents — Async Messages and Typed Runtimes

Agents as actors: async message exchange, event-driven handlers, fault isolation, natural concurrency. AutoGen v0.4 (Microsoft Research, Jan 2025) redesigned agent orchestration around this model; the framework is now in maintenance mode, with Microsoft Agent Framework (public preview Oct 2025) as its production successor. Describe the actor model: agents as actors, messages as the only IPC, failure isolation per actor. Name AutoGen v0.4's three API layers — Core, AgentChat, Extensions — and what each is for. Explain why decoupling message delivery from handling gives fault isolation and natural concurrency. Implement a stdlib actor runtime in Python and port a two-agent code-review flow onto it. Most agent frameworks are synchronous: one agent produces, one agent consumes, in a call stack. Failures crash the stack. Concurrency is bolted on. Distribution requires rewriting. AutoGen v0.4's answer: the actor model. Each agent is an actor with a private inbox. Messages are the only interaction. The runtime decouples delivery from handling. Failures isolate to one actor. Concurrency is native. Distribution is just different transport. An actor has: A private state (never directly touched from outside). An inbox (message queue). A handler: receive(message) -> effects where effects can be "reply," "send to other actor," "spawn new actor," "update state," "stop self.". Two actors cannot share memory. They can only send messages. AutoGen v0.4 splits its surface into…

The Actor Model for Agents — Async Messages and Typed Runtimes: Agents as actors: async message exchange, event-driven handlers, fault isolation, natural…

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.