Docs
Forge
The most self-referential demo in the repo: a NanoCodana agent whose entire job is to design, write, and test brand-new NanoCodana agents. You describe the agent you want; Forge scaffolds a runnable script, executes it, reads the output, and iterates until it works.
cd apps/node
cp .env.example .env # add your API key
npm run forgeThen just describe an agent: "an agent that reviews a commit range and writes a summary to REVIEW.md". Forge loads its build-agent skill for the recipe, writes the script into its workspace, runs it with host Bash, and fixes what breaks — testing before declaring done.
What it demonstrates#
- Skills as recipes — the bundled
build-agentskill carries the authoritative template; Forge pulls it into context on demand instead of bloating the system prompt. - Approval in practice — file writes prompt so you see what's being scaffolded, and escalating from the sandbox to the host shell (to actually run the generated agent) self-gates on approval.
- The write → run → read → fix loop — the same iterate-until-green behavior you want from any serious coding agent, applied to the framework itself.
Source:
apps/node/forge-demo.js — about a hundred lines, most of which is the system prompt. A good template for building your own specialized agent on NodeAgent.