18 reusable multi-agent orchestration patterns for LLMs
Project description
pyagent-patterns
18 reusable multi-agent orchestration patterns for LLMs — zero dependencies, async-first, fully typed.
Install
pip install pyagent-patterns
Patterns
| Tier | Patterns |
|---|---|
| Orchestration | Supervisor, Pipeline, Fan-Out/Fan-In, Hierarchical, Orchestrator-Workers |
| Resolution | Self-Reflection, Cross-Reflection, Debate, Voting, Evaluator-Optimizer |
| Structural | Role-Based, Layered, Topology, Blackboard |
| Advanced | Talker-Reasoner, Swarm, Human-in-the-Loop, ReAct |
Plus: CompositePattern (escalation chains), PatternAdvisor, GuardrailChain, BoundedExecution, CircuitBreaker.
Quick Example
import asyncio
from pyagent_patterns.base import Agent, MockLLM
from pyagent_patterns.resolution import SelfReflection
llm = MockLLM(responses=["Draft code", "Needs error handling", "Improved code", "APPROVED"])
pattern = SelfReflection(agent=Agent("coder", llm), max_rounds=3)
result = asyncio.run(pattern.run("Write a sorting function"))
print(result.output)
Documentation
Full docs: pyagent.dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyagent_patterns-0.1.0.tar.gz
(29.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyagent_patterns-0.1.0.tar.gz.
File metadata
- Download URL: pyagent_patterns-0.1.0.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3540dcd8dff42ddfde0f5cfdb3cdfd3dbcd3093f4c475c71c921085189b02ab1
|
|
| MD5 |
ab3bd589b03eeb8054810b2d0222b141
|
|
| BLAKE2b-256 |
f4b4f0fe22037bc5e9ec8d68ba4b21d5c74dd1b10f3278e722b6a0f3ff98b273
|
File details
Details for the file pyagent_patterns-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyagent_patterns-0.1.0-py3-none-any.whl
- Upload date:
- Size: 41.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d81314405d5797511f1cdce388115d2a11dbef6c525e221c0ac198f062f3753
|
|
| MD5 |
1b54b73b04c2272f991677623271fa2b
|
|
| BLAKE2b-256 |
f99897b2ab6a8e50347fb79662d2d97c0d3bbdec24133eee42b05e82a866fada
|