---
site: steel.dev
collection: blog
canonical_url: https://steel.dev/blog/agent-traces
markdown_url: https://steel.dev/blog/agent-traces.md
content_signal: ai-input=yes, ai-train=yes, search=yes
related:
  - https://steel.dev/blog/why-we-built-agent-traces.md
  - https://steel.dev/blog/introducing-steel-skills.md
  - https://steel.dev/blog/agent-logs.md
title: "Agent Traces: every browser session as a prompt"
description: Every Steel browser session is now a readable timeline synced to the video, and a markdown prompt you can paste into your coding agent.
date: 2026-05-22
authors:
  - Nikola Balic
category: Product
minutes: 4
tldr: Agent Traces turns every recorded Steel session into a readable timeline of coalesced actions, synced frame-accurately to the video via HLS program-date-time. Rows expand to element details and prioritized selectors, a session copies as a markdown prompt for coding agents, and data comes live over WebSocket or via REST.
topics:
  - Session recording
  - Agent debugging
  - Action timelines
  - Reproducible browser automation
  - Auditing agent actions
entities:
  - Steel
  - Agent Traces
  - HLS
  - WebSocket
  - Claude Code
  - Codex
  - OpenCode
  - Cursor
answers_questions:
  - What is Steel Agent Traces?
  - How do I turn a browser session into a prompt for a coding agent?
  - How do I reproduce a browser agent run as a script?
  - What API endpoint returns the agent traces for a Steel session?
  - What is the difference between the agent-traces and agent-logs endpoints?
  - Can I watch agent actions live while a session runs?
---

# Agent Traces: every browser session as a prompt

Today we're shipping Agent Traces.

Open any recorded session in your dashboard and you'll find a new tab that turns the whole run into a readable timeline.

Every action the agent took, synced to the video frame by frame. Click a row, the video seeks. Click "copy as markdown" and the entire session becomes a prompt you can paste into your next agent.

[Video on YouTube](https://www.youtube.com/watch?v=dxALbPqs7Bw)

## What you see

Each row in the timeline is one coalesced activity.

Each row reads like a sentence: `click on Sign in`, `input(len=17) on Email field`, `navigate to /home`. Typing collapses into one row, not seventeen keystrokes. Idle stretches over ten seconds show up as `idle 23s` dividers.

The label is whatever a person would actually call the element. No more `<button class="x-3f9a">`.

Color-coded icons let you scan a long timeline at a glance: click, type, navigate, scroll, drag, submit, error.

## The video and the timeline are the same thing

Click any row and the video jumps to that exact moment. The seek uses HLS program-date-time, so it's frame-accurate, not a guess.

Look at the scrubber: each activity gets a small color-coded tick. You can see at a glance where the dense bursts of work were and where the agent was idle. Hover the scrubber and you get a thumbnail preview. Drag along it to scrub.

As the video plays, the row matching the current frame highlights. Hover a marker on the bar and the matching row scrolls into view. The two views stay in sync no matter which one you drive.

## The agent traces drawer

Click on a row and it expands inline. You get:

- Element details: tag, role, accessible name, every attribute that was on the element, bounding box.
- A prioritized list of selectors, in the order Steel uses internally to pick the canonical one: testId, id, aria, name, CSS, XPath.
- Pointer or keyboard details: exact x/y, button, click count, key code, modifiers.
- The page URL when this happened.
- The raw JSON of the underlying event, with a copy button.
- A thumbnail of the video frame at that instant, clickable for full-size preview.
- For coalesced runs like a typing burst or click sequence, how long the run took.

You almost never have to leave this view to figure out what happened.

## Copy as markdown, designed for agents

Hit "copy as markdown" on any session and you get a single document built to be pasted into another agent as context. It includes a built-in preamble that explains its own format.

The output reads like **a recipe an automation agent could re-execute**, and that's the explicit intent.

Paste it into Claude Code, Codex, OpenCode or Cursor with "write me a Steel script that reproduces this," and the selectors, step structure, and timing are already there. JSON export is available too if you'd rather drive it programmatically.

## Live updates

For sessions that are currently running, the timeline streams in real time over a WebSocket. New activities arrive incrementally, get deduplicated, sorted into place, and re-collapsed. Watching a live agent run feels like watching it think out loud, action by action.

When the session ends, the same data is available statically via REST.

## API

Two authenticated endpoints:

- `GET /sessions/:id/agent-traces` is the semantic timeline. Returns `{ events, total, hasMore }` where each event is an `AgentActivity` (click, input, navigate, scroll, drag, keyPress, submit, error). Use this one.
- `GET /sessions/:id/agent-logs` is the old one, raw CDP-derived events. Lower-level, retained for compatibility.

Plus a WebSocket channel for the live stream.

## What this unlocks

The first thing we keep coming back to is debugging. Instead of scrubbing video looking for the moment something went wrong, you scroll the timeline, spot the error row, click it. The video jumps to the failure. The drawer shows the element the agent was interacting with and the error message.

The second is reproducibility. Open the markdown export, paste it into your editor, ask the agent to write a script that reproduces the run. The selectors and step structure are designed for exactly this.

The third is auditing. A human-readable record of every interaction, with timestamps, in one scrollable view. Useful for trust and safety reviews, customer support investigations, and post-mortems.

## Get started

Agent Traces is generally available right now. Open any session in [app.steel.dev](https://app.steel.dev/) and you'll see the new tab next to Console Logs and Network.

Try it on a session you already have. Copy one as markdown, paste it into your favorite agent, and tell us what it builds.

- Dashboard: [app.steel.dev](https://app.steel.dev/)
- Docs: [docs.steel.dev](https://docs.steel.dev/)
- Questions or feedback: [Discord](https://discord.gg/steel-dev) or [@steeldotdev](https://twitter.com/steeldotdev)
