Browser Extension Architecture
The PraisonAI browser automation uses a 3-layer architecture for AI-powered browser control.The bridge server and extension support ship in the standalone
praisonai-browser package. Install them with pip install "praisonai-browser[server]" (or pip install "praisonai[all]"). The praisonai browser … commands keep working unchanged.Communication Flow
- CLI sends
start_sessionwith goal - Bridge Server routes to Extension
- Extension captures page state (screenshot, elements)
- Extension sends
observationto Bridge - Bridge processes with BrowserAgent (LLM decision)
- Bridge returns
actionto Extension - Extension executes action via CDP
- Loop continues until goal complete
Architecture Diagram
Running the Browser Agent
Message Types
Troubleshooting
Extension Not Connecting
If you see “Extension did not connect after 15s”:-
Check extension console:
- Go to
chrome://extensions/ - Find “PraisonAI Browser Agent”
- Click “service worker” link
- Look for errors
- Go to
-
Kill stale Chrome processes:
-
Rebuild extension:
-
Check bridge server:
Expected output:
connectionscounts all WebSocket clients (extension, CLI, curl’d probes). Checkextension_connections >= 1instead — it counts only clients whoseOriginstarts withchrome-extension://, so a stray CLI probe won’t make it look connected.connections >= 1alone is no longer sufficient.Servers older than PraisonAI #3115 don’t returnextension_connections. The CLI helpers (doctor extension, thelaunchpoller) fall back toconnectionsin that case.
No Observations Sent
If session starts but times out:- Check extension console for
[PraisonAI] onStartAutomation FATAL ERROR - CDP debugger may fail to attach
- Page may be a chrome:// URL (unsupported)
Debug Mode
~/.praisonai/browser_screenshots/.

