Providers and backends

Cairn can run agents through Anthropic, OpenAI, OpenRouter, or Ollama. Configure accounts, hosts, the default provider, and tier mappings in Settings > Workspace > Providers.

Configure a provider

The Providers page opens on Overview. Select the default provider there and review the tier matrix. Open a provider tab to connect an account and refresh its live model catalog.

Anthropic and OpenAI can use supported subscription sign-in, an API key, or authentication already available through an installed command-line tool. OpenRouter uses an API key. Ollama uses one or more host addresses rather than an account credential. The controls shown in each provider tab are the current authority because available authentication methods and catalogs can change.

Accounts are ordered by priority within a provider. Provider tabs show account status and usage information when that provider makes it available. Add or connect an account before relying on its catalog or assigning its models to tiers.

Capability tiers

Agents request a capability tier rather than embedding a model identifier. The built-in tiers are small, medium, and large; Settings displays them as SM, MD, and LG. The tier matrix shows which model and options each configured provider currently assigns to each tier. You can also add custom tiers.

The model catalog is discovered from the provider or configured Ollama hosts. Do not rely on a model table in documentation for the current mapping. Refresh the provider catalog and read the tier matrix in Settings.

In the Agent editor:

  • a tier states the capability mapping the agent should use;
  • Any backend uses the workspace's default provider;
  • a provider preference asks to resolve that tier through the chosen provider.

A run stores the resolved provider and model in its agent snapshot. Changing a provider default later does not silently move an existing execution to another model.

How each backend runs

Anthropic uses the installed Claude command-line tool. OpenAI uses the installed Codex app server. These provider processes manage their model conversations while Cairn supplies the agent's tools, branch, transcript, and execution boundary.

OpenRouter uses its HTTP API. Cairn manages the conversation and tool loop and sends requests to the model OpenRouter routes to.

Ollama uses the OpenAI-compatible API at hosts you configure. The provider page discovers models installed on those hosts and shows which hosts serve them. If several configured hosts serve the same model, account priority determines which eligible host is tried first.

Every backend presents the same Cairn tools to the agent. Provider-native file and shell tools are not the mechanism agents use to modify a Cairn job.

Credentials and data flow

Provider credentials are kept by the configured runner and protected at rest by the storage mechanism available for that provider and platform. A local runner uses them to authenticate directly to the provider. If you select a remote executor, Cairn may lease the required credential to that executor for the run. Cairn's hosted account control plane is not an agent-credential vault. A subscription or command-line login changes how the request is authenticated; it does not keep the request on the machine.

When an agent uses Anthropic, OpenAI, or OpenRouter, its prompts and the context supplied to the model are sent to that provider. OpenRouter may send the request onward to the selected model provider according to its routing. Review the provider's data terms before using it with a repository.

With Ollama, requests go to the host address you configured. Data stays on your machine only when that host and every network path involved are under your control; a remote Ollama host receives the prompt and supplied context.

External tools can have their own data flows. A configured Model Context Protocol server receives tool arguments and protocol context, plus configured authentication headers or environment. GitHub webhooks use a relay with a separately documented boundary. See Privacy and data boundaries for the complete boundary map and GitHub for relay behavior.

Agent boundary

The Agent editor's fence setting controls actions outside the agent's project boundary:

  • Ask pauses for approval.
  • Deny refuses the action.
  • Allow removes that boundary.

The fence is separate from provider authentication and model selection. Configure the provider in Providers, then configure an agent's tier, optional provider preference, and fence in Agents. See Agents and skills.