praisonai run "..." works with no API key and no setup.
Start a local model, run a prompt — no OPENAI_API_KEY, no --model, no praisonai setup. When no cloud key is configured but a local endpoint answers, PraisonAI adopts it as the zero-config default.
Quick Start
1
Start Ollama
2
Run a prompt — no key, no model flag
OPENAI_API_KEY. No --model. No praisonai setup.3
See the one-line notice
PraisonAI prints a transparency notice to
stderr, then answers:How It Works
PraisonAI checks for a cloud provider key first. When none is present, it probes for a local endpoint before falling back to the terminal default. A cloud key always wins.Detection precedence
The probe honours your environment in this exact order:OPENAI_BASE_URLif set.- else
OLLAMA_HOSTif set (a barehost:portis accepted; a scheme is added if missing). - else
http://127.0.0.1:11434.
/api/tags first — the first tag becomes ollama/<name>. If that fails, it tries the OpenAI-compatible /v1/models — the first id becomes openai/<id>. This second path detects llama.cpp, LM Studio, and vLLM.
Timing and safety
Environment Variables
Point detection at a specific endpoint with either variable.OLLAMA_HOST is intentionally not a cloud credential — a running local host is not an API key, so it never suppresses local detection.Other local servers
llama.cpp, LM Studio, and vLLM expose an OpenAI-compatible/v1/models endpoint, so they are detected via the fallback probe. Point PraisonAI at the port your server uses:
openai/<id>.
Behaviour Matrix
Detection combines with your terminal mode as follows.
The non-TTY /
--quiet / --output json error message is:
Best Practices
Add a hosted provider when you need one
Add a hosted provider when you need one
Local-first is zero-config, but
praisonai setup is still the way to add a hosted provider (OpenAI, Anthropic, …). Once a cloud key is configured, it takes precedence over any running local server.An explicit --model still overrides detection
An explicit --model still overrides detection
Passing
--model <name> bypasses local detection and routes to that model’s own provider gate. Use it to force a specific model regardless of what is running locally.Force cloud despite a running local server
Force cloud despite a running local server
To ignore a running local endpoint, either unset the local env vars or name a cloud model directly:
Point at a non-default port
Point at a non-default port
For llama.cpp / LM Studio / vLLM on a custom port, export
OPENAI_BASE_URL before running:Related
First-run Onboarding
How PraisonAI routes a keyless first run
Setup
Add a hosted provider credential
Run Command
Run agents from files or prompts
Ollama
Use Ollama models with PraisonAI

