agentskit ai — natural-language agent generator
Describe an agent in plain English, get a typed AgentSchema + tool stubs + runtime wiring.
Writing the first cut of an agent from scratch is tedious busy-work.
npx agentskit ai "<description>" drives any provider adapter with a
planner prompt, validates the returned schema, and scaffolds a fresh
project: agent.json, agent.ts, one tool stub per tool, and a
README.md.
#Install
Comes with @agentskit/cli.
#Quick start
npx agentskit ai "A bot that summarizes long PDFs and drafts a Slack message with the 3 key findings." \
--provider anthropic --model claude-sonnet-4-6 \
--out ./pdf-summarizerOutput:
Planning agent for: "A bot that summarizes..."
Wrote 5 file(s) to ./pdf-summarizer
+ agent.json
+ agent.ts
+ README.md
+ tools/extract_pdf.ts
+ tools/post_slack.tsFlags:
| Flag | Default | Purpose |
|---|---|---|
--provider | anthropic | Planner provider |
--model | provider default | Planner model id |
--api-key | env | Explicit key override |
--base-url | — | For OpenAI-compatible endpoints |
--out | ./my-agent | Output directory |
--overwrite | false | Overwrite existing files |
--dry-run | false | Print plan + file list without writing |
#What you get
agent.json — the validated AgentSchema.
agent.ts — a typed createAgent(adapter) factory that wires tools.
tools/<name>.ts — one defineTool(...) stub per declared tool, with the planner's implementation hint in the docstring.
README.md — human-readable summary of the agent.
#Programmatic use
The CLI is a thin wrapper around two exported helpers:
import { scaffoldAgent, writeScaffold, createAdapterPlanner } from '@agentskit/cli/ai'
import { anthropic } from '@agentskit/adapters'
const planner = createAdapterPlanner(anthropic({ apiKey: process.env.ANTHROPIC_API_KEY!, model: 'claude-sonnet-4-6' }))
const schema = await planner('A bot that reviews pull requests.')
const files = scaffoldAgent(schema)
await writeScaffold(files, './pr-reviewer')#See also
Explore nearby
- PeerRecipes
Copy-paste solutions grouped by theme. Every recipe end-to-end, runs as written.
- PeerCustom adapter
Wrap any LLM API as an AgentsKit adapter. Plug-and-play with the rest of the kit in 30 lines.
- PeerAdapter contract tests
Verify any adapter against the ADR 0001 invariants A1–A10 with the shared test harness.
Schema-first agents
Define your agent in YAML or JSON and get a typed AgentSchema you can feed the runtime.
Browser-only chat (WebLLM / WebGPU)
Ship a chat agent that runs 100% in the user's browser — no server, no API key, no telemetry. Privacy contract holds because no inference data ever leaves the device.