---
title: "Connect a local model with Ollama"
canonical: https://agentlaire.com/docs/guides/ollama-local-model
lastUpdated: 2026-11-03
---

# Connect a local model with Ollama

## How does AgentLaire AI Control use a local model?

AgentLaire AI Control talks to Ollama through its OpenAI-compatible API, as a provider of type "OpenAI-compatible (Ollama, vLLM, LiteLLM)". AgentLaire AI Control is free. [See the product page](https://agentlaire.com/ai-control).

The steps are: install Ollama, pull a model, add the provider, test it, allow data sharing and, if you want, make it the default. Nothing is sent to Ollama until a manager allows data sharing.

## How do I install Ollama and pull a model?

Ollama runs models on your own machine or server. Install it from [ollama.com](https://ollama.com), then pull a model that supports tool calls:

```bash
ollama pull qwen3:14b
```

Pick a size your hardware can run. Check that the server answers:

```bash
curl http://localhost:11434/v1/models
```

The reply lists the model you pulled. The name in that list is what you enter as the default model, for example `qwen3:14b`.

## What base URL do I use?

The base URL is where the Odoo server reaches Ollama, ending in `/v1`. `localhost` means the machine Odoo itself runs on.

| Where Odoo runs | Base URL |
| --- | --- |
| Same machine as Ollama, no Docker | `http://localhost:11434/v1` |
| Docker Desktop, Ollama on the host | `http://host.docker.internal:11434/v1` |
| Docker Compose, Ollama in a service called `ollama` | `http://ollama:11434/v1` |
| Another server | `http://<server address>:11434/v1` |

Inside a container, `localhost` is the container, not your computer, so it fails there. On Linux, Ollama listens on the local machine only by default; to reach it from a container, start it with `OLLAMA_HOST=0.0.0.0` and use the host's address.

## How do I add Ollama as a provider?

AgentLaire AI Control keeps providers under **AI Control › Configuration › Connections › Providers**. Click **New** and fill in the dialog:

| Field | Value for Ollama |
| --- | --- |
| Name | Any name, for example "Ollama" |
| Provider Type | OpenAI-compatible (Ollama, vLLM, LiteLLM) |
| Base URL | From the table above. Required for this type. |
| API key | Leave empty. Ollama needs none. |
| Default Model | The model name, for example `qwen3:14b` |

Click **Save and test connection**. The message "Connection successful" with the time in milliseconds means Odoo reached Ollama. The model name is not checked here, so open the provider afterwards and click **Refresh models** to list the models Ollama offers.

A local model has no price. Its cost shows as $0.00.

## How do I allow data sharing?

AgentLaire AI Control blocks a provider from receiving data until an AI Manager allows it. Open the provider and, under **Data sharing**, click **Allow data sharing**. The provider then receives, after the outbound redaction rules:

- the chat messages users send;
- tool results, which hold the records the user can read;
- for AgentLaire AI Dashboards, field names, aggregated tile results when a user asks for an explanation, and sample values only when a manager allows them.

The form shows who allowed it and when. **Withdraw** takes it back. Changing the provider type or the base URL withdraws it too. With a local provider, nothing leaves your own network.

## How do I test the connection again?

Open the provider and click **Test connection** in the form header. The Health, Calls (24 h) and Avg latency (ms) figures at the top of the form fill in as agents use the provider.

## How do I make it the default provider?

Open **AI Control › Configuration › Settings** and choose the provider in **Default provider**, under Providers. Agents use the default provider unless an agent names another. Click **Save**.
