🐝 **GPTSwarm is a graph-based framework for LLM-based agents, providing two high
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
* It lets you build LLM-based agents from graphs.
* It enables the customized and automatic self-organization of agent swarms with self-improvement capabilities.
About GPTSwarm
At a granular level, GPTSwarm is a library that includes the following components:
| Module | Description |
| ---- | --- |
| **swarm.environment** | Domain-specific operations, agents, tools, and tasks |
| **swarm.graph** | Graph-related functions for creating and executing agent graphs and swarm composite graphs |
| **swarm.llm** | Interface for selecting LLM backends and calculating their operational costs |
| **swarm.memory** | Index-based memory |
| **swarm.optimizer** | Optimization algorithms designed to enhance agent performance and overall swarm efficiency |
Visualizations of the graphs
News
* 😎 **[10/12]** Respect 🐝 OpenAI's Swarm, but 🐝 GPTSwarm is the better option if consider the 🐝**Swarm Intelligence**🐝.
* 🔥 **[08/07]** Mingchen attended an invited seminar with Shanghai AI Lab.
* 🔥 **[07/25]** Louis and Francesco gave the oral presentation in ICML 2024.
* 🔥 **[07/17]** Mingchen introduced GPTSwarm to Meta.
* 🔥 **[07/05]** Mingchen gave an invited talk to WAIC.
* 🔥 **[06/21]** Mingchen gave an invited talk to IA-CAS.
* 🔥 **[06/20]** Dmitrii gave an invited talk to Sberbank.
* 🔥 **[06/03]** SDAIA invited GPTSwarm team (Wenyi, Francesco, Dmitrii) for a 5 hour seminar.
* 🔥 **[06/02]** GPTSwarm has been selected as **Oral Presentation** (top 1.5%, 144 in 9,473) by ICML2024! Congratulation!
* 🔥 **[05/01]** GPTSwarm has been accepted by ICML2024.
* 🔥 **[04/18]** Mingchen gave the invited talk to ByteDance.
* 🔥 **[03/20]** Mingchen gave the invited talk to HUAWEI.
* 🔥 **[03/13]** MITTR China Exclusive Interview with Mingchen.
* 🔥 **[03/01]** GPTSwarm can be installed via pip now: pip install gptswarm
* 🔥 **[02/27]** Our academic paper: Language Agents as Optimizable Graphs is released.
Edge optimization example
Here is the edge optimization process that updates edge probabilities toward improvement of the benchmark score. Notice that within an agent, the edges are fixed, whereas the inter-agent connections are getting optimized towards either edge pruning (value 0, blue) or creation (value 1, red).
Quickstart
**Clone the repo**
**Install packages**
**You should add API keys in .env.template and change its name to .env**
**Selecting the Search Engine**
The system will automatically select the appropriate search engine based on the following priority:
- Bing API: If BING_API_KEY is provided
- Search API: If SEARCHAPI_API_KEY is provided
- Google API: If GOOGLE_API_KEY is provided
**Getting started with GPTSwarm is easy. Quickly run a predefined swarm**
**or make use of tools, such as the file analyzer**
Check out the minimal Swarm example in Colab here: .
See how to create a custom Agent and run a Swarm with it here: .
Here is a Youtube video on how to run the demo notebooks: