Skip to main content

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


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.2.0.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyagent_patterns-0.2.0-py3-none-any.whl (41.9 kB view details)

Uploaded Python 3

File details

Details for the file pyagent_patterns-0.2.0.tar.gz.

File metadata

  • Download URL: pyagent_patterns-0.2.0.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyagent_patterns-0.2.0.tar.gz
Algorithm Hash digest
SHA256 47c1a438f9e2dab927038e1bfb81ab233eb4678486c39d39634542689267f79b
MD5 ac8e4b66c108221f48ef2c6d566a0360
BLAKE2b-256 e01c7421ffd96babfe3058d61c40c2fd55de33e33dcaedb7b971aa00608ea0b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyagent_patterns-0.2.0.tar.gz:

Publisher: publish.yml on pyagent-core/pyagent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyagent_patterns-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyagent_patterns-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1c403f1e6c55f09d2629cb21a5440801dfccc0d175068268d6dc9c005fe593b
MD5 24e10d837ac68399c77a9fc865e1e4d4
BLAKE2b-256 06d4bad36d532b6f3b25c9d8081f319113ec884c57caa7a29fd1731b4dcaa9c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyagent_patterns-0.2.0-py3-none-any.whl:

Publisher: publish.yml on pyagent-core/pyagent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page