
# Run Sovrium AI locally with Ollama

You want Sovrium's AI features — AI fields, agents, RAG — to run on a model you host yourself, with no data leaving your server and no per-token bill.

## Point Sovrium at Ollama

Install and start [Ollama](https://ollama.com), pull a model, then set the provider:

```bash
ollama pull llama3.2
export AI_PROVIDER=ollama
export OLLAMA_BASE_URL=http://localhost:11434
sovrium start app.ts
```

Local-first is the default posture — Sovrium routes AI calls through Ollama with no API key. Swap `AI_PROVIDER` to a cloud provider later without touching your config.

## Verify

Trigger any AI field or agent in your app; the request is served by your local model. With no provider configured, AI features boot inert rather than failing.

## Next

- [AI Overview](/en/docs/ai-overview) — the AI fields, agents, and RAG that use this provider.
- [AI Providers](/en/docs/ai-providers) — the full provider precedence and cloud options.
- [AI Eco Routing](/en/docs/ai-eco-routing) — the local-first routing that keeps inference on your hardware.
