Agentic Install Runbook

Canonical zero-to-running setup path for agents and stewards

Agentic Install Runbook

Prompt-first procedure: Describe the outcome you want in your agent conversation. The agent should select and load the appropriate AIWG assets, explain material changes, request any needed approval, and report verification evidence. Exact commands and flags appear only in the CLI reference.

Canonical agentic installer

This is the fastest supported route from an AI conversation to a verified AIWG project. The user pastes one prompt; the provider inspects, plans, asks only for decisions it cannot safely infer, installs or repairs AIWG, then runs the guided interview → review → apply sequence and reports readiness.

For a new, outdated, broken, duplicate, or development-mode installation, use the public `SetupManifest`. A user can paste:

Install or repair AIWG for this project by following
https://aiwg.io/setup.aiwg.yaml
Explain the plan before changing anything, preserve my existing work, and ask
me only for choices you cannot safely determine.

The manifest is the canonical flow. It requires inspection before mutation, explicit approval for repairs and mode switches, preservation of source checkouts, a saved interview plan, read-only review, explicit apply, and evidence-based verification. Guided apply selects a framework from usage intent: `code`/`mixed` selects SDLC, `docs` selects writing, and `ops` selects ops. Use the manual notes below when the manifest cannot be retrieved.

The public manifest declares `metadata.execution_mode: provider-orchestrated`. Give it to a supported AI provider; do not run it with the agent-owned setup-run operation. `setup-run` is the deterministic runner for script-first application manifests. This distinction is intentional: AIWG installation repair must reason about existing checkouts, duplicate binaries, provider state, and user-authored files.

Which path applies?

ScenarioRoute
New project, existing project, stale/broken install, or development checkoutPaste the canonical prompt into the provider
Multiple providers in one projectUse the prompt and have the installer deploy and verify each provider separately
CI, cloud-init, container image, SSH-only, or other headless provisioningUse Non-Interactive Installation
Offline or restricted registry/proxy environmentUse an approved package/cache source, then follow the manual verification sequence below
Provider cannot retrieve the URLPaste the manifest contents or use the manual fallback
Provider cannot execute local toolsUse the manual fallback, then ask the provider only to verify engagement
Read-only workspace or insufficient permissions/diskResolve the environment constraint before deployment; do not force partial setup

Use this runbook when an agent or steward needs to take a machine or project from zero to a working AIWG session. The human-facing path is short: install AIWG, deploy the right artifacts, open the chosen agentic platform, and ask the steward to verify setup. Most AIWG CLI commands are tools for the agent to call inside the session, not commands the user has to learn.

Choose The Setup Scope

Use project-local setup for a repository, product, investigation, campaign, or research corpus. This is the default and keeps project context with its repository.

Use global/user-scope setup when the user wants the same AIWG agent surface available across many workspaces. This is useful for personal defaults and for providers whose primary artifact location is under the user's home directory, but it can make unrelated projects share more context than expected.

For a single project, project-local setup is the simplest start.

For multi-repository work, see Working Across Multiple Projects.

Prerequisites

AIWG requires Node.js 24 or newer. Node 24 is the standard runtime. Reuse a healthy version manager already present; do not stack managers. When none is installed, prefer `nvm-sh` on macOS, Linux, and WSL, or `nvm-windows` on native Windows.

node the version option
npm the version option

If Node or npm is missing, install them before continuing. On macOS, use the macOS Install Guide when npm global installs fail with `EACCES`.

Install AIWG

Install AIWG once for the user:

Use AIWG to complete this documented outcome: Install AIWG once for the user
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

If `aiwg` is not on `PATH`, use npm's global prefix to find the binary:

npm config get prefix
"$(npm config get prefix)/bin/aiwg" the version option

In automation or fresh shells where PATH may be unreliable, use `npx` with an explicit package name and version policy approved for that environment:

Use AIWG to complete this documented outcome: In automation or fresh shells where PATH may be unreliable, use npx with an explicit package name and version policy approved for that environment
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

Guided project setup

Run the interview from the intended project root. Select one provider or a comma-separated list:

Use AIWG to complete this documented outcome: Run the interview from the intended project root. Select one provider or a comma-separated list
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

The interview collects targets, intent, toolchains, credential references, and optional capabilities. It saves the plan beneath the configured artifact root without writing provider configuration. the review option is read-only; a bare the dry-run option also reviews an existing saved plan. Apply confirms before mutation and delegates to existing owners for configuration, framework deployment, registration, Jev setup, and direct-worker qualification. Do not append standalone maintenance commands to a successful setup.

For CI or SSH provisioning, bootstrap Node and the CLI using the non-interactive installation guide, then use answer flags with the non-interactive option. Headless apply requires the yes option. Missing required choices fail with the needed flag; headless runs never prompt. See the guided setup reference for runnable examples, scope and monorepo choices, credentials, and recovery.

Jev and direct workers require explicit opt-in. Installed CLIs are distinct from authenticated and qualified workers. Credential input is resolved only at apply, and plans store references rather than secret values. Report core readiness and optional failures separately from `aiwg.setup.apply.v1`.

