OpenAI recently released an amazing new tool called Swarm that makes it SUPER easy to build systems that use many AI agents together to do a lot of incredible things. The problem is, you are only able to use OpenAI models like GPT-4o by default.
In this video, I show you how to set up your AI agents with Swarm to run entirely locally using Ollama for your LLMs! The best part is even the smaller models like Qwen 2.5 3b do really well!
See the instructions below to run this Ollama + Swarm setup yourself super easily!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00:00 – Intro
01:17 – How to Make Swarm Work with Ollama
04:07 – Coding an Ollama Agent Swarm
07:19 – Overview of the SQL Agent Swarm
09:54 – Local LLM Swarm Demo
12:52 – Step by Step Guide to Run this Yourself
19:24 – Outro
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Step by step guide to install and run this yourself!
Prerequisites: Python and Git (easy to Google and install in a minute)
1. Install Ollama (link below)
2. Pull the models you want to use with the “ollama pull [model ID]” command (link to tool models below)
3. git clone https://github.com/coleam00/ai-agents-masterclass.git
4. cd ai-agents-masterclass/local-swarm-agent
5. python -m venv venv
6. Activate virtual environment (on Windows: .venvScriptsactivate, on Mac/Linux: source venv/bin/activate)
7. pip install -r requirements.txt
8. Rename .env.example to .env and set your default Ollama model
9. python load_sql_data.py (loads the test data, covered in previous video)
10. python run.py
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Link to the code for the SQL agent swarm:
https://github.com/coleam00/ai-agents-masterclass/tree/main/local-swarm-agent
Install Ollama:
List of Ollama models that support function calling:
https://ollama.com/search?c=tools
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Artificial Intelligence is no doubt the future of not just software development but the whole world. And I’m on a mission to master it – focusing first on mastering AI Agents.
Join me as I push the limits of what is possible with AI. I’ll be uploading videos at least two times a week – Sundays and Wednesdays at 7:00 PM CDT! Sundays and Wednesdays are for everything AI, focusing on providing insane and practical educational value. I will also post sometimes on Fridays at 7:00 PM CDT – specifically for platform showcases – sometimes sponsored, always creative in approach!
source