"""Visual Browser Use agent backed by one streamed Chromium session.""" from __future__ import annotations from typing import AsyncGenerator, Optional from app.agents.browser_runtime import run_persistent_browser_agent async def run_browser_visual_agent( task: str, url: Optional[str] = None, *, research_depth: str = "normal", ) -> AsyncGenerator[dict, None]: """Let Browser Use research through persistent visible Chromium.""" async for event in run_persistent_browser_agent( task, url, visual=True, research_depth=research_depth ): yield event