Skip to main content

Process Adapter

The process adapter runs any shell command per Heartbeat and streams its stdout back to SLAW.

Type key: process

note

The process adapter is an infrastructure adapter intended for internal use and custom scripting. For AI coding agents, use claude_local, codex_local, gemini_local, cursor, or opencode_local instead.

Configuration

Config fields

FieldTypeDefaultDescription
commandstringrequiredCommand to execute
argsstring[] or stringCommand arguments
cwdstringAbsolute working directory
envobjectEnvironment variables injected into the process
timeoutSecnumber0Run timeout in seconds; 0 means no timeout
graceSecnumber15SIGTERM grace period before SIGKILL

Example

{
"adapterType": "process",
"adapterConfig": {
"command": "/usr/local/bin/my-agent",
"args": ["--run"],
"cwd": "/home/agent/workspace",
"timeoutSec": 300,
"graceSec": 15
}
}

Notes

  • SLAW injects standard SLAW_* environment variables (SLAW_AGENT_ID, SLAW_SQUAD_ID, etc.) into every process run regardless of the env config.
  • The process adapter does not manage sessions — each Heartbeat starts a fresh invocation.

Next steps