Full-Code · Orchestration Frameworksactive

GPTSwarm

Type: full-code · Vendor: metauto-ai · Language: Python · License: MIT · Status: active · Status in practice: experimental · First released: 2024

Links: homepage docs repo

Represent LLM-based agents and their connections as optimizable graphs whose edges and prompts are tuned automatically toward better swarm performance.

Description. GPTSwarm is a graph-based framework for LLM-based agents. It builds agents from computational graphs and connects them into swarms whose inter-agent edges can be pruned or created at run time. The framework includes optimization algorithms that tune prompts and the graph itself toward better task performance. It is written in Python and released under the MIT license; the underlying work was published as 'Language Agents as Optimizable Graphs' and accepted at ICML 2024.

Agent loop shape. Agents are constructed as graphs of operations and connected into a swarm; an optimizer adjusts the inter-agent edges and prompts against an evaluation signal, pruning or creating connections so the collaboration structure is learned rather than fixed.

Primary use cases

  • building LLM agents from computational graphs
  • optimizing inter-agent connections at run time
  • automatically tuning agent prompts and swarm topology

Key concepts

  • Agent as graph automatic-workflow-search (docs)Each agent is built as a computational graph of operation nodes; GPTSwarm lets you construct LLM-based agents from these graphs rather than as monolithic prompts.
  • Swarm dynamic-topology-routing (docs)A composite graph that connects multiple agent graphs together, whose inter-agent edges are the optimizable surface tuned at run time.
  • swarm.optimizer automatic-workflow-search (docs)The module of optimization algorithms that tunes prompts and graph edges via reinforcement learning and prompt optimization to raise agent and swarm performance.

Patterns this full-code implements —

Neighbourhood

Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.