Skip to main content
Once you’ve recorded and trained a site, BrowserWire serves its views and actions as REST endpoints via bw run. You can call these from any AI agent, automation script, or HTTP client.

Working with the local API

List discovered sites

Start by confirming which sites are available:

Get the full manifest

Fetch the manifest to see all states, views, and actions:
The manifest contains every state with its views and actions, including their input schemas. You can pass this to an LLM as context so it knows what operations are available.

Call operations

URL pattern

All endpoints follow this pattern:
  • slug — site identifier (e.g., example-com)
  • state — page state name from the manifest (e.g., HomePage, LoginPage)
  • viewName / actionName — the specific view or action within that state

Feeding to an LLM agent

A practical approach for tool-using LLMs:
  1. Fetch the manifest: GET /api/sites/{slug}/manifest
  2. Extract the list of states, views, and actions into a tool schema
  3. Let the LLM decide which endpoints to call based on the user’s request
  4. Execute the chosen endpoint and return the result

Response format

All endpoints return JSON with an ok field: Success (view):
Success (action):
Error:

CORS

The local server includes permissive CORS headers:
You can call the API directly from browser-based agents or frontends without proxy configuration.
The server listens on 127.0.0.1 by default (local only). The bw run command does not currently support a --host flag — it always binds to localhost.