Skip to content

Local Agent Setup

The portal depends on a local agent for runner and swarm execution.

Login the agent

bash
npx @xyva/agent login

The command opens the portal login handoff and stores the local credentials in ~/.xyva/credentials.json.

Start the agent

bash
npx @xyva/agent start --port 7900 --project /absolute/path/to/repo

The agent exposes:

  • GET /health
  • POST /auth/refresh
  • WebSocket bridge on ws://127.0.0.1:7900

Connect from the portal

  1. Open the agent status badge in the portal header.
  2. Enter the local agent token and port if they are not already stored in the browser.
  3. Click Verbinden.

The portal first probes /health, then requests a short-lived bridge token from /auth/refresh, then opens the WebSocket session.

Hardening in Step 11

  • Limited concurrent WebSocket connections
  • Payload size cap for WebSocket and JSON requests
  • Clean rejection of malformed payloads
  • Short-lived bridge refresh tokens for reconnects

Troubleshooting

  • Agent not reachable: verify the port and local firewall.
  • Auth required: the browser token is stale; rerun npx @xyva/agent login.
  • Protocol version mismatch: update both portal and local agent to the same repo state.

Cloud portal · Local Playwright agent.