A durable command runner for AI agents

Start now. Observe briefly. Reconnect when it matters.

agent-exec runs unknown-duration commands as managed jobs and returns a stable job_id plus structured JSON for status, logs, and control.

Install agent-execRead the quick start

One call starts work. One ID follows it.

JOB=$(agent-exec run --no-wait -- sh -c 'sleep 2; echo done' \
  | sed -n 's/.*"job_id":"\([^"]*\)".*/\1/p')
agent-exec wait "$JOB"
# {"schema_version":"0.1","ok":true,"type":"wait","job_id":"…","state":"exited","exit_code":0,"stdout":"done\n","stderr":"","encoding":"utf-8-lossy","stdout_range":[0,5],"stderr_range":[0,0],"stdout_total_bytes":5,"stderr_total_bytes":0,"updated_at":"2026-07-20T00:00:00Z"}

wait returns the completion state, exit code, and bounded output. Use tail to reread logs later.

More than a detached shell

CapabilitySubprocessnohupagent-exec
Returns earlyNoYesYes
Stable job IDNoNoYes
Structured status and logsLimitedNoYes
Reconnect laterNoManualYes

Release platforms

Prebuilt binaries support Linux x86_64 and macOS Apple Silicon. Windows release binaries are not provided.

Installation details

Agent integrations

Use the same lifecycle through the CLI, MCP stdio server, or HTTP server.

Connect an agent

Predictable output

Response-producing CLI commands emit one JSON object on stdout. Diagnostics stay on stderr.

Output contracts

Keep long-running work observable.

Get started Latest release