# Ollama

Ollama 0.35 and later serve System One on your own machine. ThinkThen asks them with `--backend ollama`, with no key and no hosted service.

| Backend name | `ollama` |
| --- | --- |
| Address | `http://localhost:11434/v1` |
| Key variable | `OLLAMA_API_KEY`, not needed on this machine |
| Default model | `nimble`. Name `tev1` with `--model tev1`. |

## Set it up

1. Install Ollama 0.35 or later from [ollama.com](https://ollama.com/download).
2. Run `ollama pull nimble`, and `ollama pull tev1` for the smaller model.
3. Ask with `--backend ollama`. On this machine ThinkThen sends no key.

The examples below run Ollama on a second port, 11535, beside another Ollama on the same machine. So each one names the port with `--url`. On the default port, leave it out. A local Ollama needs no key at any port.

## Descriptions travel as text

Ollama refuses a description written as an object. So this backend alone sends each description as its text. An object's `what` goes, and its other fields stay behind. The plan says so on its first line.

*The plan names the second port and nimble. The first line says descriptions travel as text.*

```
thinkthen check \
  --backend ollama \
  --url http://localhost:11535/v1 \
  --plan |
head -n 4
```

*Output*

```
thinkthen: backend ollama sends each description object as its what text, a temporary workaround for an Ollama bug, so its other fields are left out
url http://localhost:11535/v1/systemone
provider systemone
model asked unspecified
model sent nimble
```

*exit 0*

On 2026-09-30, thinkthen check on build e8f2804fe asked nimble and exited 0, with 0 critical and 3 warning findings.

On 2026-09-30, thinkthen check on build e8f2804fe asked tev1 and exited 0, with 0 critical and 3 warning findings.

Each warning names a description sent as text. Ollama 0.35 ran on the second port for these checks.

## Ask nimble

*The nimble model answers yes, as Jev does.*

```
question="Does the customer ask for a refund?"

printf '%s\n' "I want to send this back." |
thinkthen decide "$question" \
  --backend ollama \
  --url http://localhost:11535/v1
```

*Output*

```
true
```

*exit 0: yes*

*One request carries all three lines. The nimble model gives the same three answers as Jev.*

```
question="Does the customer ask for a refund?"

cat <<'EOF' |
Please refund my order. It arrived broken.
Thanks for the quick help yesterday!
I want to send this back.
EOF
thinkthen decide "$question" \
  --lines \
  --backend ollama \
  --url http://localhost:11535/v1
```

*Output*

```
{"input":"Please refund my order. It arrived broken.","value":true}
{"input":"Thanks for the quick help yesterday!","value":false}
{"input":"I want to send this back.","value":true}
```

*exit 0: the run finished*

## Ask tev1

*The smaller tev1 model also answers yes.*

```
question="Does the customer ask for a refund?"

printf '%s\n' "I want to send this back." |
thinkthen decide "$question" \
  --backend ollama \
  --url http://localhost:11535/v1 \
  --model tev1
```

*Output*

```
true
```

*exit 0: yes*

A pulled model can change under the same name. After a new pull, pass `--refresh-cache` once. It asks every question again and replaces the answers in the answer cache.

## From your language

Each page shows how its language names a backend.

- [Bash](/install/shell/#backends)
- [Python](/install/python/#backends)
- [TypeScript](/install/typescript/#backends)
- [Ruby](/install/ruby/#backends)
- [R](/install/r/#backends)
- [Rust](/install/rust/#backends)
- [C](/install/c/#backends)
- [C++](/install/cpp/#backends)
- [Objective-C](/install/objective-c/#backends)
- [COBOL](/install/cobol/#backends)
- [Ada](/install/ada/#backends)
- [Java](/install/java/#backends)
- [Kotlin](/install/kotlin/#backends)
- [Scala](/install/scala/#backends)
- [C#](/install/csharp/#backends)
- [Go](/install/go/#backends)
- [Swift](/install/swift/#backends)
- [Zig](/install/zig/#backends)
- [PHP](/install/php/#backends)
- [Dart](/install/dart/#backends)

[All backends](/install/backends/) · [Configuration](/install/configuration/)

On GitHub: [github.com/botassembly/thinkthen](https://github.com/botassembly/thinkthen)
