Skip to main content
Agent View: event log on the left, live browser screenshot with the agent's current action on the right

Agent View: watch a session live, or replay it afterward

Every session shows up in Agent View on the H Platform, and its agent_view_url links straight there. Watch it live to debug a detour or tune a prompt, or replay every observation, action, and message once it ends. Agent View reads the same events stream as your code. Everything below targets the session id and works the same for a single agent or a manager with subagents.

Watch a run

A blocking run-and-wait call (run_session / runSession) never surfaces the session mid-run. To read or intervene while it works, start the session and keep its handle.

Stream events as they arrive

The SDK handle’s stream() runs the changes long-poll loop for you and yields each event in order.
  • It resumes from_index and skips 204 no-change responses.
  • It stops when the session settles: a terminal state, or idle. Pass until="terminal" to keep it open across the idle turns of an interactive session.
  • With custom tools, it answers their calls: after each batch of events, it runs the calls the agent is waiting on and posts the results. It uses the tools the handle was started with, or the tools you pass.
  • Without tools it is read-only, so another process can answer the calls while you watch.
A handle’s stream and wait_for_completion share its tools and run each call once between them. Loops on separate handles or processes don’t coordinate: give tools to one of them only, or a call can run twice.

Steer a running agent

Until the session reaches a terminal state, you can:

Hold an interactive conversation

By default a session ends when the agent answers. Set idle_timeout_s at create time to keep it open: after each answer it goes idle and waits that long for your next message, keeping its context and environment across turns. It terminates once a turn goes unanswered for idle_timeout_s.
A settled session reports the agent’s outcome and, on failure, an error_code: see Session failures. At your concurrency limit, new sessions wait in queued: see Queued sessions.