Adapters
Barry runs a session on one of several coding harnesses, each through its own adapter. The harnesses are Antigravity (experimental), Claude Code, Codex, Cursor, OpenCode, and Pi. The identity or the session chooses one.
Each adapter declares its capabilities and modes against the harness contract, and the declarations describe what Barry implements, not everything each vendor’s tool can do. The adapter notes cover the contracts behind them.
Harnesses
Section titled “Harnesses”| Harness | ID | Session flag |
|---|---|---|
| Antigravity (experimental) | antigravity |
--antigravity or --agy |
| Claude Code | claude-code |
--claude-code or --claude |
| Codex | codex |
--codex |
| Cursor | cursor |
--cursor |
| OpenCode | opencode |
--opencode |
| Pi | pi |
--pi |
Each installed adapter adds its own session flags: one for its ID and one for
each alias. --adapter <name> names any installed adapter by ID or alias. A
harness that barry adapter list doesn’t show has no flag, and flags that name
two different harnesses are an error.
Every harness runs on the identity’s key for the model’s vendor. Without that key, Barry refuses the session before it starts: no harness falls back to your own login.
Model endpoints
Section titled “Model endpoints”z.ai, Ollama, and llama.cpp are model endpoints, not agents. Each serves models over another vendor’s API, so an agent that speaks that API runs against a different base URL. z.ai serves the Anthropic Messages API. Ollama and llama.cpp serve both the Anthropic Messages API and an OpenAI-compatible API. Pair an endpoint flag with an agent flag to choose the harness that runs the session. Barry refuses an agent flag combined with an endpoint that agent cannot reach.
| Endpoint | Key | Flag | Endpoint’s default model | Address and credential |
|---|---|---|---|---|
| z.ai | zai |
--zai |
glm-5.2 |
https://api.z.ai/api/anthropic, with Z_AI_API_KEY |
| Ollama | ollama |
--ollama |
qwen3:4b |
BARRY_OLLAMA_URL from the session environment, else Ollama’s default port, 11434. Barry always sends a placeholder key, never your own credential |
| llama.cpp | llamacpp |
--llamacpp |
The model llama-server has loaded |
BARRY_LLAMACPP_URL from the session environment, else port 8080. Barry always sends a placeholder key |
A session with no endpoint uses the harness’s own.
The model catalog is
shipped-catalog.yaml.
It is advisory: -m accepts a model ID the catalog does not list, with a
warning.
Before an Ollama session starts, Barry checks whether the model makes a real tool call and prints the result. The session starts whatever the result.
Choose an adapter and model
Section titled “Choose an adapter and model”Configure a harness for every session of an identity, or pick one for a single
session. An identity holds its harnesses under adapters: in identity.yaml,
each with its own model, mode, and whether it is the default.
| Flag or command | Effect |
|---|---|
<identity> identity adapters set <harness> |
Configure an installed harness on the identity: antigravity, claude-code, codex, cursor, opencode, or pi |
--model <model> |
Set that harness’s model. Add --provider <vendor> for a bare model id the catalog does not list |
--mode <mode> |
Set the launch mode the harness declares |
--default |
Make this the identity’s default harness |
<identity> identity adapters remove <harness> |
Remove the identity’s entry for a harness |
--codex, --cursor, --opencode, --pi, --claude, --antigravity |
Run one session on that installed harness |
--adapter <name> |
Run one session on the installed adapter with that ID or alias |
--zai, --ollama, --llamacpp |
Run one session on that endpoint |
--model-provider <key> |
Choose the endpoint by key, for example ollama |
-m <model>, --model <model> |
Use this model for the session |
<identity> session start and <identity> session resume both take the
harness and endpoint flags. session resume does not take -m.
For example:
<identity> identity adapters set cursor --default<identity> identity adapters set claude-code --model glm-5.2 --provider zai<identity> session start --codex<identity> session start --ollama -m qwen3:8bBarry resolves each choice in this order:
| Choice | Order |
|---|---|
| Agent | An agent flag or --adapter, then the entry under the identity’s adapters: marked default: true, including an entry it inherits from its parent identity. Pair an endpoint flag with an agent flag to choose the harness |
| Endpoint | --model-provider, --zai, --ollama, or --llamacpp, then the vendor in the identity’s adapters.<harness>.model (written as vendor/model; --provider stores it that way), then the endpoint the catalog lists for the model. Two different endpoint flags are an error |
| Model | -m, then the identity’s adapters.<harness>.model, then the endpoint’s default model |
With --prompt, a Codex session runs through Barry’s session API instead of
in the terminal.
Capabilities
Section titled “Capabilities”| Capability | Antigravity (experimental) | Claude Code | Codex | Cursor | OpenCode | Pi |
|---|---|---|---|---|---|---|
| Modes | Hosted, instrumented, guest | Hosted, instrumented, guest | Hosted, instrumented, guest | Hosted, guest, and instrumented on macOS | Hosted, guest | Hosted |
| Native tool denial | A Barry hook gate in every mode | disallowedTools and a per-call hook in hosted. --disallowed-tools in the terminal modes |
Feature switches and a Barry hook gate in every mode | The session workspace’s .cursor/cli.json permission list, plus Barry’s project hooks in the terminal modes |
Permission rules in its configuration. A denied tool never reaches the model | excludeTools. An excluded tool never reaches the model |
| System prompt | Written to AGENTS.md and GEMINI.md in the session workspace |
Appended to Claude Code’s own | Passed as developer instructions | Written to AGENTS.md in the session workspace |
None. Guidance reaches the agent only as prompt text | Appended to Pi’s own |
| Skills | Mounted as a plugin | Mounted as a plugin | Not mounted | Mounted as a plugin | Not mounted | Mounted as a plugin |
| Structured output in hosted | Native schema | Native schema. Prompted and validated on Ollama | Native schema. Prompted and validated on Ollama | Prompted and validated | Prompted and validated | Prompted and validated |
| Another vendor’s endpoint | No | Yes | Yes | No | No | Yes |
| MCP transports | stdio, HTTP, SSE | stdio, HTTP, SSE | stdio, HTTP | stdio, HTTP | stdio, HTTP, SSE | stdio, HTTP |
| Model discovery | Yes | No. Ollama and llama.cpp list from the daemon | No | Yes | No | Yes |
Antigravity, Cursor, and OpenCode connect to their own vendors, so Barry
can’t point them at another vendor’s endpoint. OpenCode names its models
vendor/model in its own configuration, and a session runs only a model
OpenCode serves itself.
Every mode a harness has gates native tools, but not equally. Enforcement coverage in the bounds reference holds the canonical table: the gate, the tools a mode can’t turn off, the operator override, and the egress sandbox for each harness and mode.
Local models on Ollama can describe a tool call instead of making one. For a model with fewer than 30 billion parameters, or one whose size the daemon does not report, Barry prints a warning before the session starts. A passing preflight check doesn’t guarantee later tool calls.
Related
Section titled “Related”Session modes explains what Barry holds in each mode, and Policy resolution explains how Barry computes the policy each harness enforces.