Installation
Installing AGBoss gives you the lightweight production runtime (@agboss/core), focused subpath entries (@agboss/core/dto, @agboss/core/units, @agboss/core/models, @agboss/core/testing, @agboss/core/eval, @agboss/core/mcp, @agboss/core/rag, @agboss/core/a2a, @agboss/core/memory, @agboss/core/eslint), 13 bundled AI coding-agent reference modules (node_modules/@agboss/core/skills/agboss/), and the @agboss/cli static compiler and developer toolkit (agboss / agb). Importing @agboss/core has zero side effects: tracing, MCP, and SQLite load only when an application uses them.
Current Release (
v0.1.0):@agboss/core@0.1.0and@agboss/cli@0.1.0are published on the public npm registry (registry.npmjs.org). Scaffold a new project withnpx --yes --package=@agboss/cli agboss create my-appor explore the 7 verified architecture examples inagbossjs/agboss-examples.
Option 1: Create a new project (npx --yes --package=@agboss/cli agboss create my-app)
Section titled “Option 1: Create a new project (npx --yes --package=@agboss/cli agboss create my-app)”The fastest way to start a new project from scratch is with npx --yes --package=@agboss/cli agboss create (or npm exec --yes --package=@agboss/cli -- agboss create, short alias agb c):
npx --yes --package=@agboss/cli agboss create my-appcd my-appnpm installWhat happens when you run these three commands:
- Pre-wired
package.json(@agboss/core+@agboss/cli):npx --yes --package=@agboss/cli agboss create my-appcreates a ready-to-run TypeScript project wherepackage.jsonalready places@agboss/coreindependenciesand@agboss/cliindevDependencies, alongside committedAGENTS.mdandCLAUDE.md(@AGENTS.md) files. - Automatic
postinstallcompilation & skill unpacking: When you runnpm install, the"postinstall": "npm run types"hook automatically executesagboss check, which:- Generates
.agboss/types.d.tsso TypeScript immediately knows the Path Scope input of every node (Produced<Dto, Producer>),app.execute, and test scripts. - Unpacks 13 version-matched reference guides into
.claude/skills/agboss/(SKILL.md+references/01..13, including13-migrating-from-langgraph.md) so Claude Code, Cursor, Codex, Windsurf, and Copilot write idiomatic AGBoss v2 code from the first prompt.
- Generates
- Interactive or non-interactive scaffolding: Pass
--yesand component flags directly in scripts or CI:
npx --yes --package=@agboss/cli agboss create support-desk --yes --agents "triage:Sorts requests,answerer:Answers questions" --tools "answerer:search_orders"Every scaffolded project also includes:
- Typed workflow skeleton & environments:
@WorkflowStart,@Router,@Agentclasses with*.prompt.mdfiles,@WorkflowFinish,@Application, andenvironments/(dev,staging,prod,test). - Pre-configured ESLint flat config (
eslint.config.jsvia@agboss/core/eslint): Enforcesagboss/no-component-state(stateless singleton components),agboss/no-direct-time(using injectedClockinstead ofDate.now()/setTimeout), andFLOW_CHAIN_RULE(@stylistic/newline-per-chained-call— one chained method call per line in*.workflow.ts):
import { agbossPlugin, FLOW_CHAIN_RULE } from "@agboss/core/eslint";
export default [ { plugins: { agboss: agbossPlugin }, rules: { "agboss/no-component-state": "error", "agboss/no-direct-time": "error", }, }, { files: ["**/*.workflow.ts"], rules: { ...FLOW_CHAIN_RULE, }, },];Option 2: Add AGBoss to an existing project (why there are two packages)
Section titled “Option 2: Add AGBoss to an existing project (why there are two packages)”To add AGBoss to an existing Node.js 22.13+ service or monorepo, install the runtime and the CLI in three steps:
npm install @agboss/corenpm install -D @agboss/clinpx agboss checkWhy is AGBoss split into @agboss/core and @agboss/cli?
Section titled “Why is AGBoss split into @agboss/core and @agboss/cli?”| Package | Where It Belongs | What It Contains & Why |
|---|---|---|
@agboss/core |
dependencies |
Lightweight production runtime shipped into your Docker / Kubernetes container image: decorators (@Application, @Workflow, @Agent, @Action, @Router, @Arbiter, @Tool, @Budget, @PiiPolicy, @ChannelRole), execution graph engine, DI container, storage repository contracts (InMemory* and Sqlite*), subpath entries (@agboss/core/dto, @agboss/core/units, @agboss/core/models, @agboss/core/testing, @agboss/core/eval, @agboss/core/mcp, @agboss/core/rag, @agboss/core/a2a, @agboss/core/memory, @agboss/core/eslint), and the bundled AI coding skills (skills/agboss/). |
@agboss/cli |
devDependencies |
Developer & CI toolchain kept out of production container images: the static graph compiler (agboss check, --strict, --models, --cassettes, --federation), code generator (agboss generate), watch-mode compiler (agboss dev), LangGraph Studio bridge (agboss studio), and local visual UI servers (agboss eval ui, agboss hub ui, agboss eval show --html, agboss hub show --html). |
Point "agboss": { "application": "src/my-app.application.ts" } in your package.json, then scaffold and wire components using agboss generate (alias agboss g) by their full names (including kind suffix):
npx agboss g agent billing-agent --workflow support-desk-workflow --description "Handles invoices"npx agboss g tool refund-tool --workflow support-desk-workflow --agent billing-agentnpx agboss g openapi pets --url ./pets.yaml --workflow support-desk-workflow --agent billing-agentVerify your installation
Section titled “Verify your installation”Run agboss check to generate .agboss/types.d.ts, sync the 13 reference modules in .claude/skills/agboss/, and statically verify every flow path, DTO handoff, environment field, and prompt file offline without making any LLM calls:
npx agboss checkContinue to the Quick start to build and execute your first workflow.