Skip to main content
A manifest is the core artifact BrowserWire produces from training. It describes a website as a typed state machine — a set of pages (states), each with views you can read and actions you can execute. Your AI agent or automation script consumes the manifest indirectly through the local execution API served by bw run.

Structure

A manifest is organized around states. Each state represents a distinct page or screen on the site.
{
  "id": "mf_abc123",
  "domain": "example.com",
  "origin": "https://example.com",
  "slug": "example-com",
  "states": [
    {
      "id": "state_1",
      "name": "HomePage",
      "url_pattern": "https://example.com/",
      "views": [
        {
          "name": "featured_products",
          "code": "async (page) => { ... }"
        }
      ],
      "actions": [
        {
          "name": "click_login",
          "inputs": [],
          "code": "async (page, inputs) => { ... }"
        }
      ]
    },
    {
      "id": "state_2",
      "name": "LoginPage",
      "url_pattern": "https://example.com/login",
      "views": [],
      "actions": [
        {
          "name": "fill_email",
          "inputs": [{ "name": "email", "type": "string" }],
          "code": "async (page, inputs) => { ... }"
        },
        {
          "name": "fill_password",
          "inputs": [{ "name": "password", "type": "string" }],
          "code": "async (page, inputs) => { ... }"
        },
        {
          "name": "submit_login",
          "inputs": [
            { "name": "email", "type": "string" },
            { "name": "password", "type": "string" }
          ],
          "code": "async (page, inputs) => { ... }"
        }
      ]
    }
  ]
}

States

Each state has:
FieldTypeDescription
idstringUnique identifier for the state
namestringSemantic name assigned by the AI (e.g., HomePage, SearchResults)
url_patternstringRFC 6570 URI template for navigating to this state
viewsarrayData extraction functions available on this page
actionsarrayInteractions that can be performed on this page

Views

A view reads structured data from a page. When you call a view endpoint, the execution server navigates to the state’s URL, waits for the page to settle, and runs the view’s code against the live DOM.
FieldTypeDescription
namestringView identifier (e.g., product_list, order_summary)
codestringPlaywright function that extracts and returns data
Views are exposed as GET endpoints:
GET /api/sites/:slug/views/:state/:view

Actions

An action performs an interaction on a page — clicking a button, filling a form field, or submitting data. Actions can accept typed inputs.
FieldTypeDescription
namestringAction identifier (e.g., click_login, submit_form)
inputsarrayParameters the action accepts (name, type)
codestringPlaywright function that performs the interaction
Actions are exposed as POST endpoints:
POST /api/sites/:slug/actions/:state/:action

How execution works

When you call an endpoint on the local server (bw run):
  1. The server looks up the manifest for the site slug
  2. Finds the target state and view/action
  3. Opens a new browser page
  4. Navigates to the state’s URL (expanding any RFC 6570 template variables with your inputs)
  5. Waits for the DOM to settle (using a MutationObserver-based debounce)
  6. Executes the view or action code
  7. Returns the result as JSON
The browser page is closed after each request. Multiple requests can run concurrently up to the --max-concurrent limit (default: 3).

Dashboard view

The dashboard shows each manifest’s endpoints with copy-ready curl commands. Navigate to APIs and click a domain to see all available views and actions organized by state.