Skip to main content

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 keyLabelUse for
claude_localClaude Code (local)Claude Code CLI on the host machine
codex_localCodex (local)OpenAI Codex CLI on the host machine
gemini_localGemini CLI (local)Google Gemini CLI on the host machine
cursorCursor CLI (local)Cursor Agent CLI on the host machine
opencode_localOpenCode (local)OpenCode CLI with multi-provider model routing
processProcessAny shell command per Heartbeat
httpHTTPWebhook 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 runsclaude_local
OpenAI Codex agent runscodex_local
Gemini CLI agent runsgemini_local
Cursor Agent CLI runscursor
OpenCode multi-provider runsopencode_local
One-shot shell script per Heartbeatprocess
Webhook-driven external runtimehttp
Custom runtimeCreating 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.

Next steps