import_agent_trace
Convert a page-agent action trace into a deterministic, replayable PageBolt sequence for consistent browser automation. Resolve element indices to CSS selectors using an observe_page flatdomtree map.
Instructions
Convert a page-agent/browser-use action trace into a re-runnable PageBolt sequence. Give it the array of actions a page-agent produced (each entry may be either {action, index|selector, value, ...} or the {action_name: {...}} shape) plus, optionally, the selectors map from observe_page with format:"flatdomtree" to resolve indices to CSS selectors. Set save:false for a dry run that returns the translated steps without persisting. This endpoint does NOT consume request quota. Pair with observe_page (format:"flatdomtree") → run an agent → import_agent_trace to turn an ad-hoc agent run into a deterministic, replayable sequence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional name for the resulting sequence. | |
| save | No | Whether to persist the sequence (default true). Set false for a dry run that returns the translated steps + step_count without saving. | |
| type | No | Optional target type for the imported steps: "sequence" (default) or "video". | |
| trace | Yes | Required. Array of page-agent/browser-use action entries. Supports both {action, index|selector, value, ...} and {action_name: {...}} shapes. | |
| selectors | No | Optional index→CSS selector map (e.g. from observe_page format:"flatdomtree"). Used to resolve numeric element indices in the trace to concrete selectors. |