Skip to main content

The AXAG SDK

Annotations describe what a page can do. The SDK is what reads them, turns them into tools, registers those tools with an agent, and checks that the promises they make are kept.

Source: github.com/web-axag/sdk

Which packages you need​

You want to…Install
Check annotations in CI@web-axag/lint
Generate a manifest without a bundler@web-axag/cli
Generate a manifest and tools on every build@web-axag/compiler
Register tools with an agent in the browser@web-axag/webmcp
…from React, Vue or Angular components@web-axag/react, @web-axag/vue or @web-axag/angular
Enforce confirmation, approval and tenant scope@web-axag/server (plus @web-axag/webmcp in the page)
Take parameters from a Zod schema or OpenAPI@web-axag/schema-zod or @web-axag/schema-openapi
Support browsers without WebMCP@web-axag/shim
Let a desktop agent reach a browser tab@web-axag/bridge
Run a one-off check or build, with no installnpx axag-lint, npx @web-axag/cli

@web-axag/core sits under all of them; you rarely install it directly.

The packages​

Authoring and checking​

PackageWhat it does
@web-axag/coreThe shared model: vocabulary, macro parser, annotation reader, parameter harvesting, manifest and tool generation. Every other package reads annotations through it, so they all agree.
@web-axag/lint37 rules over HTML, JSX, TSX and Vue. SARIF for code scanning, baselines for existing codebases, and a GitHub Action.
@web-axag/cliaxag generate, axag validate, axag fmt between macro and longhand, and axag scan to infer annotations for an unannotated site.

Commands​

PackageWhat it does
axag-lintThe axag-lint command under its bare name, so npx axag-lint src runs with no install. It depends on @web-axag/lint and runs its binary; it holds no logic of its own.

There is no unscoped axag package: npm rejects the name as too close to existing ones. Run the CLI as npx @web-axag/cli <command>, or install it and use the axag binary it puts on your path.

Building​

PackageWhat it does
@web-axag/compilerA plugin for Vite, Rollup, webpack, Rspack and esbuild. Emits the manifest and WebMCP tools on every build, reading HTML, JSX, Vue and Angular templates. See Build-Time Compilation.
@web-axag/schema-zodUses a Zod 4 schema as an action's parameters.
@web-axag/schema-openapiUses an OpenAPI 3.0/3.1 operation as an action's parameters.

Running​

PackageWhat it does
@web-axag/webmcpRegisters actions as WebMCP tools for exactly as long as their UI is on screen, and ships the in-page safety enforcers. See Agent Runtime.
@web-axag/reactuseAxag and <AxagAction>. See React.
@web-axag/vueuseAxag and v-axag. See Vue.
@web-axag/angularThe [axag] directive. See Angular.

Enforcing and bridging​

PackageWhat it does
@web-axag/serverChecks confirmation tokens, approval, roles and tenant boundaries on the server, where an agent can't skip them. See Safety Enforcers.
@web-axag/shimA document.modelContext for browsers that don't have one.
@web-axag/bridgenpx axag-bridge relays a tab's tools to any MCP client. See Shim & Bridge.

How they fit together​

 your markup / components
│
├── axag-lint ─────────────── checks, in CI
│
├── @web-axag/compiler ────────── manifest + tools, at build
│ (schema-zod, schema-openapi add parameters)
│
└── @web-axag/webmcp ──────────── registers tools, in the page
│ (react / vue / angular bind them to components)
│
├── document.modelContext ── the agent in the browser
│ (@web-axag/shim where the browser has none)
│
└── @web-axag/bridge ─────────── agents outside the browser

the call reaches your API
└── @web-axag/server ──────────── enforces what the annotation declared

Availability​

The thirteen @web-axag packages are published on npm at 1.1.1, alongside axag-lint under its bare name at the same version. Every package name on this page is the name you install.

npm install -D @web-axag/lint @web-axag/cli
npm install @web-axag/webmcp

Both command-line tools also run without an install:

npx axag-lint src
npx @web-axag/cli generate src --manifest axag-manifest.json

After installing @web-axag/cli, the shorter npx axag generate … works too, because the package puts an axag binary on your path.

Renamed in 1.1

@web-axag/axag-cli and @web-axag/axag-lint are the earlier names of @web-axag/cli and @web-axag/lint. They are deprecated and stop at their pre-1.1 versions; switch the dependency name to get 1.1.

To work on the SDK itself, build it from source:

git clone https://github.com/web-axag/sdk.git
cd axag-sdk
pnpm install && pnpm build