AgentLike. The format is borrowed from Vercel eve’s filesystem conventions
and adapted to run on smithers’ durable engine. Instructions, tools, skills, and
subagents each live in a predictable file location; there is no registration step.
Directory layout
agent/ directory is an independent unit. tools/, skills/, and
subagents/ are optional. instructions.md alone is a valid agent.
defineAgent — the entry point
agent.ts exports a default defineAgent call that compiles the directory to an
AgentLike:
resolveSdkModel in packages/agents. The compiled
AgentLike runs inside a <Task> node on smithers’ engine, so it inherits
durability, snapshots, time-travel, and approval gates automatically.
Use the agent in a workflow
instructions.md — the system prompt
Place the agent’s system prompt in instructions.md next to agent.ts. The
loader reads it at compile time and attaches it to the underlying ToolLoopAgent.
tools/*.ts — per-file tools
Each .ts file under tools/ exports a single default defineTool. The
filename (minus the .ts extension) becomes the tool name — no registration
needed.
defineTool re-exports smithers’ existing defineTool from
smithers-orchestrator, so authored tools get ambient tool-context (smithers run
context, idempotency keys) for free. The signature matches the AI SDK tool()
shape.
skills/*.md — on-demand playbooks
Files under skills/ are markdown playbooks loaded into the agent’s context on
demand. They follow the same mechanism as .smithers/skills/*.md used by the CLI
harness adapters. A skill is injected when the agent determines it needs that
playbook for the current turn.
subagents/* — nested agents
A directory under subagents/ follows the same agent/ layout recursively. The
loader compiles it to an AgentLike and exposes it to the parent agent as a
delegated tool. The parent calls the subagent by name.
Harness agents through the same API
CLI harness adapters (ClaudeCodeAgent, CodexAgent, …) declare through the
same defineAgent surface using a harness discriminator:
harness maps to the existing adapter class (ClaudeCodeAgent, CodexAgent,
etc.) in packages/agents/src/. Both forms return an AgentLike so they compose
identically in a workflow.
For harness agents, instructions.md becomes the harness system prompt where the
CLI supports it, and tools/*.ts are exposed as MCP tools via createMcpToolset
(CLI harnesses consume tools over MCP rather than the SDK tool loop).
Provider pools stay supported
An array ofdefineAgent results is a failover pool, exactly as today:
new SmithersClaudeCodeAgent(...) constructors remain valid and mix
with defineAgent results in the same pool.
Concept-to-smithers mapping
| Eve concept | Smithers target |
|---|---|
instructions.md | System prompt on the ToolLoopAgent-backed AgentLike |
tools/*.ts defineTool | smithers-orchestrator defineTool (wraps AI SDK tool()) |
skills/*.md | On-demand context injection, existing skills mechanism |
subagents/* | Delegated AgentLike, exposed to parent as a tool |
model string | resolveSdkModel in packages/agents |
harness discriminator | Maps to existing BaseCliAgent subclass |
Runtime: smithers, not Vercel
Eve sessions run on Vercel Workflows with Vercel Sandbox and AI Gateway. Smithers drops all of that. The compiledAgentLike runs inside a <Task> node, so it
gets:
- Durable execution with snapshots and time-travel
- Approval gates via
<HumanTask> - Sandbox isolation via
packages/sandbox(Freestyle VMs) - Fork and rewind on any node output
Project layout: agents alongside workflows
The.smithers/ directory holds both:
workflows/*.tsx follow the existing smithers CLI conventions unchanged. Agents
in .smithers/agents/<name>/ resolve by import and by a directory-name lookup
so workflows can reference them without repeating the path.
bunx smithers-orchestrator init scaffolding
bunx smithers-orchestrator init scaffolds an example custom agent directory alongside the seeded
hello workflow:
Compatibility
- Existing
.smithers/agents.tsprovider pools keep working.defineAgentoutput is assignable toAgentLike, so old and new mix in the same pool. - Existing
workflows/*.tsxare untouched. - All behavior changes are additive; nothing existing changes.
See also
- CLI Agents: how harness adapters work
- Custom Workflow UI: wire a UI to a workflow
- Tool Use:
<Task>,defineTool, and the tool loop