Skip to content

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.0 and @agboss/cli@0.1.0 are published on the public npm registry (registry.npmjs.org). Scaffold a new project with npx --yes --package=@agboss/cli agboss create my-app or explore the 7 verified architecture examples in agbossjs/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):

What happens when you run these three commands:

  1. Pre-wired package.json (@agboss/core + @agboss/cli): npx --yes --package=@agboss/cli agboss create my-app creates a ready-to-run TypeScript project where package.json already places @agboss/core in dependencies and @agboss/cli in devDependencies, alongside committed AGENTS.md and CLAUDE.md (@AGENTS.md) files.
  2. Automatic postinstall compilation & skill unpacking: When you run npm install, the "postinstall": "npm run types" hook automatically executes agboss check, which:
    • Generates .agboss/types.d.ts so 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, including 13-migrating-from-langgraph.md) so Claude Code, Cursor, Codex, Windsurf, and Copilot write idiomatic AGBoss v2 code from the first prompt.
  3. Interactive or non-interactive scaffolding: Pass --yes and component flags directly in scripts or CI:

Every scaffolded project also includes:

  • Typed workflow skeleton & environments: @WorkflowStart, @Router, @Agent classes with *.prompt.md files, @WorkflowFinish, @Application, and environments/ (dev, staging, prod, test).
  • Pre-configured ESLint flat config (eslint.config.js via @agboss/core/eslint): Enforces agboss/no-component-state (stateless singleton components), agboss/no-direct-time (using injected Clock instead of Date.now() / setTimeout), and FLOW_CHAIN_RULE (@stylistic/newline-per-chained-call — one chained method call per line in *.workflow.ts):

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:

Why 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):

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:

Continue to the Quick start to build and execute your first workflow.