browser_* tool calls (navigate, click, screenshot, …). Built-in providers — Browserbase, Browser Use, and Firecrawl — all ship as plugins under plugins/browser/<name>/. You can add a new one, or override a bundled one, by dropping a directory next to them.
How it fits together
A browser provider does not implement browsing. It implements session lifecycle: create a remote browser session, hand back a CDP websocket URL, and tear the session down. Mibyan’ own browser stack (agent-browser + tools/browser_tool.py) connects to whatever CDP URL you return and drives the page from there — every provider gets the full browser_* toolset for free.
The active provider is selected by browser.cloud_provider in config.yaml; the dispatcher in tools/browser_tool.py is a pure registry lookup with no per-provider conditionals.
Discovery
Mibyan scans for browser backends in three places:- Bundled —
<repo>/plugins/browser/<name>/(auto-loaded withkind: backend) - User —
~/.mibyan/plugins/browser/<name>/(opt-in viaplugins.enabledormibyan plugins enable <name>) - Pip — packages declaring a
mibyan_agent.pluginsentry point
register(ctx) calls ctx.register_browser_provider(...), which puts the instance into the registry in agent/browser_registry.py.
Directory structure
plugin.yaml:
__init__.py:
The BrowserProvider ABC
Implementagent.browser_provider.BrowserProvider. Three lifecycle methods plus identity:
The session-metadata contract
create_session() must return at least session_name, bb_session_id, cdp_url, and features. Two quirks worth knowing:
bb_session_idis a legacy key name kept verbatim for backward compatibility withtools/browser_tool.py— it holds your provider’s session ID regardless of vendor. Don’t rename it.create_session()may raise —ValueErrorfor missing credentials,RuntimeErrorfor network/API failures. The dispatcher surfaces these to the user. This differs fromclose_session/emergency_cleanup, which must never raise.
external_call_id key supports managed-gateway billing.
get_setup_schema() — the mibyan tools picker row
Override this to appear as a first-class option in the Browser Automation picker with API-key prompts and an install hook:
mibyan tools, it isn’t done — “set this env var manually” is not an integration.
Users configure it
Reference implementations
The three bundled providers underplugins/browser/ are the canonical examples, in ascending complexity: firecrawl (simplest), browser_use, and browserbase (stealth/proxy/keep-alive feature flags with graceful fallback when paid features are unavailable). Copy the closest one.
Checklist
-
nameis lowercase and stable (it’s a config value users write) -
is_available()makes zero network calls -
create_session()returns the full metadata contract (bb_session_idkey name intact) -
close_session()/emergency_cleanup()never raise -
get_setup_schema()exposes your env vars somibyan toolscan configure the backend -
plugin.yamldeclareskind: backend+provides_browser_providers

