Ollama Swarm banner
coleam00 coleam00

Ollama Swarm

Development community

Description

Educational framework exploring ergonomic, lightweight multi-agent orchestration. Managed by OpenAI Solution team.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

![Swarm Logo](assets/logo.png)

Swarm (experimental, educational)

This fork of OpenAI makes it possible to use local LLMs for your swarms with Ollama!

An educational framework exploring ergonomic, lightweight multi-agent orchestration.

[!WARNING] Swarm is currently an experimental sample framework intended to explore ergonomic interfaces for multi-agent systems. It is not intended to be used in production, and therefore has no official support. (This also means we will not be reviewing PRs or issues!)

The primary goal of Swarm is to showcase the handoff & routines patterns explored in the [Orchestrating Agents: Handoffs & Routines](https://cookbook.openai.com/examples/orchestrating_agents) cookbook. It is not meant as a standalone library, and is primarily for educational purposes.

Install

Requires Python 3.10+

pip install git+ssh://git@github.com/coleam00/ollama-swarm.git

or

pip install git+https://github.com/coleam00/ollama-swarm.git

Usage

from swarm import Swarm, Agent

client = Swarm()

def transfer_to_agent_b():
    return agent_b


agent_a = Agent(
    name="Agent A",
    instructions="You are a helpful agent.",
    functions=[transfer_to_agent_b],
    model="Ollama model ID here"
)

agent_b = Agent(
    name="Agent B",
    instructions="Only speak in Haikus.",
    model="Ollama model ID here"
)

response = client.run(
    agent=agent_a,
    messages=[{"role": "user", "content": "I want to talk to agent B."}],
)

print(response.messages[-1]["content"])
Hope glimmers brightly,
New paths converge gracefully,
What can I assist?

Table of Contents

Overview

Swarm focuses on making agent **coordination** and **execution** lightweight, highly