Skip to main content
Run an agent on a model that lives on your own computer. No internet connection and no cloud API key are needed. With the default local setup, your prompts stay on the machine.
The agent sends your prompt to the model on the same computer, and the answer comes back the same way. Your prompt never goes over the internet. The model connector may still try to fetch a price list at startup; see Turn off telemetry to stop that.

Quick Start

1

Install Ollama and download a model

Do this once, while you are still online. Get Ollama from ollama.com, then download a model:
The model is saved on your computer. After this, Ollama does not need the internet.
2

Install PraisonAI

The [llm] extra adds the connector PraisonAI uses to talk to Ollama.
3

Create the agent

Save this as agent.py:
4

Run it

No OPENAI_API_KEY is needed. The ollama/ prefix tells PraisonAI to use the local model.
Run the script from your own project folder. If the current folder has an AGENTS.md or CLAUDE.md file, the agent adds it to its instructions, which can change how it answers. Pass rules=False to Agent(...) to turn this off.

Ollama on another computer

If Ollama runs on a different machine in your network, or on a port other than 11434, tell the agent where it is.
With a remote host, your prompts leave this machine and are sent to that computer. Only use a host on a network you trust.
On the other computer, make Ollama listen on the network (not just localhost), then restart it:
Do not expose this port to the internet.
Use base_url= or OLLAMA_API_BASE. Setting OLLAMA_HOST changes where the Ollama server itself listens, but the agent with model="ollama/..." does not use it to find the server.

Check it is really offline

The simplest test: turn off Wi-Fi or unplug the network cable, then run python agent.py again. If you get an answer, the agent did not need the internet. This only works when Ollama is on the same computer: going offline also cuts you off from a remote Ollama host.
This blocks every outgoing connection except to Ollama on localhost:11434, without turning off your network. If Ollama runs on another computer, use (remote ip "*:11434") instead, since the sandbox only accepts localhost or * as the host.
Download the packages on a connected machine, copy them across, and install from the folder. See Offline & CI Install for what PraisonAI does and does not fetch at install time.

Turn off telemetry

Telemetry is off by default in praisonaiagents. It only turns on if someone sets PRAISONAI_TELEMETRY_ENABLED=true. To make sure it stays off on a machine, set:
This wins over PRAISONAI_TELEMETRY_ENABLED=true and over enable_telemetry() in code. DO_NOT_TRACK=true and PRAISONAI_DISABLE_TELEMETRY=true work too. Each accepts true, 1 or yes. The model connector also checks online for an updated model price list when it starts. If it cannot connect it uses the copy it ships with. To skip the check entirely:

Other local model servers

Ollama is the simplest start. PraisonAI also works with LM Studio, llama.cpp and vLLM running on your own hardware. These pages cover them:

Local Models

Ollama, LM Studio, llama.cpp and vLLM

Local Model Resolver

Find a running local server for you

Ollama

More Ollama options

Best Practices

ollama pull needs the internet. Pull every model you plan to use while connected, then check with ollama list.
Always pass model="ollama/<name>". Without it, PraisonAI falls back to a cloud default and asks for an API key.
A small model such as llama3.2 runs on most laptops. Try your real tasks on it before moving to a larger model.

Task handover (early access)

Move tasks to your own AI only after they pass a test

Single Agent Guide

Build out your first agent