A second successful apply makes no writes. After a failure or interruption, review and apply again to resume failed, skipped, or unreceipted actions. An interactive cancellation leaves the last saved plan intact. If environment facts become stale, rerun the interview/discovery before applying. Saved receipts cannot provide a transaction across an external side effect and the following receipt write; review the affected owner after a crash in that gap.

For a direct complete-system deployment when no guided plan is needed, use the agent-owned use operation. The older the agent-owned wizard operation remains a separate goal-based deployment assistant.

Global Or User-Scope Setup

In guided setup, `the scope option user` records user-level provider deployment rather than installing the CLI globally. It still writes project policy and registry state through their existing owners. Review project/user conflicts before applying; guided user scope does not mean the agent-owned use operation.

Use the global option when the user wants provider-native AIWG assets across many workspaces without a full deployment in every project:

Use AIWG to complete this documented outcome: Use the global option when the user wants provider-native AIWG assets across many workspaces without a full deployment in every project
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

This installs framework and base kernel assets at user scope, then writes only the lightweight `WORKSPACE.md`/`AIWG.md`/provider bootstrap files in the current project. In additional projects, run the agent-owned regenerate operation to create those context-only hooks.

The same applies when the current directory is `$HOME`: a second project-scope the agent-owned use operation in the home folder is not required. the agent-owned status operation uses the user registry when no project deployments are recorded, and verifies the user assets and current directory's context hooks. An explicit `the scope option project` inspects only project deployments; `the scope option user` inspects only user deployments. In a new directory without context hooks, the probe directs you to the agent-owned regenerate operation.

Use `the scope option user` instead when an additive project deployment is intentional:

Use AIWG to complete this documented outcome: Use the scope option user instead when an additive project deployment is intentional
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

Consult the provider matrix before using the global option; providers without a filesystem-discovered user scope still need their documented project adapter.

For non-interactive provisioning, target a project directory explicitly:

Use AIWG to complete this documented outcome: For non-interactive provisioning, target a project directory explicitly
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

Use the non-interactive guide for cloud-init, Docker, and CI examples: Non-Interactive Installation.

Provider Handoff

After deployment, open the chosen agentic platform in the project or workspace that was just configured. Then ask:

Check that AIWG is installed correctly and tell me what I can do here.
Read the agent-owned status operation the probe option, report the engaged state, project root, provider
files, deployed frameworks, and one recommended next action.

Provider notes:

ProviderOpen after deployFirst check
Claude CodeContinue in the project; restart only if verification finds cached contextAsk the steward to verify AIWG status
CodexContinue in the project; restart only if verification finds cached contextAsk for AIWG status and one next action
CursorOpen the project in CursorAsk Cursor to verify AIWG is active
CopilotOpen the VS Code workspaceAsk Copilot Chat for AIWG status
FactoryStart Factory from the project rootAsk for the AIWG first action
OpenCodeOpen OpenCode in the project rootAsk for one AIWG route
WarpStart Warp in the project rootAsk the session to route through AIWG
Devin DesktopOpen the project in Devin DesktopAsk Devin to verify AIWG status
HermesOpen a Hermes chat attached to the projectAsk for the AIWG route
OpenClawOpen OpenClaw with the workspaceAsk for one AIWG capability and verify deployment

Use the agent-owned context regeneration procedure from inside the session when provider context files need to be rebuilt. Use the agent-owned doctor operation as the direct diagnostic escape hatch.

Verification

For guided setup, inspect the `aiwg.setup.apply.v1` report: classification, per-action status, and core versus optional failures. A successful deployment action includes verification from the deployment owner. For direct the agent-owned use operation, the first-run proof is `aiwg.use.result.v1`; inspect its resolved project, provider, scope, phases, findings, final state, and restart requirement.

For an independent later audit, the local proof command remains:

Use AIWG to complete this documented outcome: For an independent later audit, the local proof command remains
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

For troubleshooting, the broader health check remains:

Use AIWG to complete this documented outcome: For troubleshooting, the broader health check remains
Have it inspect the current state, explain the plan, ask before material
changes, and report the result with verification evidence.

Do not make either command an additional ordinary install step. Most provider sessions can continue without restarting after the agent-owned use operation; request a restart or reload only when its result or a later probe shows the current session cannot read or discover the newly deployed files.

Common health-check outcomes:

SymptomWhat to do
`aiwg` not foundAdd npm's global `bin` directory to PATH or use `npx aiwg`
No provider artifactsRun the agent-owned use operation from the project root
Wrong project root`cd` to the intended repository and rerun the setup
Stale provider sessionRestart or reload the agentic platform
Generated context is staleAsk the session to run the agent-owned context regeneration procedure
Doctor reports repairable driftAsk the steward to explain the failing check and propose the smallest fix

What Not To Teach As The Default

Do not make normal users memorize capability-search, asset-loading, agent-loop, or framework-specific commands as the post-install path. Those implementation surfaces remain available to agents and automation, but the expected onboarding flow is platform-first and steward-first.