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
PATH: codex, claude, agy, gemini, pi, kimi, forge, hermes, amp, vibe, opencode, openclaw.
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.
Codex-first defaults
Whenbunx smithers-orchestrator init detects usable Codex authentication, its
generated pools start with Codex workers using exact model pins:
| Work | Model |
|---|---|
| Planning, orchestration, review, and the hardest reasoning | gpt-5.6-sol |
| Mid-tier judgment, validation, or tool-heavy work that needs extra checking | gpt-5.6-terra |
| Research, implementation, ordinary tool use, UI, and routine-to-substantial execution | gpt-5.6-luna |
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.
gpt-5.6-luna; do not invent a -codex suffix.
Authentication
- Subscription login: run
codex loginonce. For isolated accounts, passconfigDir; Smithers setsCODEX_HOMEfor that invocation. - API billing: pass
apiKeyor setOPENAI_API_KEY; Smithers forwards it to the spawnedcodexprocess. - Account registry:
bunx smithers-orchestrator agents add --provider codex ...registers a subscription config directory, while--provider openai-apiregisters API-key billing for Codex-compatible providers.
Structured output
- If the Smithers task has an output schema and
outputSchemais 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):
ClaudeCodeAgentclearsANTHROPIC_API_KEYfrom 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 inheritedANTHROPIC_API_KEY. - Subscription login: the
claudeCLI stores credentials per config directory. To set up an isolated subscription, runCLAUDE_CONFIG_DIR=<dir> claudeonce and complete/logininteractively. The credentials land at<dir>/.credentials.json. - Pinning a subscription: pass
configDirto use that directory’s credentials. Smithers setsCLAUDE_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
apiKeyto bill the Anthropic API instead. WhenapiKeyis set, Smithers stops clearingANTHROPIC_API_KEYand forwards your key asANTHROPIC_API_KEYto the spawnedclaudeprocess.
codex login / CODEX_HOME via configDir, OPENAI_API_KEY via apiKey).
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 callagent.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).
- No API key is required for either agent; the call bills the host subscription.
outputSchemais 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 anAbortSignalto cancel from the outside.
Common options
All CLI agents accept the same base option surface: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:
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.
agy builds changed several Gemini-era flags. Smithers treats that as a
runtime contract, not a best-effort pass-through:
| Smithers option | Emitted agy surface |
|---|---|
includeDirectories | --add-dir |
conversation / resume | --conversation <id> |
continue | --continue |
configDir / geminiDir | --gemini_dir <dir> and GEMINI_DIR=<dir> |
| prompt text | -p <prompt> |
--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.
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].
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.
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.
Hijack handoff
Most built-in CLI agents supportbunx 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:
| Agent class | Resume flag |
|---|---|
ClaudeCodeAgent | claude --resume |
CodexAgent | codex resume |
AntigravityAgent | agy --conversation |
PiAgent | pi --session |
KimiAgent | kimi --session |
ForgeAgent | forge --conversation-id |
AmpAgent | amp threads continue |
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). Setyolo: falseor use the agent-specific approval option for tighter control. - Pi rpc mode sends prompts as JSON over stdin and is required for
onExtensionUiRequestcallbacks; text/json modes pass the prompt as a positional arg withfilesemitted as@path. - Kimi share dir.
KimiAgentauto-creates an isolatedKIMI_SHARE_DIRper invocation to preventkimi.jsoncorruption under concurrent runs. PassconfigDir(orenv.KIMI_SHARE_DIR) to pin a specific directory instead. - Antigravity config.
AntigravityAgentlaunches theagybinary and passesconfigDir/geminiDiras both--gemini_dirandGEMINI_DIR, matching Antigravity’s~/.gemini/antigravity-cliconfig root. Currentagyprompts 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.