agent-interface-protocol package in packages/aip. The React bindings need nothing beyond React.
The package isn’t published to npm yet. Until it is, add the repo as a workspace or copy
packages/aip into your project.1. Wrap your app
pages limits it to your agent-enabled pathnames (omit it to connect everywhere); widgetStyle styles its built-in connection panel.
2. Publish state
state in the manifest and updates live. Unmounting removes it.
If your state lives in a zustand store, publish the whole store at once:
3. Register actions
422 with your error message to the agent.
Input schemas
0.1 supports two shapes:
"quantity": "2"). Metadata is validated when registered, and input_example must itself be valid.
4. Serve the bridge
Create a bridge for the page, serve discovery, and mount both into Vite:vite.config.ts
createBridge(storage, waitMs, publicActions, page, pages): publicActions is the catalog agents see without a session, and pages lists every AIP page on the site. The demo’s server/application.ts shows a fuller setup with login and two pages.
For production hosting, see Deploy.