What every adapter does
An adapter owns the agent process. The contract is small but strict:- Launch — spawn the agent process inside the workspace with a fresh environment, pass the lease token and the MCP server URL, stream stdin/stdout/stderr into the orchestrator’s log collector.
- Forward tool calls — when the agent writes a tool call to its output stream, parse it, validate it against the agent’s permissions, call the MCP server, and pass the result back to the agent.
- Track the process group — use
detached: trueand group signaling so that killing the agent kills every child it spawned (no zombies). - Renew leases — call the lease renewal endpoint on the configured cadence so the task stays owned.
- Report progress — pass structured progress events up to the orchestrator as they happen.
- Shut down cleanly — on normal exit, abnormal exit, or orchestrator-initiated kill, tear down the process group, flush logs, release the lease, and report the final exit reason.
Adapters that ship in the box
Company Agents ships with adapters for eight popular runtimes:| Adapter | Kind | Use when |
|---|---|---|
| Claude Code | local | You want Claude’s coding agent with its full toolchain |
| Codex | local | You want OpenAI Codex as a coding agent |
| Gemini CLI | local | You want Google’s Gemini CLI as the runtime |
| Cursor Agent | local | You want Cursor’s agent mode from the command line |
| OpenClaw | local | You want our in-house OSS agent runtime |
| OpenCode | local | You want the open-source OpenCode runtime |
| Hermes | http | You want a remote Hermes agent over HTTP |
| Pi | http | You want to run the Pi inference engine on a GPU box |
- Local adapters launch a CLI binary on the same host as the orchestrator. The adapter handles stdio, process group, everything.
- HTTP adapters talk to a remote agent over HTTP. There is no local process; the adapter owns a session on the remote side and relays tool calls through the MCP server.
Picking an adapter
A few rules of thumb:- Use Claude Code for coding tasks if you are already paying for Anthropic. It has the best tool calling out of the box.
- Use Codex for coding tasks if you are already paying for OpenAI. It is similar in capability to Claude Code.
- Use Gemini CLI for multimodal tasks. Gemini’s image and document understanding is strong.
- Use OpenClaw or OpenCode if you want an OSS runtime you can modify, or if you want to avoid closed model costs entirely.
- Use Pi over HTTP if you have a GPU box running Pi and you want its small, fast inference for high-volume tasks.
- Use Cursor if the agent needs tight IDE-style feedback and you are already using Cursor.
- Use Hermes if you are running the Hermes remote service.
What adapters do not do
Adapters do not:- Pick tasks (the orchestrator does)
- Manage budgets (the orchestrator does)
- Decide tool permissions (the agent policy does, enforced by the MCP server)
- Write to the audit trail (the orchestrator does)
- Store memory (the memory system does, through the MCP tools)
The adapter SDK
All of this is implemented in the adapter SDK, which lives atpackages/adapters/sdk/. The SDK provides:
- A
ProcessAdapterbase class for CLI-based adapters - An
HttpAdapterbase class for HTTP-based adapters - A process group helper that handles
detached: trueand negative PID signaling - A lease renewal loop
- A stdio parser that recognizes progress events and tool calls
- A shutdown sequencer that always runs to completion