Documentation Index
Fetch the complete documentation index at: https://smithers.sh/llms.txt
Use this file to discover all available pages before exploring further.
Smithers ships no first-party clients for Linear, Notion, Slack, or similar services. Treat them as external integrations your app owns and pick one of three wirings: tools on an SDK agent, skills/plugins/MCP on a CLI agent, or an external CLI run inside a task.
Use this when the agent needs judgment but the external calls should stay explicit and reviewable.
import { ToolLoopAgent as Agent, tool, zodSchema } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { z } from "zod";
const linearGetIssue = tool({
description: "Fetch a Linear issue",
inputSchema: zodSchema(z.object({ id: z.string() })),
execute: async ({ id }) => linearClient.getIssue(id),
});
const opsAgent = new Agent({
model: anthropic("claude-sonnet-4-20250514"),
tools: { linearGetIssue },
});
Pattern 2: Pass a skill / plugin / MCP config to a CLI agent
Use this when your CLI agent already supports external integrations and Smithers should only orchestrate the task.
import { PiAgent } from "smithers-orchestrator";
const pi = new PiAgent({
provider: "openai",
model: "gpt-5.2-codex",
skill: ["./skills/linear", "./skills/notion"],
});
<Task id="ticket-review" output={outputs.review} agent={pi}>
{`Use the Linear skill to inspect ${ctx.input.issueId}, then summarize next actions.`}
</Task>
Pattern 3: Run an external CLI in a task
Use this when the step is deterministic and you do not need the model involved.
<Task id="load-linear" output={outputs.linearIssue}>
{async () => {
const proc = Bun.spawn(["linear", "issue", "view", ctx.input.issueId, "--json"], {
stdout: "pipe",
stderr: "pipe",
});
const stdout = await new Response(proc.stdout).text();
const stderr = await new Response(proc.stderr).text();
if (await proc.exited !== 0) throw new Error(stderr || stdout);
return JSON.parse(stdout);
}}
</Task>
Choosing between them
| If you need | Prefer |
|---|
| AI judgment over a small integration surface | Pattern 1 (SDK agent with narrow tools) |
| Existing CLI ecosystem support (skills, plugins, MCP) | Pattern 2 (CLI agent) |
| Deterministic sync or publish steps | Pattern 3 (compute task) |
See also
For React hook patterns see /recipes#custom-hooks-over-ctx; for agent-class details see /llms-integrations.txt.