Skip to content

Direct Connection (P2P)

By default, video travels browser → Adamo router → robot. A direct connection (peer-to-peer) sends it straight between the browser and the robot over WebTransport, cutting out the router hop for lower latency.

It’s additive and automatic: the browser uses the direct path when one is available and silently falls back to the relay when it isn’t — so nothing breaks, you just get lower latency where the network allows it.

A direct connection is used only when all of these hold — otherwise the session stays on the relay, which always works:

  • The robot opts in to serving P2P (see below). Robots don’t serve it by default.
  • A direct network path exists between your browser and the robot: the same LAN, the same Tailscale tailnet, or a robot with a publicly reachable IP. Robots behind symmetric CGNAT (for example Starlink) usually can’t be reached directly and stay on the relay.
  • You’re on Chrome / a Chromium browser. The direct path pins a self-signed certificate, which only Chromium supports; Safari and Firefox fall back to the relay.

The robot has to opt in. Add one call to the robot you already have (see Quickstart):

import adamo
robot = adamo.Robot(api_key="ak_...", name="my-arm", p2p=True)
robot.attach_video("main", device="/dev/video0")
robot.run()

The P2P listener is additive — the robot keeps its normal relay connection, so operators who can’t reach it directly still see video over the relay.

Nothing to configure. Open the robot on operate.adamohq.com in Chrome and it connects directly when it can.

  • Chrome may show a one-time “allow local network access” prompt the first time — click Allow (it persists for the site).
  • To confirm you’re direct, open the Control Panel latency breakdown: the path shows you ↔ robot (direct) instead of the router hops.

The most reliable way to get direct connections across different networks is to put both the robot and the machine running your browser on the same Tailscale tailnet. The robot then advertises its tailnet address as a candidate, and the connection works regardless of NAT — including symmetric CGNAT / Starlink, where a raw direct connection can’t be established. The robot must be reachable on its P2P port over the tailnet’s ACLs.

Direct connections fall back to the relay automatically, but you can also force relay-only for a browser session — run this in the browser console and reload:

localStorage.setItem('adamo_p2p', '0')
  • Direct connections are authenticated and org-scoped, and teleop minutes are metered, exactly like the relay.
  • If a direct connection drops mid-session, video continues over the relay.
  • P2P carries video (and teleop) directly; discovery, fleet presence, and the robot list still go through the Adamo network as usual.