22Agent runtime for verification loop support.
33
44This module provides a thin runtime wrapper that combines:
5- 1. Browser session management (via BrowserBackendV0 protocol)
5+ 1. Browser session management (via BrowserBackend protocol)
662. Snapshot/query helpers
773. Tracer for event emission
884. Assertion/verification methods
7272if TYPE_CHECKING :
7373 from playwright .async_api import Page
7474
75- from .backends .protocol_v0 import BrowserBackendV0
75+ from .backends .protocol import BrowserBackend
7676 from .browser import AsyncSentienceBrowser
7777 from .tracing import Tracer
7878
@@ -90,7 +90,7 @@ class AgentRuntime:
9090 to the tracer for Studio timeline display.
9191
9292 Attributes:
93- backend: BrowserBackendV0 instance for browser operations
93+ backend: BrowserBackend instance for browser operations
9494 tracer: Tracer for event emission
9595 step_id: Current step identifier
9696 step_index: Current step index (0-based)
@@ -99,16 +99,16 @@ class AgentRuntime:
9999
100100 def __init__ (
101101 self ,
102- backend : BrowserBackendV0 ,
102+ backend : BrowserBackend ,
103103 tracer : Tracer ,
104104 snapshot_options : SnapshotOptions | None = None ,
105105 sentience_api_key : str | None = None ,
106106 ):
107107 """
108- Initialize agent runtime with any BrowserBackendV0 -compatible browser.
108+ Initialize agent runtime with any BrowserBackend -compatible browser.
109109
110110 Args:
111- backend: Any browser implementing BrowserBackendV0 protocol.
111+ backend: Any browser implementing BrowserBackend protocol.
112112 Examples:
113113 - CDPBackendV0 (for browser-use via BrowserUseAdapter)
114114 - PlaywrightBackend (future, for direct Playwright)
@@ -157,7 +157,7 @@ async def from_sentience_browser(
157157 Create AgentRuntime from AsyncSentienceBrowser (backward compatibility).
158158
159159 This factory method wraps an AsyncSentienceBrowser + Page combination
160- into the new BrowserBackendV0 -based AgentRuntime.
160+ into the new BrowserBackend -based AgentRuntime.
161161
162162 Args:
163163 browser: AsyncSentienceBrowser instance
0 commit comments