picoagents
Type: full-code · Vendor: Victor Dibia · Language: Python · License: MIT · Status: active · Status in practice: emerging
Teach the building blocks of production multi-agent systems through small, testable primitives.
Description. Minimal multi-agent framework published as companion code for Victor Dibia's book Designing Multi-Agent Systems (O'Reilly 2025). Pedagogic in scope but published on PyPI and actively maintained; demonstrates composable termination conditions, a pre/post/error middleware chain, and first-class interruptibility (cancellation + external signals) as separately-tested primitives.
Primary use cases
- Book companion code for working through multi-agent design exercises
- Reference implementation of composable termination and middleware contracts
Patterns this full-code implements —
- ★Composable Termination Conditions
Full termination package — MaxMessageTermination, TokenUsageTermination, TextMentionTermination, TimeoutTermination, HandoffTermination, ExternalTermination, CancellationTermination, FunctionCallTerm…
- ★Agent Middleware Chain
BaseMiddleware exposes process_request / process_response / process_error; MiddlewareChain runs the chain forward through process_request, then reverse through process_response.
- ★Interruptible Agent Execution
CancellationToken + CancellationTermination + ExternalTermination are first-class primitives. The cancellation token follows AutoGen's design for cancelling pending async operations.
- ★Conversational Multi-Agent
RoundRobinOrchestrator cycles agents over a shared conversation history; AIOrchestrator picks the next speaker via LLM-driven structured-output selection — both classic conversational multi-agent pat…
- ★Actor-Model Agents
Picoagents has shared-conversation orchestration (RoundRobin, AIOrchestrator, plan-based) over a shared message list, not per-agent mailboxes — closest analogue but no actor-model abstraction.
Neighbourhood
Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.