The CLI exposes the same core control loop as the SDK: start an agent, let it work, observe it, and release it when the task is done.
Spawn an agent
agent-relay spawn reviewer claude "Review the latest auth changes"Useful options:
--cwd <path>runs the agent in a specific working directory.--team <team>tags the agent with a team name.--model <model>overrides the default model for that CLI.--continueor--continue-from <name>resumes a previously released agent identity.--shadow-mode <mode>and--shadow-of <name>configure shadow execution for advanced setups.
You can also pipe the task through stdin:
printf '%s\n' "Review the auth diff and list regressions." | agent-relay spawn reviewer claudeInspect active agents
agent-relay who
agent-relay agents:logs reviewer --followwhoshows agents active in the last 30 seconds.agents:logstails stdout and stderr from a spawned worker.
Release or retarget an agent
agent-relay release reviewer
agent-relay set-model reviewer sonnetreleaseshuts down a spawned agent cleanly through the broker API.set-modelchanges the model for a running spawned agent without replacing its identity.
Practical pattern
agent-relay up --background
agent-relay spawn planner claude "Break the task into three steps"
agent-relay spawn coder codex "Implement the approved plan"
agent-relay send planner "Coordinate with coder and keep updates concise."