Skip to content

A2A Servers

Browser, desktop, and mobile agents can be exposed as A2A servers.

Browser Server

uisurf_agent run browser_agent \
  --mode a2a \
  --host 0.0.0.0 \
  --port 8001

If --port is omitted, the browser server defaults to 8001.

Desktop Server

uisurf_agent run desktop_agent \
  --mode a2a \
  --host 0.0.0.0 \
  --port 8002

If --port is omitted, the desktop server defaults to 8002.

Mobile Server

uisurf_agent run mobile_agent \
  --mode a2a \
  --host 0.0.0.0 \
  --port 8003 \
  --mobile-serial 5C060DLCR002MM

If --port is omitted, the mobile server defaults to 8003. If --mobile-serial is omitted, the server uses MOBILE_DEVICE_SERIAL or the first authorized ADB device.

Runtime Controls

A2A servers read .env through python-dotenv. Shared controls:

Variable Description
AGENT_HOST Default bind host when --host is omitted.
MAX_OBSERVATION_IMAGES Number of recent image-bearing observations that retain image payloads.
INCLUDE_THOUGHTS Global default for thought streaming when supported.
AUTO_MODE Global default for automatic approval of safety-gated A2A actions.

Per-agent controls:

Agent Port Public URL Max steps Auto mode
Browser BROWSER_AGENT_PORT BROWSER_AGENT_PUBLIC_URL BROWSER_AGENT_MAX_STEPS BROWSER_AGENT_AUTO_MODE
Desktop DESKTOP_AGENT_PORT DESKTOP_AGENT_PUBLIC_URL DESKTOP_AGENT_MAX_STEPS DESKTOP_AGENT_AUTO_MODE
Mobile MOBILE_AGENT_PORT MOBILE_AGENT_PUBLIC_URL MOBILE_AGENT_MAX_STEPS MOBILE_AGENT_AUTO_MODE

Observation settings also have per-agent overrides:

  • BROWSER_FAST_MODE
  • DESKTOP_OBSERVATION_DELAY_MS
  • MOBILE_OBSERVATION_DELAY_MS
  • BROWSER_OBSERVATION_SCALE
  • DESKTOP_OBSERVATION_SCALE
  • MOBILE_OBSERVATION_SCALE

Provider Selection

The same provider flags are available in A2A mode:

uisurf_agent run browser_agent \
  --mode a2a \
  --provider gemini \
  --model-id gemini-3-flash-preview

Human Confirmation

When a model emits a tool call requiring confirmation, the A2A executor returns an approval_required payload and moves the task into input_required.

The pending confirmation is resolved when the client sends an approval or denial response for that task.

MCP Mode

The CLI exposes --mode mcp as a reserved mode, but MCP server mode is not implemented yet. It exits with a clear error instead of starting a server.