Skip to content

Agents & providers

OpenLoop ships no model integration of its own. A provider wraps a coding-agent CLI and runs it as a subprocess with a task prompt; everything else (scheduling, validation, promotion) is provider-agnostic.

Provider Binary Invocation
pi (default) pi pi -p <prompt> [--model <m>]
claude claude claude -p <prompt> --output-format json --permission-mode acceptEdits
aider aider aider --message <prompt> --yes
codex codex codex exec --json <prompt>
opencode opencode opencode run <prompt>
custom any sh -c '<command> "$OPENLOOP_PROMPT"', per-project, see custom agents

Check what’s available on your machine:

Terminal window
openloop config list-providers
✅ pi , Pi
❌ claude , Claude Code
✅ aider , Aider
+ custom, Run any shell command (configure per-project)

Resolution order: project configglobal defaultpi.

Terminal window
# global default
openloop config set-provider claude
# per-project (what you'll usually want)
openloop config project-set-agent api claude

Each tool keeps its own credentials, OpenLoop never stores or forwards API keys.

The model used for a run resolves as: CLI --model flagproject pi.modelglobal model.

Terminal window
openloop config set-model anthropic/claude-sonnet-4-5 # global
openloop config project-set-model api openai/gpt-5.2-codex # project
openloop run-once -p api --model <model> # one-off override

What model identifiers are valid depends on the provider; they are passed through verbatim.

Providers parse token usage and cost from the agent’s output (Claude’s full-JSON mode, the last JSON line for pi/codex, …). When output can’t be parsed (or a run is killed by the timeout), cost falls back to the configured estimate (budgets.estimatedCostPerRunUsd, default $0.10) for budget accounting.

The task prompt is assembled from the scheduler role plus the repo’s prompt files (defaults: .agents/skills/openloop/SKILL.md, .pi/SYSTEM.md, .pi/APPEND_SYSTEM.md, configurable via pi.promptFiles). Preview the exact prompt with:

Terminal window
openloop run-once -p api --dry-run
  • agent.extraArgs in project.json appends arguments verbatim, e.g. a stricter Claude permission mode.
  • openloop run -p api --prompt "..." bypasses the scheduler and runs Pi directly against the repo (it always uses runPi, regardless of the configured provider).