network and actions commands let you view these logs from the CLI. You can also query them directly with jq.
network
Thenetwork command displays HTTP requests captured during a session. Use it to reverse-engineer a site’s internal API, identify endpoints to call directly, or debug unexpected network behavior.
Flags
The session whose network log to read.
Show only the last N entries.
Filter entries by a substring match on the URL.
Filter entries by HTTP method. Example:
--method POST.Filter entries by page ID. Useful when multiple pages are open in the session.
Clear the network log for the session.
Log file location
Network logs are stored at:jq for advanced filtering.
Key fields
| Field | Description |
|---|---|
ts | ISO timestamp of the request |
method | HTTP method (GET, POST, PUT, etc.) |
url | Full request URL |
status | HTTP response status code |
contentType | Response content type |
responseBody | Response body string (may be null) |
pageId | Playwright page ID that produced the entry |
Examples
actions
Theactions command displays browser interactions recorded during a session — both actions Libretto performed as an agent and actions a user performed manually in the browser window. Use it to understand what happened during a session and reconstruct workflows from manual user behavior.
Flags
The session whose action log to read.
Show only the last N entries.
Filter entries by a substring match.
Filter by action type. Example:
--action click, --action fill.Filter by source.
user for manual browser actions, agent for Playwright actions.Filter entries by page ID.
Clear the action log for the session.
Log file location
Action logs are stored at:Key fields
| Field | Description |
|---|---|
ts | ISO timestamp |
source | user (manual DOM event) or agent (Playwright call) |
action | Action name: click, dblclick, fill, goto, reload, etc. |
selector | Locator used by the agent |
bestSemanticSelector | Canonical selector from the user DOM event |
targetSelector | Raw DOM event target selector (user events only) |
ancestorSelectors | Meaningful ancestor selectors, closest to farthest |
nearbyText | Visible text near the event target |
composedPath | Event path from raw target to farthest ancestor |
coordinates | {x, y} for pointer events |
value | Typed, selected, or submitted value |
url | Navigation target or page URL for navigation actions |
duration | Elapsed time in milliseconds (agent entries) |
success | true if the action completed, false on failure |
error | Error message when the action failed |
pageId | Playwright page ID |
Agent entries describe what Playwright tried to do (
selector, duration). User entries describe what DOM element was actually interacted with (bestSemanticSelector, targetSelector, ancestorSelectors, nearbyText, composedPath, coordinates).Examples
JSONL log files
Both logs use the JSONL format: one JSON object per line, appended in order. This makes them easy to query with standard Unix tools..libretto
sessions
<session>
state.json
logs.jsonl
network.jsonl
actions.jsonl
snapshots
Querying with jq
jq works directly on JSONL files because it processes one object per input line by default:
exec
Access
networkLog and actionLog as globals inside exec code.snapshot
Use snapshot alongside network logs to understand page state.