How bluebug53/browser-use works
Browser Use is a Python AI browser-agent library, with related CLI, MCP, skills, and cloud-browser integrations. Its main workflow accepts a task, has an agent reason with a configurable language model and available tools, executes browser actions, and returns an answer or history. Browser sessions expose browser state and events; DOM extraction and filesystem support enrich the agent’s context and results. The graph preserves documented integrations and major capabilities, but source excerpts are partial, so some relationships rely on README statements or are omitted where implementation wiring is uncertain.
Main entry points: agent/service.py Agent loop · session.py Browser session · tools/service.py Action tools · config.py Configuration
Components 22
Agent workflow
- Agent loop
browser_use/agent/service.py - Prompt manager
browser_use/agent/message_manager/service.py - Model adapters
browser_use/llm/base.py - Run history
browser_use/agent/views.py
Browser runtime
- Browser session
browser_use/browser/session.py - Browser events
browser_use/browser/events.py - Browser profile
browser_use/browser/profile.py - DOM snapshots
browser_use/dom/service.py
Tools and capabilities
- Action tools
browser_use/tools/service.py - Tool registry
browser_use/tools/registry/service.py - Structured extraction
browser_use/tools/extraction - Agent files
browser_use/filesystem/file_system.py
Integrations
- MCP interface
browser_use/mcp/server.py - Browser skills
browser_use/skills/browser_use.py - Cloud browser
browser_use/browser/cloud/cloud.py - Gmail actions
browser_use/integrations/gmail/service.py
Shared services
- Token accounting
browser_use/tokens/service.py - Product telemetry
browser_use/telemetry/service.py - Configuration
browser_use/config.py
Other components
- Task author
- Web browser
- Model provider
Connections 24
- Task author → Agent loop: submits task
README.md - Agent loop → Prompt manager: builds prompts
browser_use/agent/service.py - Agent loop → Model adapters: requests completion
browser_use/agent/service.py - Model provider → Model adapters: serves model
README.md - Agent loop → Action tools: dispatches actions
browser_use/agent/service.py - Agent loop → Browser session: controls browser
browser_use/agent/service.py - Agent loop → Run history: records run
browser_use/agent/service.py - Agent loop → Token accounting: accounts tokens
browser_use/agent/service.py - Action tools → Tool registry: resolves tools
browser_use/tools/service.py - Action tools → DOM snapshots: reads page state
browser_use/tools/service.py - Action tools → Agent files: uses agent files
browser_use/tools/service.py - Action tools → Structured extraction: uses schemas
browser_use/tools/service.py - Browser session → Browser events: handles events
browser_use/browser/session.py - Browser session → DOM snapshots: provides browser state
browser_use/browser/session.py - Browser session → Browser profile: uses profile
browser_use/browser/session.py - Browser session → Web browser: drives browser
README.md - Browser session → Cloud browser: connects remotely
browser_use/browser/session.py - MCP interface → Action tools: exposes tools
browser_use/mcp/server.py - MCP interface → Browser session: offers browser access
browser_use/mcp/server.py - Browser skills → Agent loop: guides automation
README.md - Gmail actions → Configuration: reads settings
browser_use/integrations/gmail/service.py - Agent loop → Product telemetry: emits telemetry
browser_use/agent/service.py - Token accounting → Configuration: reads pricing config
browser_use/tokens/service.py - Product telemetry → Configuration: reads settings
browser_use/telemetry/service.py