Source: github.com/browserbase/stagehand/releases/tag/stagehand-python%404.6.0a0.dev1750
The stagehand-python 4.6.0a0.dev1750 prerelease adds a captureAnnotatedPageContent() method to the internal Page class. It makes one request through the page's main session with actionable information enabled, calling Chromium's Page.getAnnotatedPageContent method and decoding the response. Capture and decoding run under the caller's Progress, sharing its remaining deadline and cancellation, and late responses are discarded.
Results keep the element hierarchy, frame and document identity, source node ids and redaction metadata. Nodes are not filtered by whether an action can be taken on them. If the browser does not support the method, the call raises AnnotatedPageContentUnavailableError with the original error as its cause, while other browser errors, timeouts, cancellations and decoding failures keep their own errors.
Pull request #3588, tagged by seanmcguire12, includes tests for same-origin and out-of-process iframes, open and closed shadow roots, and password fields that are redacted without exposing their values. The change remains internal, with no public page.apc() method or RPC endpoint.
Why it matters if you build agents
Agent developers cannot call this capture from their own code in this build, so existing agent workflows are unchanged. Developers working on Stagehand internals or on page-reading logic can build on the source node ids and redaction metadata once a public surface is added.
Anyone relying on the browser's unsupported-method path should expect AnnotatedPageContentUnavailableError to be raised with the underlying error attached as its cause.
Get stories like this every weekday
One short email with the day's agent tooling news.