swarmgo  by prathyushnallamothu

Go SDK for building AI agents

created 9 months ago
338 stars

Top 82.6% on sourcepulse

GitHubView on GitHub
Project Summary

SwarmGo is a Go SDK for building AI agent coordination systems, inspired by OpenAI's Swarm framework. It targets developers needing to create complex, multi-agent applications with fine-grained control over agent interactions, task delegation, and tool usage, offering a lightweight and testable alternative for scalable AI solutions.

How It Works

SwarmGo is built around two core abstractions: Agents and Handoffs. Agents encapsulate instructions and tools (functions), and can dynamically transfer control to other agents. This design allows for expressing complex agent dynamics and networks, enabling scalable applications without a steep learning curve. It emphasizes client-side execution and statelessness between calls, similar to OpenAI's Chat Completions API.

Quick Start & Requirements

  • Install: go get github.com/prathyushnallamothu/swarmgo
  • Prerequisites: OpenAI API Key.
  • Example: The README provides a basic Go example for running a simple agent.
  • Docs: Examples directory

Highlighted Details

  • Agent Handoff: Enables dynamic conversation transfer between agents.
  • Streaming Support: Built-in handlers for real-time token and tool call processing.
  • Concurrent Execution: Supports running multiple agents in parallel using ConcurrentSwarm.
  • Memory Management: Features automatic and explicit memory storage, retrieval, and search.
  • Workflow Patterns: Predefined Supervisor, Hierarchical, and Collaborative workflows for agent orchestration.

Maintenance & Community

  • Contributing: Contributions are welcome via pull requests.
  • License: MIT License.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: Permissive for commercial use and integration with closed-source applications.

Limitations & Caveats

The project currently lists OpenAI and Gemini as supported LLM providers, but the provided code examples and detailed features primarily focus on OpenAI integration.

Health Check
Last commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
43 stars in the last 90 days

Explore Similar Projects

Starred by Zhiqiang Xie Zhiqiang Xie(Author of SGLang), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
6 more.

swarm by openai

0.3%
20k
Multi-agent orchestration framework for lightweight agent coordination
created 1 year ago
updated 4 months ago
Feedback? Help us improve.