CLI Reference
The @agboss/cli package (paired with the @agboss/core runtime) provides the agboss command-line interface (short alias agb) for scaffolding projects (agboss create), generating and wiring components (agboss generate), generating .agboss/types.d.ts and checking assembly rules (agboss check), inspecting workflows (agboss describe), running interactive or one-shot turns (agboss chat, agboss run), and evaluating prompt profiles (agboss eval, agboss compare).
How to scaffold projects and generate components
Section titled “How to scaffold projects and generate components”Create a new project interactively or via flags in CI with npm exec --yes --package=@agboss/cli@0.1.0 -- agboss create (short alias agb c):
npm exec --yes --package=@agboss/cli@0.1.0 -- agboss create my-appcd my-appnpm installnpm exec --yes --package=@agboss/cli@0.1.0 -- agboss c support-desk --yes --agents "triage:Sorts requests,answerer:Answers questions" --tools "answerer:search_orders" --mcp filesystem:/path/to/docs --rag notes --skip-installGenerate components into an existing workflow module with agboss generate (alias agboss g) using their full names (including kind suffix) or single-letter/short kind aliases (a = agent, r = router, t = tool, ar = arbiter, m = mcp, oa = openapi, w = workflow, ec = eval-case). The CLI enforces a strict 1 class = 1 file layout, placing each @Workflow in src/workflows/<workflow-name>/ alongside its @WorkflowStart and @WorkflowFinish files, prompt-capable components (@Agent, @Router, @Judge, @Arbiter, @Compaction, @InputGuardrail / @OutputGuardrail, @ReplyInterpreter) in their own component subdirectory (src/<kind-plural>/<name>/<name>.<kind>.ts + <name>.prompt.md), and all DTOs flat in src/dto/<name>.dto.ts:
agboss g a billing-agent --workflow support-desk-workflow --description "Handles invoices"agboss g r escalation-router --workflow support-desk-workflowagboss g t refund-tool --workflow support-desk-workflow --agent billing-agentagboss g ar quorum-arbiter --workflow support-desk-workflowagboss g m tickets-mcp --workflow support-desk-workflow --command tickets-mcp --tool search-tool --agent billing-agentagboss g rag policies-rag --workflow support-desk-workflow --folder policies --agent billing-agentagboss g oa pets --url ./pets.yaml --workflow support-desk-workflow --agent billing-agentagboss g w onboarding-workflowagboss g ec refund-edge-eval-case --suite support-desk-eval-suite --from-execution exec-9102Standard 1 class = 1 file project layout
Section titled “Standard 1 class = 1 file project layout”src/├── <app>.application.ts├── environments/│ ├── app.environment.ts│ ├── dev.environment.ts│ ├── prod.environment.ts│ └── test.environment.ts├── dto/ # All *Dto contracts (1 DTO class = 1 file)│ └── <name>.dto.ts├── agents/<name>/ # Group A: prompt-capable components (always in subfolder)│ ├── <name>.agent.ts│ └── <name>.prompt.md├── routers/<name>/│ ├── <name>.router.ts│ └── <name>.prompt.md # (when DecidedBy.Model)├── judges/<name>/│ ├── <name>.judge.ts│ └── <name>.prompt.md├── arbiters/<name>/│ ├── <name>.arbiter.ts│ └── <name>.prompt.md├── compactions/<name>/│ ├── <name>.compaction.ts│ └── <name>.prompt.md├── guardrails/<name>/│ ├── <name>.guardrail.ts│ └── <name>.prompt.md├── reply-interpreters/<name>/│ ├── <name>.reply-interpreter.ts│ └── <name>.prompt.md├── workflows/<workflow-name>/ # Each workflow folder owns its starts & finishes│ ├── <workflow-name>.workflow.ts│ ├── <start-name>.workflow-start.ts│ └── <finish-name>.workflow-finish.ts├── tools/ # Group B: flat inside their kind folder (1 class = 1 file)│ └── <name>.tool.ts├── actions/│ └── <name>.action.ts├── interceptors/│ └── <name>.interceptor.ts├── services/│ └── <name>.service.ts├── observers/│ └── <name>.observer.ts├── channels/│ ├── <name>.channel-role.ts│ └── <name>.channel.ts├── pii-policies/│ └── <name>.pii-policy.ts├── rag/│ └── <name>.rag.ts├── retrievers/│ └── <name>.retriever.ts├── mcp/│ ├── <name>.mcp-server.ts│ ├── <name>.mcp-tool.ts│ └── <name>.mcp-expose.ts├── a2a/│ ├── <name>.a2a-agent.ts│ └── <name>.a2a-expose.ts├── model-providers/│ └── <name>.model-provider.ts├── budgets/│ └── <name>.budget.ts├── health-checks/│ └── <name>.health-check.ts└── eval-suites/ └── <name>.eval-suite.tsAll agboss CLI commands
Section titled “All agboss CLI commands”| Command | What It Does |
|---|---|
agboss create <name> (agboss c) |
Scaffolds a new AGBoss project with @agboss/core (dependencies), @agboss/cli (devDependencies), @Application, workflow, environments, eslint.config.js (@agboss/core/eslint), .agboss/types.d.ts, AGENTS.md, CLAUDE.md, 13 AI coding skills, and Vitest tests |
agboss generate <kind> <name> (agboss g) |
Generates and wires an agent, router, tool, arbiter, mcp, rag, workflow, openapi client, or eval-case (--from-execution <executionId>) |
agboss check [--application <path>] |
Writes .agboss/types.d.ts, syncs .claude/skills/agboss/ (SKILL.md + 13 reference modules), and validates all flow, assembly, environment, and prompt rules without calling models |
agboss check --strict |
Treats analyser warnings ([flow.path-too-deep], [judge.same-model-family]) and assembly warnings ([application.in-memory-cost-ledger], [application.in-memory-child-queue]) as errors |
agboss check --models |
Verifies every model setting across the application against its resolved @ModelProvider |
agboss check --cassettes |
Verifies recorded VCR cassettes against current promptHash and schemaHash fingerprints ([vcr.stale-cassette]) |
agboss check --federation <path...> |
Verifies cross-repository @A2AAgent / @McpServer contracts against snapshots from agboss describe --json ([federation.*]) |
agboss dev / agboss studio |
Watches src/ to regenerate .agboss/types.d.ts on save (dev), or launches LangGraph Studio for every workflow and child subgraph (studio) |
agboss describe [--application <path>] |
Prints paths, node inputs by producer, { about } links, historyOf limits, model → provider resolution, budgets, and step limits |
agboss describe --json |
Exports the full declarative revision snapshot (configHash, maxConcurrentSteps, @Action compensateWith / committedBy links, per-agent promptHash, per-DTO schemaHash, and application.contracts.imports / exports) |
agboss chat / agboss run |
Starts an interactive terminal chat (--thread, --profile, --env) or executes a single task on the @Application and prints the output and spend summary |
agboss eval score / agboss replay |
Scores recent Terns (--start, --version, --limit, --profile) or replays a prompt version against recorded tasks |
agboss eval run --suite <name> |
Runs an @EvalSuite across --runs <k> trials (pass@k and pass^k), --chaos <rate> --chaos-seed <n>, --metamorphic, --report <run.json>, --baseline <run.json> --fail-on-regression, and --html <report.html> |
agboss eval calibrate --report <run.json> |
Computes pairwise Cohen’s kappa ($\kappa$), confusion matrices, disagreements, and metric rubrics between @Judge verdicts and human EvalLabel JSONL annotations (--labels <file.jsonl>) |
agboss eval show <run.json> [--html <file>] / agboss eval ui |
Re-renders a saved EvalRunReport artifact into a self-contained static HTML page without calling models, or launches the local interactive Eval UI workbench (127.0.0.1) |
agboss records export |
Exports completed ExecutionRecords from ExecutionHistoryRepository (--tenant <id> or --all-tenants, --since, --until) to --out <file.jsonl> |
agboss hub show <path...> [--html <file>] / agboss hub ui <path...> |
Stitches describe --json snapshots, .jsonl execution records, and eval reports into the AGBoss Mesh Hub (Global Agent Mesh Graph, Cross-Service Execution Trees, Progressive Crystallization Radar, and Blast Radius) as a static HTML page or local UI server (127.0.0.1) |
agboss golden add --name <n> |
Saves recent real tasks as a reusable golden evaluation dataset |
agboss compare --profiles base,<p> |
Compares YAML configuration profiles side by side against a golden set |
agboss rag index |
Builds or updates @Rag knowledge-base indexes |
agboss migrate imports |
Rewrites imports from deprecated sub-entries to current AGBoss entries |
Key static analyzer diagnostics (agboss check)
Section titled “Key static analyzer diagnostics (agboss check)”agboss check verifies structural, dataflow, security, and governance invariants before a single token is spent:
| Rule Code | What It Catches |
|---|---|
[name.kind-suffix] |
A decorated component’s name option ("-agent", "-budget", "-tool-interceptor") or its TypeScript class identifier (*Agent, *Budget, *ToolInterceptor) is missing its kind suffix. |
[input.missing-on-path] & [input.outdated-on-path] |
A downstream node reads a DTO that is not produced on every incoming branch or was invalidated by a review loop’s { about: Dto } without being re-produced. |
[flow.uncompensated-action] & [graph.limit-handler-uses-model] |
A side-effecting @Action lacks compensateWith / committedBy, or a resource-limit .onError() handler routes to an LLM node instead of a deterministic @Action / @WorkflowFinish. |
[prompt.input-in-instructions] |
Runtime input fields are interpolated into prompt / promptUrls (which would break LLM KV prefix caching). |
[compaction.missing-handler] & [compaction.invalid-setting] |
A CompactionStrategy.Custom class omits compact(input), or sets model-only options (model, prompt, summaryQueueLength, summaryMaxTokens). |
[guardrail.missing-handler] & [tool-interceptor.missing-handler] |
A DecidedBy.Code guardrail omits check(text), or a @ToolInterceptor implements neither BeforeToolCall nor AfterToolCall. |
[model-provider.both-modes] |
A @ModelProvider mixes HTTP baseUrl / apiKey options with a custom ModelProviderHandler.complete(request) implementation. |
[vcr.stale-cassette] & [judge.same-model-family] |
A VCR cassette’s recorded promptHash / schemaHash no longer matches current code, or a DecidedBy.Model @Judge uses the same model family as the judged @Agent. |
[flow.conflicting-placement] & [application.in-memory-child-queue] |
Two paths to the same child workflow specify different ChildPlacement modes, or ChildPlacement.AnyInstance is used without a shared ChildExecutionQueueRepository in @Application({ providers }). |
[federation.incompatible-schema] & [federation.missing-target] |
Cross-service @A2AAgent / @McpServer DTO schemas drifted from the producer’s @A2AExpose / @McpExpose schemaHash in agboss describe --json. |
Exporting a declarative revision snapshot with agboss describe --json
Section titled “Exporting a declarative revision snapshot with agboss describe --json”Running agboss describe --json --application <path> dumps the complete machine-readable anatomy ({ application, workflows[], schemas }) of an application revision without booting model providers:
- Application & graph topology (
configHash): Deterministic hash of the workflow graph,starts,finishes,edges,onErrorhandlers,maxConcurrentSteps,compensationTimeout, and versioned child workflow registrations ([ChildWorkflowV1, ChildWorkflowV2]) so sleeping pauses can be verified and resumed across rolling releases. - Component & saga metadata (
promptHash,schemaHash,compensateWith,committedBy): Full configuration of every@Agent,@Router,@Arbiter,@Action, and@Toolinworkflows[].nodes[], including individual SHA-256promptHashandschemaHashfingerprints and saga compensation edges. - DTO schema registry & trace join keys: Every DTO class, field decorator (
@Text,@Integer,@Float,@Enum,@List), constraint, andschemaHashinschemasjoins directly against runtimeExecutionRecord(WorkflowRecord.configHash),ComponentRecord({ name, kind, promptHash, schemaHash }), andStepRecord({ toolLoopIteration, validationAttempts, branch: { verdict, status } }) spans in Langfuse / OpenTelemetry to measure real branch, tool, and DTO field coverage.
AI coding-agent skills and machine-readable docs
Section titled “AI coding-agent skills and machine-readable docs”AGBoss is built for Senior/Staff engineers steering AI coding agents (OpenAI Codex, Cursor, Windsurf, GitHub Copilot, Gemini CLI, Aider, and Claude Code):
- Universal project entrypoints (
AGENTS.md&CLAUDE.md):agboss create <name>generates rootAGENTS.mdand a one-lineCLAUDE.md(@AGENTS.md) once and commits them to Git. They are never overwritten, allowing you to add project-specific domain rules alongside the AGBoss skill routing table. - Offline, gitignored skill suite (
SKILL.md+references/01..13.md): Bundled directly inside the@agboss/corenpm package (node_modules/@agboss/core/skills/agboss/) and automatically synced into.claude/skills/agboss/(SKILL.md,references/01-composition-and-architecture.md..13-migrating-from-langgraph.md, and.agboss-skills.json) whenevernpm install("postinstall": "npm run types", where"types": "agboss check"),agboss check, oragboss generateruns. Opt out anytime via"agboss": { "skills": false }inpackage.json. See AI-Assisted Engineering & Coding Skills for the full architecture. - Machine-readable documentation: Every documentation page on
agboss.devis published in/llms.txtand/llms-full.txtfor instant context ingestion.