Important
swarm-sample-box is a template repository developed using cline (formerly Claude Dev), SourceSage, and claude.ai. Most of the release notes, README, and commit messages are generated using the latest AI technology.
Swarm Sample Box is an AI agent experimental repository that utilizes Swarm, an experimental multi-agent orchestration framework developed by OpenAI. This repository provides a lightweight and flexible solution for efficiently coordinating multiple AI agents to perform complex tasks, supporting developers' research and experimentation. Version: v1.7.0
- Diverse Agent Samples: Provides implementation examples of various AI agents, from basic dialogue to complex task processing.
- Flexible Customization: Each sample can be easily extended and modified to adapt to your own use cases.
- Integrated Experimental Environment: Provides a practical experimental environment, including Docker environment and integration with vector databases (Qdrant).
- Automated Evaluation Function: Some samples include automated evaluation scripts to measure agent performance.
- Swarm Framework Requirements Definition Prompt:
docs/SWARM_REQUIREMENTS_DEFINITION_PROMPT_V1.md
provides a prompt to assist in building AI agent systems.
-
Clone the repository:
git clone https://github.com/Sunwood-ai-labs/swarm-sample-box.git cd swarm-sample-box
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # Linux/macOS .venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Set the OpenAI API key:
export OPENAI_API_KEY="your-api-key"
-
Run a specific sample:
cd examples/<sample name> python main.py # or run.py
Refer to the "Usage" section for instructions on how to install and use swarm-sample-box.
- Added a structured requirements definition prompt to assist in building AI agent systems using the Swarm framework. (
docs/SWARM_REQUIREMENTS_DEFINITION_PROMPT_V1.md
) - Improved existing sample code and README.
(The number of 🔥 represents the relative complexity and learning curve of each sample.)
-
Basic 🔥: A minimal implementation example that introduces the basic functions of Swarm.
-
Weather Agent 🔥🔥: An implementation example of a simple agent that retrieves weather information and performs related tasks.
-
Triage Agent 🔥🔥: An implementation example of a triage agent that directs user requests to the appropriate agent.
-
Personal Shopper 🔥🔥🔥: An implementation example of a personal shopping assistant agent.
-
Airline 🔥🔥🔥🔥: A multi-agent setup simulating an airline's customer service.
-
Support Bot 🔥🔥🔥🔥🔥: An implementation example of a customer support bot, including document search functionality using Qdrant.
-
Experimental??: Customer Service Streaming 🔥🔥🔥🔥🔥: A sample simulating customer service in a streaming format.
This section will introduce originally developed samples. Currently under preparation, so please wait for future updates.
- [In preparation] New original sample 1: Details coming soon
- [In preparation] New original sample 2: Details coming soon
Some samples include automated evaluation scripts. To run the evaluation, execute the following command in the sample directory:
pytest evals.py
Swarm Sample Box is released under the MIT License.
This project is based on the Swarm framework developed by OpenAI. We deeply appreciate the developers of Swarm. Contributors to this release: Maki, iris-s-coon
Start developing and experimenting with innovative AI agent systems using Swarm Sample Box! For detailed usage instructions and explanations of each sample, please refer to the README file in the corresponding directory.