A minimalist multi-agent orchestration library.
Project description
<div align="center">
<h1>🐝 Swarm Agent Kit</h1>
<p><b>A minimalist, state-aware multi-agent orchestration framework designed for production backends.</b></p>
[](https://pypi.org/project/swarm-agent-kit/)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://moseleydev.github.io/swarm-kit/)
</div>
---
## 📖 Overview
Swarm Agent Kit bridges the gap between simple chat scripts and complex production environments. It provides native state management, async execution, database persistence hooks, and a real-time observability dashboard.
- **Dual-Mode Orchestration:** Choose between **Unsupervised Mode** (agents dynamically route and hand off tasks autonomously) or **Supervised Mode** (a central LLM planner forces agents through a strict sequential pipeline).
- **Bring-Your-Own-Database (BYOD):** Native persistence hooks allow you to seamlessly save and resume sessions using Redis, PostgreSQL, or any database of your choice.
- **Production-Ready Async:** Full support for non-blocking `async/await` execution, making it safe to deploy inside high-concurrency web frameworks like FastAPI.
- **Global State Management:** Agents share and mutate a global memory dictionary via built-in tools, preventing context loss and keeping token usage lean during long workflows.
- **Native Tool Execution:** Easily bind standard Python functions and JSON schemas to specific agents to trigger external APIs.
---
## 🚀 Quick Start
### Installation
Install the package via PyPI:
```bash
pip install swarm-agent-kit
```
Set your API keys in a .env file (Powered by LiteLLM, supporting 100+ providers):
OPENAI_API_KEY="sk-..."
Basic Usage (Dynamic Routing)
from swarm_kit.core.agent import Agent
from swarm_kit.core.swarm import Swarm
import asyncio
# 1. Define your specialized agents
support = Agent(
name="Support",
instructions="You are a helpful IT support agent. Help the user fix their bug."
)
# 2. Initialize the Swarm (with optional DB hooks)
swarm = Swarm(agents=[support])
# 3. Execute asynchronously
async def main():
await swarm.execute_async(
start_agent_name="Support",
user_input="My dashboard is crashing on startup.",
session_id="ticket_123"
)
if __name__ == "__main__":
asyncio.run(main())
💻 CLI & Observability
Swarm Agent Kit comes with a built-in command-line interface and a real-time local dashboard to visualize agent logic, tool executions, and state mutations.
# Launch the real-time observability dashboard
swarm-kit studio
(Runs locally on http://localhost:8000)
📚 Documentation & Examples
For full API references, tutorials, and advanced database integration guides, visit the official documentation:
👉 Swarm Agent Kit Official Docs
Looking for drop-in code? Check out the examples/ directory in our GitHub repository.
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
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 swarm_agent_kit-0.1.3.tar.gz.
File metadata
- Download URL: swarm_agent_kit-0.1.3.tar.gz
- Upload date:
- Size: 750.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78d7b01127ce44a493d9e965e1f95ee337ff03d7553048bc1a44cec1e2b9e854
|
|
| MD5 |
994ea3130d21feee1869e33b074073cc
|
|
| BLAKE2b-256 |
5e746fe8bab2bb9ca7ae917b4455c4e41caeb12ca384edbe41e20e0ab1f3b6ac
|
Provenance
The following attestation bundles were made for swarm_agent_kit-0.1.3.tar.gz:
Publisher:
publish.yml on moseleydev/swarm-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarm_agent_kit-0.1.3.tar.gz -
Subject digest:
78d7b01127ce44a493d9e965e1f95ee337ff03d7553048bc1a44cec1e2b9e854 - Sigstore transparency entry: 1185634011
- Sigstore integration time:
-
Permalink:
moseleydev/swarm-kit@05d8ac1372cfb81b5faf0393e333a44ef0459fd3 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/moseleydev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@05d8ac1372cfb81b5faf0393e333a44ef0459fd3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file swarm_agent_kit-0.1.3-py3-none-any.whl.
File metadata
- Download URL: swarm_agent_kit-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d74a43752967213a8ceeed45cd052d6c9ec7efed88f2079e5b4141e3a88a21e
|
|
| MD5 |
a3d614fc8b4974e69418988ff2af0244
|
|
| BLAKE2b-256 |
4812c7e71f7d6757de280708cf1d45daa2a94353018788dbc7f600f10f6558e0
|
Provenance
The following attestation bundles were made for swarm_agent_kit-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on moseleydev/swarm-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swarm_agent_kit-0.1.3-py3-none-any.whl -
Subject digest:
8d74a43752967213a8ceeed45cd052d6c9ec7efed88f2079e5b4141e3a88a21e - Sigstore transparency entry: 1185634027
- Sigstore integration time:
-
Permalink:
moseleydev/swarm-kit@05d8ac1372cfb81b5faf0393e333a44ef0459fd3 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/moseleydev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@05d8ac1372cfb81b5faf0393e333a44ef0459fd3 -
Trigger Event:
release
-
Statement type: