Download app/agents/browser_runtime.py from Madras1/Lancer: direct link, hf CLI and curl.
- Browser
- Download file 871 Bytes
-
https://huggingface.co/spaces/Madras1/Lancer/resolve/main/app/agents/browser_runtime.py
- Command line
-
hf download hf://spaces/Madras1/Lancer/app/agents/browser_runtime.py
-
curl -L -o browser_runtime.py https://huggingface.co/spaces/Madras1/Lancer/resolve/main/app/agents/browser_runtime.py
871 Bytes
| """Compatibility entry point for the Browser Use runtime. | |
| The previous hand-written observe/decide/click implementation has been | |
| retired. Browser navigation and recovery now run through pinned Browser Use | |
| attached to the E2B desktop Chrome over authenticated CDP; this module remains | |
| so existing API imports do not change. | |
| """ | |
| from __future__ import annotations | |
| from typing import AsyncGenerator, Optional | |
| from app.agents.browser_use_bridge import run_browser_use_agent | |
| async def run_persistent_browser_agent( | |
| task: str, | |
| url: Optional[str] = None, | |
| *, | |
| visual: bool, | |
| research_depth: str = "normal", | |
| ) -> AsyncGenerator[dict, None]: | |
| """Run pinned Browser Use against one persistent E2B Chromium session.""" | |
| async for event in run_browser_use_agent( | |
| task, url, visual=visual, research_depth=research_depth | |
| ): | |
| yield event | |