40 / 168 · 01 Agent Skills for Browser Automation · Under the Hood: How Playwright Became Agent-Native← prev⊞ allnext →☰ Read as one page
6.3Tracing as the Agent's Flight Recorder
Playwright's trace (now including HAR network capture as of 1.60) was designed for humans debugging in the Trace Viewer. It has quietly become something else: the richest machine-readable record of what an agent did in a browser.
A trace contains every action, every snapshot before/after, console output, and network traffic. For agent-driven testing this is your audit trail:
- Debugging: feed the trace back to the agent instead of a vague "it failed."
- Review: a human can replay exactly what the healer changed and why.
- Compliance: "show me what the AI did" has a literal answer.
If you run agents against browsers in CI and you are not archiving traces, you have an unaccountable system. Archive traces.