AI (local)

Ollama integration

Ollama runs models on your machine, your LAN or Tailscale. Ahena treats it as a local provider: the CLI verifies and checks it on your machine and reports the results, and Ahena's servers never contact the endpoint. The generated ahena.ai adapter lets development use Ollama while production uses a hosted provider.

Live verifiedLive verified: local connection, model inspection and DoctorFull Ollama docs

What Ahena inspects

Read-only: inspecting and Doctor never change anything at Ollama.

  • Whether the endpoint is reachable, and its version.
  • How exposed it is: LAN or Tailscale, public https, or public plain http.
  • The models you've pulled (ahena inspect ollama), and the configured model's capabilities and context length.
  • Latency, from one one-token generation (Ollama's own timings, excluding load time).

Nothing to configure

Ollama has nothing to plan or apply. Ahena gives you Doctor, model discovery and a generated adapter behind the common ahena.ai interface, so each environment can use a different AI provider. See AI providers.

Generated code: src/ahena/ai/providers/ollama.ts behind ahena.ai.generate().

How Ahena verifies

There's nothing to read back: Ahena changes nothing on your machine, so there's no plan, apply or VERIFIED state.

Doctor runs Ollama's checks locally and stores the results with the run. Until you run ahena doctor from your machine, the dashboard says Ollama hasn't been checked yet, never that it's healthy.

What Doctor diagnoses

Key checks from ahena doctor. Each finding says why it matters, where, the impact and whether Ahena can fix it. The full list is in the Ollama docs.

CheckWhat it means
ollama.endpointReachable (with version), or how to start it.
ollama.exposureLAN or Tailscale (INFO); public https (WARNING: needs an auth proxy); public plain http (FAIL).
ollama.modelThe configured model is pulled.
ollama.capabilities / ollama.contextThe model can generate text; context length (WARNING under 8K).
ollama.latencyOne-token generation time, excluding load time.

More on findings, health and continuous checks: Doctor.

Approvals

There's nothing to approve: connecting, Doctor, ahena inspect and ahena generate change nothing in your Ollama account. Generated code is written to your repository, where you review it like any other change.

Manual steps

Ahena can't do these for you:

  • Install Ollama and start it (ollama serve).
  • Pull your model: ollama pull llama3.2.
  • Set AI_PROVIDER=ollama in development if several adapters exist.

Credentials and permissions

NameSecretNotes
OLLAMA_HOSTNoFor example http://localhost:11434.
OLLAMA_API_KEYYesOptional, for an authenticating proxy. Read from your local environment when Doctor runs.

Least privilege

  • None at Ahena. Ollama itself has no authentication: never expose it to the internet without an authenticating proxy (Doctor fails public plain-http endpoints).

Ahena stores no secret for Ollama: OLLAMA_API_KEY stays in your local environment. See security.

Workflow example

Connect, check, then generate. There's no plan or apply step for an AI provider.

  1. ahena connect ollama --set OLLAMA_HOST=http://localhost:11434

    Connect; the CLI verifies the server on your machine before saving.

  2. ahena doctor

    Run Ollama's checks locally and report them.

  3. ahena inspect ollama

    List the models you've pulled.

  4. ahena generate

    Write the ahena.ai adapter for development.

Verification status

Live verified

Live verified: local connection, model inspection and Doctor

Verified against the real provider API for the capabilities listed. Its other capabilities are validated by Ahena's automated provider contract and conformance tests.

How Ollama is tested
  • Verified against a real local Ollama (0.35): connect, model listing, Doctor (including one one-token generation for latency), disconnect and reconnect, an unreachable server, a hung server, and secret handling.
  • The generated adapter is also run in Ahena's tests with Ahena stopped.

The providers overview explains Ahena's testing methodology and what has been verified for every provider.

Limitations

  • Ahena can't check it from the dashboard or CI: checks run where the CLI runs.
  • Local models differ from hosted ones in quality, speed and context length.
  • There's no drift tracking for AI providers.

Disconnecting

ahena disconnect ollama removes the connection; nothing on your machine is changed.