> For the complete documentation index, see [llms.txt](https://docs.orchard.airoverflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orchard.airoverflow.com/reference/websocket.md).

# WebSocket channels

Live channels are `ws(s)://<host>/ws/sandboxes/<uuid>/<suffix>` with auth passed as query params (`?token=…&org=…&ws=…`) because browsers can't set WebSocket headers. The SDKs build the URL and decode frames for you, use the channel methods on a [`Sandbox`](/guides/live-channels.md) rather than opening sockets by hand.

| SDK method                  | suffix                              | frames               | query                 |
| --------------------------- | ----------------------------------- | -------------------- | --------------------- |
| `logs()`                    | `logs`                              | text / JSON          |                       |
| `shell()`                   | `shell`                             | text                 |                       |
| `console()`                 | `debugger/console`                  | text                 | `process=`            |
| `adb()`                     | `adb`                               | binary               |                       |
| `vnc()`                     | `vnc`                               | binary (RFB)         |                       |
| `screen()`                  | `screen/stream`                     | binary (H.264 / PNG) | `source=host\|scrcpy` |
| `mitmFlows()`               | `mitm/flows`                        | JSON                 |                       |
| `jobs.logs(node,kind,name)` | `ws/jobs/<node>/<kind>/<name>/logs` | text / JSON          |                       |
| `remote.shell(id)`          | `ws/remote/<id>/shell`              | text                 |                       |

Text channels decode to strings (or parsed JSON for `mitmFlows`); binary channels decode to `Uint8Array` (TS) / `bytes` (Python). A channel ends when the server closes it; an error close code raises [`ChannelClosedError`](/reference/errors.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.orchard.airoverflow.com/reference/websocket.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
