All you need is the session’s control_url and a WebSocket client. The frames are the same for a browser, a phone and a computer; the examples below drive a browser. On a phone, send Touch.tap or Locator.tap where they send Locator.click; on a computer, Pointer.click with "space": "screen".
1

Open the socket

The control_url looks like this, with a short-lived token for that one session:
wss://connect.dominuslabs.com/api/v1/realtime/ws/control?token=<session token>
Each session takes one unnamed connection; a new one replaces the old. Add &client=<name> (lowercase, up to 32 characters) to open a named connection beside it instead. HTTP 401 on connect means the token is bad; 403 means the session is no longer active.
2

Handshake

{ "id": 1, "method": "Protocol.handshake", "params": { "clientVersion": "my-client/1.0", "minProtocol": 3 } }
The result carries protocolVersion and capabilities, the exact methods this session answers. Check it before relying on a method.
3

Send commands

{ "id": 2, "method": "Page.navigate", "params": { "url": "https://example.com" } }
{ "id": 3, "method": "Locator.click", "params": { "locator": { "kind": "role", "role": "link", "name": "Learn more" } } }
{ "id": 4, "method": "Page.getInfo", "params": {} }

A complete client

import asyncio, json, os
import websockets

async def main():
    async with websockets.connect(os.environ["CONTROL_URL"], max_size=64 * 2**20) as ws:
        next_id = 0

        async def call(method, params=None):
            nonlocal next_id
            next_id += 1
            await ws.send(json.dumps({"id": next_id, "method": method, "params": params or {}}))
            while True:
                msg = json.loads(await ws.recv())
                if msg.get("id") == next_id:
                    if "error" in msg:
                        raise RuntimeError(f"{method}: {msg['error']['data']['kind']}: {msg['error']['message']}")
                    return msg["result"]

        hello = await call("Protocol.handshake", {"clientVersion": "raw/1.0", "minProtocol": 3})
        print("protocol", hello["protocolVersion"], len(hello["capabilities"]), "methods")

        await call("Page.navigate", {"url": "https://example.com"})
        await call("Locator.click", {"locator": {"kind": "role", "role": "link", "name": "Learn more"}})
        info = await call("Page.getInfo")
        print(info["title"], info["url"])

asyncio.run(main())
import WebSocket from "ws";

const ws = new WebSocket(process.env.CONTROL_URL);
let nextId = 0;
const pending = new Map();

ws.on("message", (raw) => {
  const msg = JSON.parse(raw);
  const p = pending.get(msg.id);
  if (!p) return;
  pending.delete(msg.id);
  msg.error ? p.reject(new Error(`${msg.error.data.kind}: ${msg.error.message}`)) : p.resolve(msg.result);
});

const call = (method, params = {}) =>
  new Promise((resolve, reject) => {
    const id = ++nextId;
    pending.set(id, { resolve, reject });
    ws.send(JSON.stringify({ id, method, params }));
  });

ws.on("open", async () => {
  await call("Protocol.handshake", { clientVersion: "raw/1.0", minProtocol: 3 });
  await call("Page.navigate", { url: "https://example.com" });
  await call("Locator.click", { locator: { kind: "role", role: "link", name: "Learn more" } });
  console.log(await call("Page.getInfo"));
  ws.close();
});

Ids when several clients share a session

Every connection on a session shares one reply stream, so two clients that both number from 1 can take each other’s replies. Start each connection’s ids at a random base (the Python driver picks one below 252) and match replies by id.

Notifications

Frames without an id are notifications. The only ones sent today are the opt-in resume notifications; ignore any you don’t recognise.