Skip to main content
Run your AI agent squads entirely on your machine using Ollama and local LLMs. Zero API costs, complete privacy, works offline.
Best for: Privacy-sensitive projects, offline development, reducing API costs, experimenting without usage limits.

Why Local LLMs?


Quick Start

1. Install Ollama

2. Pull a Model

3. Start Ollama Server

4. Install Squads CLI

5. Configure for Local LLM

Create or update your agent to use Ollama:

6. Run Your Agent


For Coding

For General Tasks

Start with qwen2.5-coder:7b if you have 8GB+ VRAM. It offers the best balance of speed and capability for code-related agent tasks.

Configuration Options

Squad-Level Default

Set Ollama as default for an entire squad:

Agent-Level Override

Override for specific agents:

Environment Variables


LM Studio Alternative

LM Studio provides a GUI for running local models with OpenAI-compatible API.

Setup

  1. Download LM Studio from lmstudio.ai
  2. Download a model (e.g., TheBloke/CodeLlama-13B-GGUF)
  3. Start the local server (runs on port 1234)

Configure Squads


Performance Tips

Hardware Requirements

Optimization Settings

Quantization

Lower precision = faster + less VRAM:

Hybrid Setup

Use local LLMs for development, cloud for production:
Switch with environment:

Troubleshooting

Model Not Loading

Out of Memory

Slow Responses

  1. Use quantized models (-q4_0 suffix)
  2. Reduce context window (--num-ctx 4096)
  3. Ensure GPU acceleration is enabled
  4. Close other GPU-intensive applications

Multi-LLM Usage

Mix local and cloud providers

Token Economics

Compare local vs cloud costs