Noureddine RAMDI / Inside picoagents: a transparent multi-agent system framework built from scratch in Python

Created Sat, 23 May 2026 20:41:14 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

victordibia/designing-multiagent-systems

Multi-agent systems powered by large language models (LLMs) are gaining traction, but many frameworks today hide the internals behind layers of abstraction. PicoAgents, the core of Victor Dibia’s multi-agent systems book, takes the opposite approach: it implements a complete multi-agent framework from the ground up in clean, understandable Python code. This repo is well worth exploring if you want to really understand how multi-agent reasoning loops, orchestration patterns, memory, and tooling fit together in a production-grade system.

what picoagents implements: a full multi-agent framework with LLM orchestration and tooling

PicoAgents is a Python framework designed to teach and demonstrate multi-agent system concepts with transparency. The repo includes everything from core agent abstractions to multiple advanced orchestration patterns.

Under the hood, it builds agents as Python classes with explicit tool use, memory management, and streaming interaction. The framework supports multiple LLM providers through a unified client interface, making it easy to switch or extend providers without changing agent logic.

Architecturally, PicoAgents covers:

  • Agent construction with tools, memory, streaming, and middleware.
  • Autonomous orchestration patterns including GroupChat (multiple agents chatting), LLM-driven workflows, and plan-based orchestration.
  • A backend built on FastAPI with Server-Sent Events (SSE) for streaming agent output.
  • A React-based UI for live interaction with agents.
  • Evaluation setups integrating multi-agent benchmarks like GAIA and τ-bench.
  • Production considerations such as observability powered by OpenTelemetry.

The codebase is Python-centric and deliberately designed for educational clarity, avoiding black-box magic. It reveals the internals of multi-agent orchestration frameworks that many existing solutions abstract away.

what sets picoagents apart: transparency, unified LLM clients, and production-ready design

The standout feature of picoagents is its from-scratch implementation that balances educational transparency with production-grade features. Many multi-agent frameworks rely on large dependencies or proprietary components, but here you get a clean, opinionated Python codebase you can read and modify.

The unified LLM client abstraction is a practical design choice. It supports providers like OpenAI, Anthropic, and others with minimal setup, enabling experimentation across models without rewriting agent logic. This design acknowledges the evolving LLM landscape and the need for framework-agnostic patterns.

Orchestration patterns are implemented as explicit, composable workflows. The GroupChat pattern allows multiple autonomous agents to converse and coordinate. The plan-based pattern mimics a reasoning planner that sequences agent actions toward a goal. These patterns expose the core logic of agent collaboration rather than hiding it.

Streaming SSE support in the FastAPI backend and the React UI provides a smooth, real-time developer experience. This is not common in toy frameworks and reflects a practical choice for production-readiness.

The inclusion of evaluation setups with GAIA and τ-bench benchmarks is a nice touch, allowing users to measure and improve multi-agent behaviors systematically. Observability with OpenTelemetry is another nod to real-world deployment, giving insights into agent performance and interactions.

Tradeoffs include a more hands-on setup compared to turnkey solutions, and the learning curve of understanding orchestration patterns. However, this repo is ideal if you want to build multi-agent systems with full control and deep understanding.

quick start: running your first agent and launching the UI

The repo offers multiple ways to get started, including interactive Colab notebooks for quick experimentation, GitHub Codespaces with a pre-configured environment, and local installation with pip.

Here is the local installation and first agent example from the README:

# Basic installation
pip install -e .

# Optional feature sets
pip install -e ".[web]"           # Web UI and API server
pip install -e ".[computer-use]"  # Browser automation
pip install -e ".[examples]"      # Run example scripts
pip install -e ".[all]"           # Everything

Then, a minimal agent example to get started:

from picoagents import Agent, OpenAIChatCompletionClient

def get_weather(location: str) -> str:
    """Get current weather for a given location."""
    return f"The weather in {location} is sunny, 75°F"

# You can create your own agents subclassing Agent and integrating with LLM clients and tools

To launch the Web UI for interactive agent applications:

picoagents ui

For model setup, the framework supports multiple providers by switching client classes, such as OpenAIChatCompletionClient. Detailed setup and API key management are covered in the docs and chapters of the companion book.

verdict: a solid learning and experimentation framework for multi-agent system builders

PicoAgents is a valuable resource if you’re serious about understanding how multi-agent systems with LLMs work under the hood. Its from-scratch Python implementation trades off turnkey simplicity for transparency and control.

The repo shines in exposing core agent abstractions, unified LLM client interfaces, and realistic orchestration patterns. It also offers practical features like streaming SSE UIs and production observability, making it suitable for prototyping and research.

That said, this is not a plug-and-play solution for production deployment at scale. You’ll need to invest time to grasp the orchestration models and possibly extend the framework for your domain.

If you want to avoid black-box libraries and truly understand multi-agent orchestration with LLMs, picoagents is one of the best open-source starting points out there. It balances education and production-grade features with a clean, readable Python codebase.

For practical usage, start with the interactive notebooks or Codespaces, then move on to local installation to explore and build your own agents and workflows.


→ GitHub Repo: victordibia/designing-multiagent-systems ⭐ 554 · Python