Adapters Overview
An Adapter is the bridge between a SLAW agent and the AI runtime or process that executes each Heartbeat.
When SLAW schedules a Heartbeat, it reads the agent's adapterType and calls the corresponding Adapter's execute() function with the run context. The Adapter starts the right process (or makes the right HTTP call), streams stdout back to SLAW, and returns a structured result. Session identity — the sessionId / cwd pair — is persisted between Heartbeats so AI coding adapters can resume a prior conversation.
Built-in adapters
| Type key | Label | Use for |
|---|---|---|
claude_local | Claude Code (local) | Claude Code CLI on the host machine |
codex_local | Codex (local) | OpenAI Codex CLI on the host machine |
gemini_local | Gemini CLI (local) | Google Gemini CLI on the host machine |
cursor | Cursor CLI (local) | Cursor Agent CLI on the host machine |
opencode_local | OpenCode (local) | OpenCode CLI with multi-provider model routing |
process | Process | Any shell command per Heartbeat |
http | HTTP | Webhook endpoint invoked per Heartbeat |
process and http are infrastructure adapters. For agent creation, choose one of the AI coding adapters.
Choosing an adapter
| If you want… | Use |
|---|---|
| Claude Code agent runs | claude_local |
| OpenAI Codex agent runs | codex_local |
| Gemini CLI agent runs | gemini_local |
| Cursor Agent CLI runs | cursor |
| OpenCode multi-provider runs | opencode_local |
| One-shot shell script per Heartbeat | process |
| Webhook-driven external runtime | http |
| Custom runtime | Creating an Adapter |
External adapters
Squads can install third-party or self-built adapters as plugins. An external Adapter ships a ServerAdapterModule-compatible npm package that SLAW loads at startup. External adapters can optionally include a ui-parser.js bundle to render agent transcripts with custom formatting.
See External Adapters and Creating an Adapter.