Local Models

fai works with any OpenAI-compatible endpoint. You don't need Claude. You don't need any API key at all — Ollama is free and runs entirely on your machine.

Local providers

Install any of these, then run fai detect — fai finds them automatically.

ProviderDefault portGet it
Ollama11434ollama.ai
LM Studio1234lmstudio.ai
LocalAI8080localai.io

Recommended for most users: Ollama + a 7B coding model (e.g. qwen2.5-coder:7b).

Cloud API keys (optional)

Set these env vars if you have API keys:

Env varProvider
OPENROUTER_API_KEYOpenRouter — access to many models including Claude
GROQ_API_KEYGroq — very fast inference, generous free tier
OPENAI_API_KEYOpenAI

Note: ANTHROPIC_API_KEY is not supported directly — the Anthropic API is not OpenAI-compatible. To use Claude models, set OPENROUTER_API_KEY instead.

Detecting your setup

fai detect

Scans local ports and env vars. Prints what's installed and reachable. Cached at ~/.fai/detect.json.

Useful flags:

fai detect --models     models and API keys only
fai detect --agents     coding agents only
fai detect --verify     re-scan and verify each endpoint is reachable

Configuring synthesis

fai synthesize

Opens an interactive wizard to pick your synthesis provider. fai picks the best available option in this order:

  1. Ollama (local, free)
  2. LM Studio (local, free)
  3. LocalAI (local, free)
  4. OpenRouter (OPENROUTER_API_KEY)
  5. Groq (GROQ_API_KEY)
  6. OpenAI (OPENAI_API_KEY)
  7. claude-code (if claude is on your PATH)
  8. capture-only (no synthesis — sessions still capture, synthesis runs later)

To skip the wizard and auto-configure from whatever's detected:

fai synthesize --non-interactive

What synthesis does

Synthesis distills your session captures — conversations, decisions, patterns — into structured knowledge that persists in your vault. Without a synthesis provider configured, fai still captures everything; synthesis just runs later when a provider is available.

The capture-only fallback means fai is never blocked — your work is always preserved.


Commands → — full fai command reference Agents → — configure which AI tool to use

On this page