Observability
See every step the agent takes.
An agent on a real phone should never be a black box. Stream the screen live, pull a screenshot or the full UI tree on demand, and replay every step it took. All from the API.
live view WebRTC
capture screenshots + a11y tree
trace every step
notify webhooks
Capabilities
Four ways to watch it work.
| Capability | What it does | In the API |
|---|---|---|
| Live stream | Watch the screen as the agent works, over WebRTC at low latency, in the console or embedded in your own app. The stream token controls the phone, so keep it behind your own login. | WebRTC · @mobilerun/react |
| Snapshot the state | Pull a PNG screenshot or the full accessibility tree of on-screen elements, on demand. Structured UI state, not just pixels. | screenshot · a11y tree |
| Trace every step | Every event a run emits, streamed as it happens: queued, each screenshot, every tool execution. A complete trajectory of the task. | SSE run events |
| History and alerts | List every task a device has run for the record, and fire a webhook the moment a task completes so your stack reacts on its own. | task history · webhooks |
The trajectory
Every tap, in order.
- Task queued
- Opened the app
- Tapped “Log in”
- Typed the OTP
- Swiped to checkout
- Confirmed the order
trace.ts
import { TaskTrajectoryDecoderStream } from '@mobilerun/sdk/lib/trajectory-decoder-stream'
const res = await client.tasks.attach(task.id).asResponse()
const events = res.body!
.pipeThrough(new TextDecoderStream())
.pipeThrough(new TaskTrajectoryDecoderStream())
.getReader()
while (true) {
const { done, value } = await events.read()
if (done) break
console.log(value.event) // QueuedEvent, ScreenshotEvent,
// ToolExecutionEvent, ...
} FAQ
Observability, common questions.
Can I watch a run live?+
Yes. Open any running phone in the console and watch the screen at low latency while the agent works. To show it inside your own app, embed the stream with @mobilerun/react behind your own login. The stream token gives control of the phone, so keep it private.
How do I see every step a task took?+
Attach to the task and stream its trajectory over SSE: queued, each screenshot, every tool execution, as it happens. Take a PNG screenshot or pull the full accessibility tree on demand, and list the task history per device after the fact.
How do I get notified when a task finishes?+
Register a webhook. mobilerun posts to your endpoint the moment a task completes, so nothing has to poll.
More platform: devices · agents · plan limits
See every step. Ship with confidence.
Live view, screenshots, the full UI tree, step traces and webhooks. Real phones, fully in view, all from the API.