AnyaSelf Docs

Hyperbeam Bridge

Interactive cloud browser sessions with DOM indexing and agent actions.

The hyperbeam-bridge manages remote, embeddable Chromium browsers via the Hyperbeam API. This allows both the AI Agent and the User to interact with external websites (like brand stores) within a secure, session-scoped iframe.

Session Architecture

sequenceDiagram
    participant O as Orchestrator
    participant HB as Hyperbeam Bridge
    participant API as Hyperbeam Cloud API
    participant EXT as Chrome Extension
    participant C as Client

    O->>HB: POST /sessions (create)
    HB->>API: Spin up cloud Chromium
    API-->>HB: embedUrl + session handle
    HB-->>O: SessionView with embedUrl

    C->>C: Embed iframe (embedUrl)
    EXT->>HB: POST /hyperbeam/events (DOM_SNAPSHOT)
    EXT->>HB: POST /hyperbeam/events (ELEMENTS_INDEXED)

    O->>HB: GET /elements (query indexed DOM)
    O->>HB: POST /agent-action (CLICK element)
    HB-->>O: Updated SessionView
    HB->>O: POST /internal/hyperbeam/events (bridge event)

Endpoints

Session Management

MethodPathDescription
POST/api/v1/households/{id}/hyperbeam/sessionsCreate a new browser session
GET/api/v1/households/{id}/hyperbeam/sessionsList all sessions
GET/api/v1/households/{id}/hyperbeam/sessions/{sId}Get session state + embed URL
POST/api/v1/households/{id}/hyperbeam/sessions/{sId}/terminateForcefully shut down session

Create Session:

{
  "startUrl": "https://example-retailer.com/item/123",
  "missionId": "msn_xxx",
  "role": "CONTROLLER",
  "extensionRequired": true
}

Takeover Control

Because both the AI Agent and the User can interact with the same browser, a "takeover" lock prevents conflicts:

MethodPathDescription
POST/api/v1/households/{id}/hyperbeam/sessions/{sId}/takeoverUser takes control (agent blocked)
POST/api/v1/households/{id}/hyperbeam/sessions/{sId}/releaseUser releases control (agent resumes)

Agent Actions

The agent interacts with the browser through structured DOM actions, not raw pixels:

MethodPathDescription
POST/api/v1/households/{id}/hyperbeam/sessions/{sId}/agent-actionExecute a DOM action
GET/api/v1/households/{id}/hyperbeam/sessions/{sId}/elementsQuery indexed elements (params: query, role, limit)

Agent Action Types:

ActionDescription
CLICKClick an indexed element by elementId
TYPEType text into an element
SCROLLScroll the page
NAVIGATENavigate to a url
QUERY_ELEMENTSRe-query the DOM for interactive elements
SNAPSHOTCapture a DOM snapshot

Extension Events

A Chrome Extension running inside the Hyperbeam instance reports DOM state:

MethodPathDescription
POST/api/v1/hyperbeam/eventsReceive signed extension events

Extension Event Types:

EventDescription
DOM_SNAPSHOTFull page DOM captured
ELEMENTS_INDEXEDInteractive elements indexed and ready for agent queries
ACTION_RESULTResult of an executed agent action
PAGE_CONTEXT_CHANGEDPage navigation or significant DOM mutation

Session Lifecycle

See Data Models → Hyperbeam Session Lifecycle for the state diagram.

Configuration

VariableDefaultDescription
PERSISTENCE_BACKENDinmemoryfirestore or inmemory
HYPERBEAM_ENFORCE_EVENT_SIGNATURESfalseVerify HMAC signatures on extension events
HYPERBEAM_EVENT_SIGNING_SECRETdev-event-secret-change-meHMAC secret for event verification
ORCHESTRATOR_BASE_URLhttp://orchestrator:8003/api/v1Orchestrator URL for bridge events
ORCHESTRATOR_EVENTS_ENABLEDtrueForward events to Orchestrator
ORCHESTRATOR_EVENTS_REQUIREDfalseFail if Orchestrator is unreachable
ORCHESTRATOR_INTERNAL_TOKENdev-internal-tokenToken for internal Orchestrator calls
ARTIFACTS_AUDIT_BASE_URLhttp://artifacts-audit:8007/api/v1Audit service URL
ARTIFACTS_AUDIT_ENABLEDtrueEnable recording persistence

On this page