You have Ollama running on multiple machines. Instead of hardcoding IPs and manually picking which Ollama instance to hit, point everything at the Ollama proxy. The Ollama proxy routes to the best available device automatically.
text
Before: App → http://macmini:11434 (one Ollama instance, hope it's not busy)
After: App → http://ollama-proxy:11435 (Ollama proxy picks the best machine)
bash
pip install ollama-herd # PyPI: https://pypi.org/project/ollama-herd/
On one machine (the Ollama proxy):
bash
herd # starts the Ollama proxy on port 11435
On every machine running Ollama:
bash
herd-node # discovers the Ollama proxy automatically on your network
Now point your apps at http://ollama-proxy:11435 instead of http://localhost:11434. Same Ollama API, same model names, same streaming — the Ollama proxy handles smarter routing.
Every Ollama API endpoint works through the Ollama proxy:
bash
# Chat via Ollama proxy (same as direct Ollama)
curl http://ollama-proxy:11435/api/chat -d '{
"model": "llama3.3:70b",
"messages": [{"role": "user", "content": "Hello via Ollama proxy"}]
}'
# Generate via Ollama proxy (same as direct Ollama)
curl http://ollama-proxy:11435/api/generate -d '{
"model": "qwen3:32b",
"prompt": "Explain quantum computing via Ollama proxy"
}'
# List models via Ollama proxy (aggregated from all Ollama nodes)
curl http://ollama-proxy:11435/api/tags
# List loaded models via Ollama proxy (across all Ollama nodes)
curl http://ollama-proxy:11435/api/ps
# Pull a model via Ollama proxy (auto-selects best node)
curl -N http://ollama-proxy:11435/api/pull -d '{"name": "codestral"}'
The Ollama proxy also exposes an OpenAI-compatible endpoint — same models, no code changes:
python
from openai import OpenAI
# Point at the Ollama proxy instead of direct Ollama
ollama_proxy_client = OpenAI(base_url="http://ollama-proxy:11435/v1", api_key="not-needed")
ollama_proxy_response = ollama_proxy_client.chat.completions.create(
model="llama3.3:70b",
messages=[{"role": "user", "content": "Hello via Ollama proxy"}],
stream=True,
)
FeatureDirect OllamaOllama Proxy (Herd)Multiple machinesManual IP switchingOllama proxy routes automaticallyLoad balancingNoneOllama proxy scores on 7 signalsFailoverNoneOllama proxy auto-retries on next nodeModel discoveryPer-machine OllamaOllama proxy aggregates fleet-wideQueue managementNoneOllama proxy manages per-node:model queuesDashboardNoneOllama proxy provides real-time web UIHealth checksNoneOllama proxy runs 15 automated checksRequest tracingNoneOllama proxy logs to SQLite trace storeImage generationNoneOllama proxy routes mflux + DiffusionKitSpeech-to-textNoneOllama proxy routes Qwen3-ASR
Just change the Ollama URL to the Ollama proxy — no other configuration needed:
ToolBefore (direct Ollama)After (Ollama proxy)Open WebUIhttp://localhost:11434``http://ollama-proxy:11435Aider--openai-api-base http://localhost:11434/v1``--openai-api-base http://ollama-proxy:11435/v1Continue.devOllama at localhostOllama proxy at ollama-proxy:11435LangChainOllama(base_url="http://localhost:11434")``Ollama(base_url="http://ollama-proxy:11435")LiteLLMollama/llama3.3:70b``ollama/llama3.3:70b (point at Ollama proxy)CrewAIOPENAI_API_BASE=http://localhost:11434/v1``OPENAI_API_BASE=http://ollama-proxy:11435/v1
When a request arrives at the Ollama proxy, it scores all Ollama nodes that have the requested model:
The highest-scoring Ollama node wins. If it fails, the Ollama proxy retries on the next best node automatically.
Ollama proxy dashboard at http://ollama-proxy:11435/dashboard — see every Ollama node, every model, every queue in real time.
bash
# Ollama proxy fleet overview
curl -s http://ollama-proxy:11435/fleet/status | python3 -m json.tool
# Ollama proxy health checks
curl -s http://ollama-proxy:11435/dashboard/api/health | python3 -m json.tool
Ollama Herd (the Ollama proxy) is open source (MIT). We welcome contributions:
CLAUDE.md gives AI agents full Ollama proxy context. 444 tests, async Python.~/.fleet-manager/.