BuildBotsBetter
OL

Set Up Ollama with a Single Agent

Local LLM Inference, Single Autonomous Coding Agent & Offline API Automation

Progress
0%

Select Your Operating System

Commands and service definitions update dynamically for your workstation shell.

Step 1 of 6 Est: 3 minutes

Download & Install Ollama Engine

Install the local inference binary and ensure the executable is available in your shell PATH.

Install Ollama CLI

Install via your system package manager or official installer:

PowerShell
# Install via Windows Package Manager PS > winget install Ollama.Ollama PS > ollama --version
zsh
# Install via Homebrew $ brew install ollama $ ollama --version
bash
# Install via official shell script $ curl -fsSL https://ollama.com/install.sh | sh $ ollama --version
Checkpoint 1
Required

Paste the output of ollama --version (e.g. ollama version is 0.3.14):

Step 2 of 6 Est: 2 minutes

Verify Local HTTP REST Daemon

Confirm that Ollama's local server is listening on port 11434.

Check Server Health

Query the local server endpoint to ensure the daemon is active:

Terminal
> curl http://localhost:11434/
💡
Daemon Not Running? If curl returns connection refused, start the desktop application or run ollama serve in a background terminal.
Checkpoint 2
Required

Paste the response from curl http://localhost:11434/ below:

Step 3 of 6 Est: 4 minutes

Pull & Manage Coding Models

Download specialized coding models (such as Qwen 2.5 Coder) optimized for local code synthesis.

Download Model Weights

Pull a lightweight, fast coding model and inspect installed models:

Terminal
# Pull fast 1.5B coding model (~1GB download) > ollama pull qwen2.5-coder:1.5b > ollama list
Checkpoint 3
Required

Paste the output of ollama list showing your downloaded model:

Step 4 of 6 Est: 3 minutes

Interactive Terminal Chat REPL

Engage in an interactive terminal chat with your local model with zero external network connectivity.

Start Interactive Session

Launch the model REPL session in your terminal:

Terminal
> ollama run qwen2.5-coder:1.5b # Inside prompt: Write a Python generator that yields prime numbers # To exit, type /bye
Checkpoint 4
Required

Paste a response snippet from your interactive ollama run session:

Step 5 of 6 Est: 3 minutes

Single Agent Integration & Local REST API

Connect a single autonomous coding agent to Ollama's local endpoint or call Ollama programmatically via its local HTTP API.

Trigger Non-Streaming Completion

Send an HTTP POST request to /api/generate:

PowerShell
PS > $body = @{ model = "qwen2.5-coder:1.5b"; prompt = "Write a python fibonacci function"; stream = $false } | ConvertTo-Json PS > (Invoke-RestMethod -Uri http://localhost:11434/api/generate -Method Post -Body $body).response
zsh
$ curl -s http://localhost:11434/api/generate -d '{"model": "qwen2.5-coder:1.5b", "prompt": "Write a python fibonacci function", "stream": false}' | jq .response
bash
$ curl -s http://localhost:11434/api/generate -d '{"model": "qwen2.5-coder:1.5b", "prompt": "Write a python fibonacci function", "stream": false}' | jq .response
Checkpoint 5
Required

Paste the response generated by the local REST API call:

Step 6 of 6 Est: 2 minutes

Verify Hardware Acceleration & Run Later Card

Inspect GPU VRAM offloading and save the quick reference card for daily local development.

Inspect Active Model Resources

Check active model memory and processor offloading using ollama ps:

Terminal
> ollama ps
Checkpoint 6
Required

Paste the output of ollama ps showing processor allocation:

⚡ Run It Later — Local LLM Reference

Run Coding Model ollama run qwen2.5-coder:1.5b Launches fast offline terminal chat session
List Pulled Models ollama list Displays all models, tags, and disk space usage
Inspect Active Memory ollama ps Shows loaded models, VRAM usage, and GPU %
Pipe File to LLM cat file.py | ollama run qwen "lint" Pipes standard input directly into local model