Skip to content

RhythrosaLabs/swarmpy

Repository files navigation

🐝 SwarmPy

An educational multi-agent orchestration framework built on OpenAI's Swarm — explore handoffs, routines, and agentic patterns

Python OpenAI Streamlit License

⚠️ Experimental & Educational — built to explore ergonomic interfaces for multi-agent systems, not for production use.


SwarmPy is an educational framework for exploring multi-agent orchestration patterns. Based on OpenAI's Swarm, it showcases the handoff and routines patterns from the Orchestrating Agents cookbook — wrapped in a Streamlit UI for hands-on experimentation.

✨ Features

  • Agent handoffs — transfer control between agents based on context
  • Routines — define multi-step agent workflows
  • Swarm orchestration — lightweight, ergonomic multi-agent coordination
  • Streamlit UI — interactive interface for experimenting with agent flows
  • GPT-4 powered — built on OpenAI's chat completions API

🚀 Quick Start

git clone https://github.com/RhythrosaLabs/swarmpy.git
cd swarmpy
pip install -r requirements.txt
# Set your OpenAI key
export OPENAI_API_KEY=your_key
streamlit run app.py

Or install the Swarm library directly:

pip install git+https://github.com/openai/swarm.git
from swarm import Swarm, Agent

client = Swarm()
agent = Agent(name="Assistant", instructions="You are a helpful assistant.")
response = client.run(agent=agent, messages=[{"role": "user", "content": "Hello!"}])
print(response.messages[-1]["content"])

🛠️ Tech Stack

  • Python 3.10+ — core language
  • OpenAI / GPT-4 — LLM backbone
  • Swarm — multi-agent orchestration
  • Streamlit — interactive UI

🤝 Contributing

PRs welcome. Open an issue first for major changes.

📄 License

MIT

💛 Support

If SwarmPy helps you explore agentic AI patterns, consider supporting development:

👉 Donate via PayPal — @noodlebake


Made with ❤️ by RhythrosaLabs

Releases

No releases published

Packages

 
 
 

Contributors

Languages