GitHub logo

GitHub

Free

The First Self-Improving agents with RL / Prompting Optimization

FreeFree tier
Type
Open Source

About GitHub

GPTSwarm is a graph-based framework for building and optimizing LLM-based agents. It enables the construction of agent graphs with customizable connections and supports automatic self-organization of agent swarms through reinforcement learning and prompting optimization. The framework includes modules for environment, graph execution, LLM backend selection, index-based memory, and swarm optimization algorithms. It has been accepted as an oral presentation at ICML 2024 and is available as an open-source Python package.

Key Features

Graph-based framework for LLM agents
Self-optimizing agent swarms with reinforcement learning
Automatic edge optimization between agents (pruning and creation)
Modular design: environment, graph, LLM, memory, optimizer components
Visualization of agent graphs
Supports multiple search engine backends (Bing, Google, SearchAPI)

Pros & Cons

Pros
  • Open source with a permissive license
  • Accepted as oral at ICML 2024 (top 1.5%)
  • Enables agents to autonomously improve through reinforcement learning
  • Graph-based design allows flexible and composable agent architectures
Cons
  • Requires API keys for OpenAI and search engines (Bing, Google, etc.)
  • Setup involves cloning repo and installing dependencies via Poetry
  • Relatively new project with potentially limited community documentation

Best For

Building multi-agent systems with self-improvementResearch in agent orchestration and swarm intelligenceAutomated prompt and agent architecture optimizationIntegrating LLMs with external tools and web search

FAQ

How can I install GPTSwarm?
You can install GPTSwarm via pip using 'pip install gptswarm', or clone the repository from GitHub and run 'pip install poetry && poetry install'.
What is the main difference between GPTSwarm and OpenAI's Swarm?
GPTSwarm provides swarm intelligence and self-improvement capabilities through graph-based optimization, whereas OpenAI's Swarm is a simpler orchestration framework.
Does GPTSwarm support multiple LLM backends?
Yes, GPTSwarm has an interface for selecting LLM backends and calculates operational costs.