Skip to content

Robot and Topic Discovery

Adamo uses liveliness tokens to track which participants are online. A robot declares a token; the token disappears when the connection drops; everyone else watches the token namespace and reacts.

This is what powers the robot list on operate.adamohq.com. You can also use it directly from your own programs to build dashboards, fleet-management tools, or operators that automatically connect to the first available robot.

For live topic inspection, subscribe to a wildcard and print the keys that arrive. Adamo does not keep a global registry of every possible pub/sub key; a topic is visible when it publishes traffic. Use liveliness for “who is online?” and a wildcard topic tap for “what is flowing right now?”.

Hold a liveliness token for as long as you want to be visible. Drop it (or let it fall out of scope) to disappear.

import adamo
session = adamo.connect(api_key="ak_...")
token = session.alive("my-arm")
# now visible at my-arm/alive
# ... do work ...
token.close()

If you use adamo.Robot(...), a liveliness token at {name}/alive is declared automatically when the first track or publisher comes up — no manual call needed.

A one-shot query that returns every live token matching a pattern. The default **/alive covers every robot in your org.

my-arm/alive
for key in session.live_tokens():
print(key)
# trainer-01/alive
# xr-operator/alive

You can narrow the pattern — arm-*/alive for a specific class of robot, **/video/*/alive to enumerate active video tracks (each track also declares its own liveliness).

There is no broker-side “list every topic that could exist” call for live traffic. The practical live workflow is to subscribe to a wildcard, print each new sample.key, and keep the process running while you operate the robot.

Use patterns like:

PatternWhat you will see
my-arm/**Every sample under one robot.
**/control/**Gamepad, XR, GELLO, and other control inputs.
**/video/**Video packets and video-side control/stat topics.
**Every sample visible to your org. Noisy, but useful when debugging.
import adamo
session = adamo.connect(api_key="ak_...")
seen = set()
with session.subscribe("my-arm/**") as sub:
for sample in sub:
if sample.key not in seen:
seen.add(sample.key)
print(sample.key)

Drive the robot from operate.adamohq.com while this runs. You should see keys such as my-arm/control/joy, my-arm/control/cdr/xr_tracking, my-arm/video/main, and my-arm/stats/latency as those streams publish.

If you need a durable topic list for a recording, use the Data page in operate.adamohq.com or the recorded-data APIs. Recorded sessions store their topic list because those topics have already been observed and persisted.

The interesting case is reacting in real time as robots come and go. Subscribe with history=true to also receive the current set of live tokens up front, so your handler sees them as they appear.

def on_change(key, alive):
print(f"{'UP' if alive else 'DOWN'}: {key}")
session.on_liveliness("**/alive", callback=on_change, history=True)
PatternWhat it lists
**/aliveEvery live participant in the org.
arm-*/aliveAll robots whose name starts with arm-.
**/video/*/aliveEvery currently-active video track (across all robots).
xr-*/aliveAll operator-style participants named xr-….

The token namespace is just a key expression — model it however suits your fleet.