SwarmEx - a lightweight, Elixir-based library designed for orchestrating AI agents

Hi everyone! :honeybee:

I’m excited to introduce SwarmEx — a lightweight, Elixir-based library designed for orchestrating AI agents with control, flexibility, and ease. Inspired by OpenAI’s Swarm Python library, SwarmEx provides core tools to help developers create, coordinate, and manage AI agent networks.

Why SwarmEx?

SwarmEx was built to make agent orchestration in Elixir not just effective but enjoyable. Whether you’re managing complex workflows, handling specialized agents, or developing autonomous systems, SwarmEx gives you a straightforward framework with:

  • Seamless tool integration for custom tasks
  • Observability through built-in telemetry (WIP)
  • Robust error handling for dependable fault tolerance (WIP)
  • A streamlined developer experience

SwarmEx isn’t a one-to-one implementation of the OpenAI Swarm library but is inspired by its core ideas.

Getting Started

Installing SwarmEx is as easy as adding it to your mix.exs dependencies:

def deps do
  [
    {:swarm_ex, "~> 0.1.0"}
  ]
end

For a practical introduction, check out the following Livebook, where you can explore how to set up and interact with agents in real time:

Run in Livebook

Documentation & Feedback

Full documentation is available on Hexdocs. I would love to hear your feedback, ideas, or use cases! Feel free to open issues, submit PRs, or simply reach out.

Please keep in mind: SwarmEx is in alpha and rough around the edges but already usable.

Thanks, and looking forward to your feedback and ideas,
Norris

https://hexdocs.pm/swarm_ex

6 Likes

Nice, thanks for a cool contribution to the ecosystem - hope I find the time to check it out soon!

Btw I assume the second message is not you again, but a AI generated summary of your post of a newly registered user/bot? :smile:

1 Like

Thanks! I think that elixir lends itself very well for certain ML use-cases, like in the case of LLM agents. Sadly because of lacking tooling in the ecosystem we have a chicken and egg problem right now. And as always in the elixir community, beginner friendly material that is up to date is rare as well.

I am planning to add additional livebook’s with some more complex examples that mirror some examples of the openai/swarm repo. Sadly a day has only 24 hours :slight_smile:

Yeah, second post is not from me. Just flagged it as Spam / Off-Topic.

3 Likes

Oh, absolutely! The actor model/message passing lends itself quite naturally to agents.

I experimented with a graph-based structure some weeks ago akin to LangGraph, it was fascinating how easy Elixir made it.

Will keep an eye on your lib :slight_smile: