Skip to main content
CLI-backed agent classes wrap external AI command-line tools and implement the AI SDK Agent interface. Use them anywhere Smithers accepts an agent, including <Task>. Reach for these for a vendor’s full CLI surface (sessions, sandboxes, slash commands, MCP). For API-billed provider wrappers, see SDK Agents.
API reference: Agents lists every agent class, its options, and links to source and tests.

Quick Start

Available agents

CLI binaries must be on PATH: codex, claude, agy, gemini, pi, kimi, forge, hermes, amp, vibe, opencode, openclaw, pool. HermesCliAgent drives the Hermes agent CLI. It is distinct from HermesAgent, which talks to the Hermes model over an OpenAI-compatible HTTP API. Use HermesCliAgent to delegate a task to the Hermes coding agent itself; use HermesAgent to call a Hermes model endpoint. OpenClawAgent drives openclaw agent in JSON mode. Pass agent for a named OpenClaw agent, sessionId to resume a session with --session-id, workspace to set the workspace path, and continueSession when the installed CLI should continue its active session.

Default routing: Codex builds, Claude gates

When bunx smithers-orchestrator init detects usable Codex authentication, its generated building pools start with Codex workers using exact model pins, and the orchestration seats run on Claude: Start substantial implementation on Terra; escalate to Sol for ambiguity, high-stakes decisions, novel architecture, final review, or repeated failure; keep Luna on trivial, minimal-risk work only. Never give GPT-5.6 Sol or Terra the orchestration or gating seat; those decisions run on Claude, with Codex Sol behind it only as an availability fallback. Other adapters stay later in automatic sequential fallback chains, while an explicitly constructed provider agent remains a deliberate choice. See SOTA role defaults.

Oh My Pi (OMP) CLI Agent

OmpAgent runs the installed OMP v17.0.5 harness in headless text, JSON print, or RPC mode.
Smithers emits only flags verified by omp --help: --print, --mode, model/provider/API-key and system-prompt options, --cwd, session controls, tools, extensions, plural comma-separated --skills, thinking (off, minimal, low, medium, high, xhigh, max, or auto), hooks, --max-time, and approval controls. A valued --resume takes precedence over continueSession; --continue selects OMP’s recent session. In RPC mode, prompts are sent over stdin and file arguments are rejected. JSON print mode emits a session header followed by agent-session events such as text deltas, tool execution lifecycle events, and agent_end. RPC mode begins with ready, negotiates get_state, then sends a correlated prompt; it has no print-mode session header and completes on agent_end or documented local-only prompt completion. Pi-only flags such as --session, --list-models, singular --skill, --prompt-template, and --theme are not emitted.

Codex CLI Agent

CodexAgent is the Smithers wrapper for OpenAI’s codex CLI. It runs codex exec in non-interactive mode, sends the task prompt over stdin, forces --json so Smithers can stream structured progress, and captures the final assistant message via --output-last-message.
For ChatGPT-account Codex auth, use an exact Codex model id such as gpt-5.6-luna; do not invent a -codex suffix.

Authentication

  • Subscription login: run codex login once. For isolated accounts, pass configDir; Smithers sets CODEX_HOME for that invocation.
  • apiKey: Smithers sets OPENAI_API_KEY on the spawned process, but Codex CLI >= 0.144 ignores that variable for auth/billing selection when subscription login is present. The option is therefore effectively inert on current CLIs; the subscription login wins.
  • Account registry: bunx smithers-orchestrator agents add --provider codex ... registers a subscription config directory, while --provider openai-api registers API-key billing for Codex-compatible providers.

Structured output

  • If the Smithers task has an output schema and outputSchema is not set, Smithers writes a temporary OpenAI-compatible JSON Schema file and passes it as --output-schema.
  • Resume attempts use codex exec resume <thread-id> and skip --output-schema, matching the Codex CLI’s resume command surface.
  • Hijack opens native Codex with codex resume <thread-id> -C <cwd>.

Claude Code CLI Agent

ClaudeCodeAgent is the Smithers wrapper for Anthropic’s claude CLI. It runs the CLI non-interactively, captures the final assistant message, and (by default) forces --output-format stream-json so Smithers can stream structured progress.

Authentication

  • Subscription billing (default): ClaudeCodeAgent clears ANTHROPIC_API_KEY from the spawned process so the CLI bills your Claude Pro/Max subscription instead of the API. No key is required. The agent logs a one-time warning when it unsets an inherited ANTHROPIC_API_KEY.
  • Subscription login: the claude CLI stores credentials per config directory. To set up an isolated subscription, run CLAUDE_CONFIG_DIR=<dir> claude once and complete /login interactively. The credentials land at <dir>/.credentials.json.
  • Pinning a subscription: pass configDir to use that directory’s credentials. Smithers sets CLAUDE_CONFIG_DIR=<configDir> for that invocation, so you can run several subscriptions side by side. Omit it to use the default ~/.claude/.
  • API billing: pass apiKey to bill the Anthropic API instead. When apiKey is set, Smithers stops clearing ANTHROPIC_API_KEY and forwards your key as ANTHROPIC_API_KEY to the spawned claude process.
Codex also supports codex login / CODEX_HOME via configDir. Although its apiKey option sets OPENAI_API_KEY, current Codex CLIs do not use that variable to switch away from subscription auth.

Subscription-mode structured completion

You do not need a Workflow or Task graph to call a model once and get a typed object back. Construct a CLI agent and call agent.generate({ prompt, outputSchema, timeout, abortSignal }) directly. With no apiKey, the call bills the host subscription, returns a single completion, and is bounded by timeout and abortSignal. generate() resolves to an AI SDK GenerateTextResult. Read the full text from .text; when the response is valid JSON, Smithers parses it into .output using the AI SDK 7 structured-output field.

Claude Code (subscription, no API key)

ClaudeCodeAgent.generate() does not auto-inject the schema into the prompt (that injection happens inside <Task>), so when calling it standalone, instruct JSON in the prompt yourself. outputSchema drives .output parsing and validation. Setting outputFormat: "json" and tools: "" keeps the run a single quiet completion with no tool use.

Codex (subscription, strict JSON)

CodexAgent with nativeStructuredOutput: true forwards the schema to the CLI as codex exec --output-schema, so the model is constrained to emit JSON matching the schema. No API key is needed; it bills your ChatGPT subscription via ~/.codex/auth.json (or CODEX_HOME when configDir is set).
Notes:
  • No API key is required for either agent; the call bills the host subscription.
  • outputSchema is honored differently per agent: Codex constrains decoding via --output-schema (strict JSON); Claude Code relies on the JSON you ask for in the prompt and parses it into .output. Both validate against the schema.
  • A single generate() call returns one completion. There is no graph, no durability, and no retry loop unless you add one. For schema-validation retries, durability, and multi-step orchestration, wrap the agent in a <Task>.
  • timeout: { totalMs, idleMs } caps wall-clock and idle time; pass an AbortSignal to cancel from the outside.

Common options

All CLI agents accept the same base option surface:
Per-call timeout override:

Per-agent extras

ClaudeCodeAgent extends the base with Claude Code-specific session and permission flags. Key additions: permissionMode, sessionId, mcpConfig, resume.

Allow-list and deny-list tools

allowedTools and disallowedTools are independent string arrays that map to the Claude Code CLI’s --allowed-tools and --disallowed-tools. Use them together: allowedTools whitelists what the agent may use, and disallowedTools hard-blocks tools even if they would otherwise be allowed. To let an agent read and write files but never run a shell, list both:
Setting allowedTools alone does not block Bash; the deny-list is what forbids it. Tool names follow the Claude Code convention (Read, Write, Edit, Bash, WebFetch, Grep, …) and Bash(git:*)-style scoping is allowed.

MCP servers (mcpConfig)

mcpConfig is a string array passed straight through to the CLI’s --mcp-config flag. Each entry is either a path to an MCP config JSON file or an inline JSON string (the Claude Code CLI accepts both forms), so you can mix them:
CodexAgent extends the base with OpenAI Codex-specific flags. Key additions: sandbox, config, outputSchema.
AntigravityAgent wraps the Google agy CLI. Key additions: allowedMcpServerNames, geminiDir, conversation, continue, and resume.
Current agy builds changed several Gemini-era flags. Smithers treats that as a runtime contract, not a best-effort pass-through: Smithers does not emit --output-format, --include-directories, --resume, --screen-reader, --debug, extension flags, session-list flags, or --prompt for Antigravity. Options that would require those removed flags fail fast with AGENT_CONFIG_INVALID and a replacement hint. Plugins are managed outside workflow launch through agy plugin. GeminiAgent is the deprecated legacy wrapper for the older gemini CLI. Prefer AntigravityAgent for new Google CLI integrations, but existing workflows can still use GeminiAgent.
PiAgent wraps the Pi CLI and adds extension UI hook support. Key additions: provider, model, mode, onExtensionUiRequest, extension, thinking.
KimiAgent wraps the Moonshot Kimi CLI with automatic session isolation. Key additions: thinking, agent, maxRalphIterations.
Unlike the other agents, KimiAgent’s configDir sets the KIMI_SHARE_DIR environment variable for that invocation (Kimi has no separate config-dir flag), pinning credentials and session state to <configDir> instead of the default ~/.kimi/. It is exactly equivalent to env: { KIMI_SHARE_DIR: "<configDir>" }; the configDir name just keeps the option uniform across agents. ForgeAgent wraps the Forge CLI and supports 300+ models via provider/model strings. Key additions: conversationId, provider, workflow.
HermesCliAgent wraps the Nous Research Hermes Agent CLI in its headless one-shot mode (hermes -z "<prompt>"): a single prompt in, the final response text out. Key additions: provider, continueSession. A per-call resumeSession emits -r <session>; a configured continueSession emits -c [name].
Smithers also installs a native Hermes plugin (slash commands, a live-run status injector, lifecycle hooks, a bundled skill, and approval buttons) when you run bunx smithers-orchestrator hermes (an alias for bunx smithers-orchestrator mcp add --agent hermes), so Hermes can drive Smithers as its durable control plane. See the Hermes & Eliza page. OpenClawAgent wraps the OpenClaw gateway-backed agent CLI via openclaw agent --message <prompt> --json. Key additions: agent, session, workspace, json, and continueSession. A per-call resumeSession emits --session-id <id>, so Smithers can route retries or continuations into the right OpenClaw conversation when the installed CLI supports sessions.
Smithers also installs a native OpenClaw plugin when you run bunx smithers-orchestrator mcp add --agent openclaw. The plugin adds Smithers workflow tools, a bundled orchestration skill, and eval/optimization tools that encourage OpenClaw to turn repeated work into reusable, measured workflows. See OpenClaw. AmpAgent wraps the Amp CLI in --execute headless mode. Key additions: visibility, mcpConfig, dangerouslyAllowAll.
VibeAgent wraps Mistral’s vibe CLI with streaming JSON output. Key additions: agent, maxTurns, maxPrice, maxTokens, enabledTools, sessionId, continueSession.
OpenCodeAgent wraps the OpenCode CLI via opencode run --format json. Key additions: agentName, continueSession, sessionId. Note: native hijack support is not yet shipped.
PoolAgent wraps pool exec with ACP-compatible NDJSON streaming. It supports named agents, explicit sandbox mode, and manual session continuation.

Hijack handoff

Most built-in CLI agents support bunx smithers-orchestrator hijack RUN_ID, which relaunches the agent in its native CLI session for interactive takeover. Smithers persists the native session or conversation id on each task event. On hijack, it waits for a safe boundary between blocking tool calls, then reopens the session via the vendor’s resume flag: On clean exit the workflow resumes in detached mode. Cursor, Vibe, OpenCode, and OpenClaw stream capture and headless session continuation are documented above, but native bunx smithers-orchestrator hijack support for Cursor, Vibe, OpenCode, and OpenClaw is not shipped yet. The deprecated GeminiAgent has no native hijack launcher; use AntigravityAgent (agy --conversation) for Google CLI takeover. See How it works → Durability and resume.

Notes

  • Yolo defaults. yolo: true (default) maps to each CLI’s “skip approvals” flag (--dangerously-skip-permissions, --dangerously-bypass-approvals-and-sandbox, --yolo, --dangerously-allow-all). Set yolo: false or use the agent-specific approval option for tighter control.
  • Pi rpc mode sends prompts as JSON over stdin and is required for onExtensionUiRequest callbacks; text/json modes pass the prompt as a positional arg with files emitted as @path.
  • Kimi share dir. KimiAgent auto-creates an isolated KIMI_SHARE_DIR per invocation to prevent kimi.json corruption under concurrent runs. Pass configDir (or env.KIMI_SHARE_DIR) to pin a specific directory instead.
  • Antigravity config. AntigravityAgent launches the agy binary and passes configDir/geminiDir as both --gemini_dir and GEMINI_DIR, matching Antigravity’s ~/.gemini/antigravity-cli config root. Current agy prompts use -p, extra directories use --add-dir, and native resume uses --conversation.
  • Non-idempotent retries. When a <Task> retries, Smithers prepends a warning listing previously-called side-effect tools so the agent can verify external state before re-invoking them.