agent-forge
Scaffold a self-contained agent (harness config, system prompt, skills, MCP servers, plugins, trigger, guardrails) from a short interview or a partial JSON spec. Emits idiomatic bundles for pi-mono, LangGraph, and Eve runtimes. Use when the user wants to create, generate, or scaffold a new agent.
- License 许可
- MIT
- 最近更新
- 2026-09-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- agent-forge
- description
- Scaffold a self-contained agent (harness config, system prompt, skills, MCP servers, plugins, trigger, guardrails) from a short interview or a partial JSON spec. Emits idiomatic bundles for pi-mono, LangGraph, and Eve runtimes. Use when the user wants to create, generate, or scaffold a new agent.
02 资源文件 1
- 参考文档reference/spec-cheatsheet.md2.6 KB
03 SKILL.md 正文
agent-forge
Turn a conversation into a running agent bundle. The durable artifact is the spec JSON — everything else regenerates from it.
Prerequisites
- The agent-forge repo is cloned locally. If the user doesn't have it:
git clone https://github.com/dallascrilley/agent-forge.gitinto a location of their choosing; remember the path for this session. python3(3.10+). The generator is stdlib-only — never pip-install anything for generation itself.- When
forgeis importable (for example, from the repository root), preferpython3 -m forge; otherwise usepython3 <repo>/forge/cli.py.
Procedure
-
Check for an existing spec. If the user hands you a spec file (even partial), copy it to the working location and skip to step 3 with only the questions needed to fill gaps.
-
Interview — one question at a time. Prefer the harness's blocking question tool with single-select options where a fixed set exists. Collect, in this order:
- name + purpose — what should this agent do, in one or two sentences? (Derive a kebab-case name; confirm it.)
- runtime —
pimono,langgraph,eve, or a combination. Ask what they run today. - model — the runtime-native model id (e.g.
anthropic/claude-sonnet-4-5,openai/gpt-5-mini). Offer 2-3 sensible defaults. - tools & MCP servers — does it need MCP? If yes, which servers
(stdio command or remote url)? Set
guardrails.allowed_toolsto the tool names the agent may invoke. - side effects — what may it change (write files where, send
messages, post)? Each becomes an
allowed_side_effectsentry. Nothing means read-only — say so and confirm. - skip condition — when must a run complete without the model
(empty inbox, no matching posts, all checks green)? That is
llm_optional: trueplus the gatherer. If every tick needs the model, setllm_optional: false. - trigger — manual or cron (5-field expression).
- system prompt — draft it yourself from the answers; show it.
See
reference/spec-cheatsheet.mdfor field shapes and defaults. -
Write the spec to disk at a user-chosen path (default:
./<name>-spec.json). The spec on disk is the checkpoint — write it before generating, so an interrupted session loses nothing. -
Show the spec, get one confirmation. A compact summary (name, runtimes, model, side effects, trigger), not a JSON dump unless asked.
-
Validate, then generate:
python3 -m forge validate <spec> python3 -m forge generate <spec> --runtime <rt> --out <dir>If
forgeis not importable, replacepython3 -m forgewithpython3 <repo>/forge/cli.py. For a non-interactive producer path, write the spec first withforge new:python3 -m forge new --name <slug> --purpose "<purpose>" \ --model <model> --runtime <rt> --out <spec>Validation errors: fix the spec, re-validate. Do not hand-edit generated output to compensate — the spec is the truth.
-
Smoke check the bundle (from the generated README):
- pimono:
bash <dir>/run.sh --dry-runprints the pi argv. - langgraph:
python3 -m compileall <dir>and point the user at<dir>/README.mdsetup (venv +pip install -e .).
- pimono:
-
Report: spec path, output dir per runtime, how to run, how to pause (the stop file), where receipts land.
Rules
- Guardrails are not optional decoration. Never suggest removing the generated guardrails module, the stop file, or the receipt contract to make something work — change the spec and regenerate.
- If the user asks for a runtime with no adapter (hermes): say it is not
supported yet, point at
docs/adapters.md, and still write the spec with that runtime omitted fromruntimes(spec is future-proof; theruntimeslist only names what to emit now). - Keep the spec free of machine-specific absolute paths unless the user explicitly wants them.