Scripts
w.run with Node code and sh(), in your project.
Advanced Research Prototype
Run an agent fleet on your laptop, with one plugin.
(Get an agent to) write a flow in TypeScript. It fans out headless agents, runs real code, waits for you or a timer, and keeps going after the chat ends. Every flow compiles to a BPMN diagram that you can watch run.
/plugin marketplace add nanobpm/nano-agent-graph-engine
/plugin install nano-agent-graph-engine@nanobpm
Brings the MCP server, skills, hooks, and the /flows pane.
npx -y @nanobpm/nano-agent-graph-engine install claude-desktop
Or open the .mcpb from Releases. Restart Desktop (⌘Q) afterwards. No server to run, no workers to configure.
npx -y @nanobpm/nano-agent-graph-engine install opencode
Adds the server to ~/.config/opencode/opencode.json and installs the skills. Works in the OpenCode desktop app too.
npm install -g @nanobpm/nano-agent-graph-engine
nage
The nage CLI: check, start and inspect flows from a shell.
Also works with Codex (nage install codex) and Cursor (nage install cursor): not yet tested by us. Needs Node 22.15 or newer.
A primary agent orchestrating subagents is a good pattern: reasoning about what to run next is exactly what an LLM is for. But holding the plan and the run state in context is not. That's durable state living in the most volatile, most expensive place you have: one compaction and the plan is gone; close the chat and the run dies, the tokens re-spent. And every token spent bookkeeping what's done, what's blocked, what's next is a token not spent on the code. Nano Agent Graph Engine takes the orchestration out of context and into a durable engine on your machine. The agent designs the graph; the engine runs it.
Loops, switches, branches and parallel steps, in plain TypeScript with defineFlow.
w.run with Node code and sh(), in your project.
w.task runs a prompt on the agent CLI you bring: Claude Code, Copilot, Qwen Code, Kimi, OpenCode, nano-coder, or any ACP agent.
Hand a step to the Claude or OpenCode session you're chatting in.
w.human asks you with a form, in the chat, the /flows pane or the explorer.
w.timer and w.signal: wait an hour, or for a webhook.
Reviews a branch before you merge it, adversarially. A script collects the changeset against main. Reviewers run in parallel, one per lens (correctness, contracts and callers, tests, duplicated logic), and each sees the whole changeset and reads the codebase around it, because the bugs that matter cross files. Code merges their findings and drops duplicates. Then, one per finding, a challenger on a different CLI tries to refute it; only findings that survive go on. A fix agent fixes them and the loop reviews again, until the review comes back clean. When the fix agent can't decide on its own, it escalates to you, and your answer goes back into the loop.
import { defineAgents, defineFlow, defineForms, sh } from "@nanobpm/nano-agent-graph-engine";
// The challenger argues the other side, so suggest a different CLI for it.
export const agents = defineAgents({ challenge: { use: "opencode" } });
export const forms = defineForms({
escalation: {
title: "The fix agent needs you",
description: "{{question}}",
fields: {
decision: { type: "string", enum: ["fix", "ship"] },
guidance: { type: "string", title: "Guidance for the fix agent" },
},
required: ["decision"],
},
});
export const review = defineFlow("review", (w) => {
w.loop((b) => {
// A script step: real code, in your repo. Every reviewer gets the whole
// changeset, and reads the rest of the codebase around it.
b.run("changeset", async () => {
const files = (await sh("git diff --name-only main")).stdout.split("\n").filter(Boolean);
return { files, lenses: ["correctness", "contracts and callers", "tests", "duplicated logic"] };
});
// Fan out by what to look for, not by file: one reviewer per lens, in parallel.
b.forEach("lenses", "lens", (l) => {
l.task("review-lens", { jobType: "senior:review", prompt: { resourceId: "review.md" } });
}, { name: "Review by lens", outputCollection: "reviews", outputElement: "found" });
// Code, not an agent: merge every lens's findings and drop duplicates.
b.run("triage", (job) => {
const reviews = (job.variables.reviews ?? []) as string[][];
return { findings: [...new Set(reviews.flat())] };
});
// Then fan out per finding: an adversarial challenger, on a different CLI,
// tries to refute each one against the codebase.
b.forEach("findings", "finding", (f) => {
f.task("challenge", { jobType: "senior:challenge", prompt: { resourceId: "challenge.md" } });
}, { name: "Challenge each finding", outputCollection: "verdicts", outputElement: "verdict" });
// The fix agent fixes what survived. It reports "clean" (nothing to fix),
// "fixed" (review again) or "stuck" (it needs a decision from you).
b.task("fix", { jobType: "senior:fix", prompt: { resourceId: "fix.md" } });
b.switch("fixState", {
clean: (c) => c.break(),
fixed: (c) => c.continue(),
default: (c) => {
// Escalate: wait for you, an hour or over the weekend. The run survives.
c.human("escalate", { form: "escalation" });
c.switch("decision", { ship: (d) => d.break(), default: (d) => d.continue() });
},
});
});
});
This flow, compiled to BPMN and running on the same WebAssembly engine Nano Agent Graph Engine runs, here in your browser. Agents and people are scripted; the engine is real. Open it full-page →
Turns a screen recording into a YouTube upload. A local Whisper model (whisper.cpp) extracts the transcript, so the audio never leaves your machine, and a script fixes product names it misheard. An agent drafts the title, description, chapters and tags; code checks the draft and sends a bad one back with the errors. Another agent proposes thumbnails. You review the draft: upload it as a private video, save the description, or send it back with feedback for a redo.
import { defineFlow, defineForms, envelope } from "@nanobpm/nano-agent-graph-engine";
import { checkDescription, fixTranscript, saveDescription, transcribeLocally, uploadPrivate } from "./video-publisher.ts";
export const forms = defineForms({
"video-review": {
title: "Review: {{ytTitle}}",
description: "{{ytDescription}}",
fields: {
decision: { type: "string", enum: ["upload", "save", "redo"] },
thumbnail: { type: "string", enum: ["1", "2", "3", "none"] },
feedback: { type: "string", title: "Feedback for a redo" },
},
required: ["decision"],
},
});
const Input = envelope("PublishVideoInput", { videoPath: "string" });
export const publishVideo = defineFlow("publish-video", { Start: { in: Input } }, (w) => {
// A local Whisper model (whisper.cpp): the audio never leaves your machine.
w.run("transcribe", (job) => transcribeLocally(String(job.variables.videoPath)));
w.run("correct", (job) => fixTranscript(String(job.variables.videoPath)));
w.loop((b) => {
// An agent drafts the title, description, chapters and tags. Code checks
// the draft; a bad one goes back to the agent with the errors.
b.loop((d) => {
d.task("describe", { jobType: "senior:describe", prompt: { resourceId: "describe.md" } });
d.run("check-description", (job) => checkDescription(job.variables));
d.switch("describeState", { done: (e) => e.break(), default: (e) => e.continue() });
});
b.task("thumbnails", { jobType: "senior:thumbnails", prompt: { resourceId: "thumbnails.md" } });
// You review the draft and pick a thumbnail. Redo loops back with your feedback.
b.human("review", { form: "video-review" });
b.switch("decision", {
upload: (c) => {
c.run("upload", (job) => uploadPrivate(job.variables));
c.break();
},
save: (c) => {
c.run("save", (job) => saveDescription(job.variables));
c.break();
},
default: (c) => c.continue(),
});
});
});
This flow, compiled to BPMN and running on the same WebAssembly engine Nano Agent Graph Engine runs, here in your browser. Agents and people are scripted; the engine is real. Open it full-page →
Ask your agent to write one: it reads the flow guide, then saves, checks
and deploys the flow in one step. Or start one from the /flows pane.
No new app to learn. The engine shows up inside Claude Code, Claude Desktop and OpenCode.
⚙ Agent Graph · 2 flows running · 1 task
waiting for you, while anything is going on./flows pane. Answer forms, start flows, retry or cancel
runs, or ask Claude to fix an incident, without leaving the session.State is an event log on disk. Close the chat, restart the laptop: runs resume where they left off, and jobs that were mid-run are handed back out.
Tested by killing the engine mid-flow.
Fan out with w.parallel and w.forEach. Each agent step is its own
durable subagent, with its own context, tools and cost line. The engine joins the branches.
Retry one branch without losing the others.
One engine per user. Each project keeps its flows in flows/; a global library is
offered everywhere. Nothing is written into your repos.
See work waiting in every project, in one place.
A flow names a rank and a task, never a CLI. You choose which agent CLI and model serve each step, so the expensive steps can go to a frontier model and the rest stay local and free.
@nanobpm/nano-coder
Bring your own agent CLI. Agent steps run on the CLI you already use: Claude Code, Copilot, Qwen Code, Kimi, OpenCode, or anything else that speaks ACP. Choose one per flow, per step, or per run.
We run nano-coder because it is optimised for size. It is a coding agent written in D, built to be the worker your graphs fan out. Node-based agent CLIs take 150–660MB apiece; nano-coder takes ~4MB (peak footprint on macOS), so a laptop runs a fleet instead of a handful. Interactive in your terminal, or headless over ACP as a flow's agent step.
npm install -g @nanobpm/nano-coder
brew install nanobpm/tap/nano-coder
The plugin runs everything on one machine. The Nano server is the same engine, standalone: it orchestrates agents across many machines, and runs as a cluster when it has to stay up. Nano Workforce runs on it and adds PR review loops, time limits and escalations. The server speaks the Camunda 8 REST API, so Camunda's SDKs and tools work unchanged. It takes more setup than the plugin, so start here when one laptop isn't enough.
curl -fsSL https://nanobpm.io/install.sh | sh
Installs the CLI, hires your coding agents, and brings up a Nano engine, a workforce and the app. Prefer to do it by hand? Manual setup →
The agent-tooling landscape spans desktop IDEs, terminal runtimes, and in-model scripting. Nano Agent Graph Engine puts a durable engine inside the agent you already use; Nano Workforce runs the same idea as a distributed fleet.
| Capability | Nano Agent Graph Engine | Nano Workforce | Orca | Herdr | Claude Dynamic Workflows |
|---|---|---|---|---|---|
| What it is | Durable agent graphs in your agent | Durable agent-workflow engine | Desktop orchestrator IDE | Terminal runtime for agents | In-Claude subagent scripting |
| Orchestration lives in | The durable graph | The durable graph | You, in the GUI | You / agents via socket | The JavaScript the model writes |
| Authoring surface | TypeScript flows, drawn as BPMN | Code-first & Model-first (BPMN) | Manual, worktree GUI | Interactive + socket API | A script Claude writes |
| Survives crash / reboot | Yes: Event log on disk; runs resume | Yes: Journal-backed step resume | Partial: Scrollback only | Partial: Terminals reattach | Partial: Resumes in the session |
| Human approval steps | Yes: Forms in chat, pane or explorer | Yes: First-class durable waits | No | Partial: Flags a blocked agent | No |
| Agent harnesses | Claude, OpenCode, any ACP agent | Provider-agnostic | Codex, Claude, OpenCode, Pi | Claude, Codex, Cursor, Grok… | Claude only |
| Frontier + local models | Yes: Pick the CLI and model per step | Yes: Mix both on one box | Partial: Via the harness | Partial: Via the harness | No: Anthropic only |
| Headless / server / CI | Partial: Local daemon; runs on after the chat | Yes: Engine + Camunda 8 REST | No: Desktop app | Partial: Background server | Partial: Inside Claude Code |
| Distributed fleet | Partial: A fleet on one laptop | Yes: Any mix of hardware, local to fleet | Partial: One desktop (+ SSH box) | Partial: One host, reattach over SSH | No: Single machine |
| Footprint | One plugin; no server to run | Small — runs on a Raspberry Pi | Electron desktop | One Rust binary | Claude Code |
| License | Apache-2.0 | Free to evaluate & personal use | MIT | Apache-2.0 | Proprietary |
Overlapping but distinct: Orca and Herdr host the interactive terminals your agents run in, and Nano can drive those same harnesses as durable workers. This grid maps each tool to the job it leads on. Sourced from each project's own docs; corrections welcome.
Coming soon