brk-code

browser-use の API リファレンス

browser-use (browser-use/browser-use) の公開 API 331 件 —— クラス 134、関数 38、メソッド 159。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: browser-use/browser-use

種別件数
クラス134
関数38
メソッド159

API 一覧

classbrowser_use.actor.element.BoundingBox
Element bounding box with position and dimensions.
classbrowser_use.actor.element.Element
Element operations using BackendNodeId.
methodbrowser_use.actor.element.Element.check() -> None
Check or uncheck a checkbox/radio button.
methodbrowser_use.actor.element.Element.evaluate(page_function:str, *args) -> str
Execute JavaScript code in the context of this element.
methodbrowser_use.actor.element.Element.focus() -> None
Focus the element.
methodbrowser_use.actor.element.Element.get_attribute(name:str) -> str | None
Get an attribute value.
methodbrowser_use.actor.element.Element.get_bounding_box() -> BoundingBox | None
Get the bounding box of the element.
methodbrowser_use.actor.element.Element.hover() -> None
Hover over the element.
methodbrowser_use.actor.element.Element.select_option(values:str | list[str]) -> None
Select option(s) in a select element.
classbrowser_use.actor.element.ElementInfo
Basic information about a DOM element.
classbrowser_use.actor.element.Position
2D position coordinates.
classbrowser_use.actor.mouse.Mouse
Mouse operations for a target.
methodbrowser_use.actor.mouse.Mouse.click(x:int, y:int, button:'MouseButton'='left', click_count:int=1) -> None
Click at the specified coordinates.
methodbrowser_use.actor.mouse.Mouse.down(button:'MouseButton'='left', click_count:int=1) -> None
Press mouse button down.
methodbrowser_use.actor.mouse.Mouse.move(x:int, y:int, steps:int=1) -> None
Move mouse to the specified coordinates.
methodbrowser_use.actor.mouse.Mouse.scroll(x:int | None=None, y:int | None=None, delta_x:int | None=None, delta_y:int | None=None) -> None
Scroll the page using robust CDP methods.
methodbrowser_use.actor.mouse.Mouse.up(button:'MouseButton'='left', click_count:int=1) -> None
Release mouse button.
classbrowser_use.actor.page.Page
Page operations (tab or iframe).
methodbrowser_use.actor.page.Page.dom_service() -> 'DomService'
Get the DOM service for this target.
methodbrowser_use.actor.page.Page.evaluate(page_function:str, *args) -> str
Execute JavaScript in the target.
methodbrowser_use.actor.page.Page.get_element(backend_node_id:int) -> 'Element'
Get an element by its backend node ID.
methodbrowser_use.actor.page.Page.get_element_by_prompt(prompt:str, llm:'BaseChatModel | None'=None) -> 'Element | None'
Get an element by a prompt.
methodbrowser_use.actor.page.Page.get_elements_by_css_selector(selector:str) -> list['Element']
Get elements by CSS selector.
methodbrowser_use.actor.page.Page.get_target_info() -> 'TargetInfo'
Get target information.
methodbrowser_use.actor.page.Page.get_title() -> str
Get the current title.
methodbrowser_use.actor.page.Page.get_url() -> str
Get the current URL.
methodbrowser_use.actor.page.Page.go_back() -> None
Navigate back in history.
methodbrowser_use.actor.page.Page.go_forward() -> None
Navigate forward in history.
methodbrowser_use.actor.page.Page.goto(url:str) -> None
Navigate this target to a URL.
methodbrowser_use.actor.page.Page.mouse() -> 'Mouse'
Get the mouse interface for this target.
methodbrowser_use.actor.page.Page.must_get_element_by_prompt(prompt:str, llm:'BaseChatModel | None'=None) -> 'Element'
Get an element by a prompt.
methodbrowser_use.actor.page.Page.navigate(url:str) -> None
Alias for goto.
methodbrowser_use.actor.page.Page.reload() -> None
Reload the target.
methodbrowser_use.actor.page.Page.screenshot(format:str='png', quality:int | None=None) -> str
Take a screenshot and return base64 encoded image.
methodbrowser_use.actor.page.Page.session_id() -> str
Get the session ID for this target.
methodbrowser_use.actor.page.Page.set_viewport_size(width:int, height:int) -> None
Set the viewport size.
funcbrowser_use.actor.playground.playground.main()
Main playground function.
classbrowser_use.actor.utils.Utils
Utility functions for actor operations.
methodbrowser_use.actor.utils.Utils.get_key_info(key:str) -> tuple[str, int | None]
Get the code and windowsVirtualKeyCode for a key.
funcbrowser_use.actor.utils.get_key_info(key:str) -> tuple[str, int | None]
Get the code and windowsVirtualKeyCode for a key.
classbrowser_use.agent.cloud_events.UpdateAgentSessionEvent
Event to update an existing agent session
classbrowser_use.agent.message_manager.views.MessageHistory
History of messages
classbrowser_use.agent.message_manager.views.MessageManagerState
Holds the state for MessageManager
funcbrowser_use.agent.prompts.get_ai_step_user_prompt(query:str, stats_summary:str, content:str) -> str
Build user prompt for AI step action.
funcbrowser_use.agent.prompts.get_rerun_summary_message(prompt:str, screenshot_b64:str | None=None) -> UserMessage
Build a UserMessage for rerun summary generation.
methodbrowser_use.agent.service.Agent.authenticate_cloud_sync(show_instructions:bool=True) -> bool
Authenticate with cloud service for future runs.
methodbrowser_use.agent.service.Agent.close()
Close all resources
methodbrowser_use.agent.service.Agent.current_llm_model() -> str
Get the model name of the currently active LLM.
methodbrowser_use.agent.service.Agent.detect_variables() -> dict[str, DetectedVariable]
Detect reusable variables in agent history
methodbrowser_use.agent.service.Agent.get_model_output(input_messages:list[BaseMessage]) -> AgentOutput
Get next action from LLM based on current state
methodbrowser_use.agent.service.Agent.log_completion() -> None
Log the completion of the task
methodbrowser_use.agent.service.Agent.multi_act(actions:list[ActionModel]) -> list[ActionResult]
Execute multiple actions with page-change guards.
methodbrowser_use.agent.service.Agent.pause() -> None
Pause the agent before the next step
funcbrowser_use.agent.service.Agent.replace_url(match:re.Match) -> str
Url can only have 1 query and 1 fragment
methodbrowser_use.agent.service.Agent.resume() -> None
Resume the agent
methodbrowser_use.agent.service.Agent.save_file_system_state() -> None
Save current file system state to agent state
methodbrowser_use.agent.service.Agent.save_history(file_path:str | Path | None=None) -> None
Save the history to a file with sensitive data filtering
funcbrowser_use.agent.service.Agent.skill_handler(params:BaseModel) -> ActionResult
Execute a specific skill
methodbrowser_use.agent.service.Agent.step(step_info:AgentStepInfo | None=None) -> None
Execute one step of the task
methodbrowser_use.agent.service.Agent.stop() -> None
Stop the agent
funcbrowser_use.agent.service.log_response(response:AgentOutput, registry=None, logger=None) -> None
Utility function to log the model's response.
classbrowser_use.agent.views.ActionResult
Result of executing an action
classbrowser_use.agent.views.AgentError
Container for agent error handling
classbrowser_use.agent.views.AgentHistory
History item for agent actions
classbrowser_use.agent.views.AgentHistoryList
List of AgentHistory messages, i.e.
methodbrowser_use.agent.views.AgentHistoryList.action_names() -> list[str]
Get all action names from history
methodbrowser_use.agent.views.AgentHistoryList.action_results() -> list[ActionResult]
Get all results from history
methodbrowser_use.agent.views.AgentHistoryList.add_item(history_item:AgentHistory) -> None
Add a history item to the list
methodbrowser_use.agent.views.AgentHistoryList.extracted_content() -> list[str]
Get all extracted content from history
methodbrowser_use.agent.views.AgentHistoryList.final_result() -> None | str
Final result from history
methodbrowser_use.agent.views.AgentHistoryList.has_errors() -> bool
Check if the agent has any non-None errors
methodbrowser_use.agent.views.AgentHistoryList.is_done() -> bool
Check if the agent is done
methodbrowser_use.agent.views.AgentHistoryList.is_judged() -> bool
Check if the agent trace has been judged
methodbrowser_use.agent.views.AgentHistoryList.last_action() -> None | dict
Last action in history
methodbrowser_use.agent.views.AgentHistoryList.load_from_file(filepath:str | Path, output_model:type[AgentOutput]) -> AgentHistoryList
Load history from JSON file
methodbrowser_use.agent.views.AgentHistoryList.model_actions() -> list[dict]
Get all actions from history
methodbrowser_use.agent.views.AgentHistoryList.model_actions_filtered(include:list[str] | None=None) -> list[dict]
Get all model actions from history as JSON
methodbrowser_use.agent.views.AgentHistoryList.model_outputs() -> list[AgentOutput]
Get all model outputs from history
methodbrowser_use.agent.views.AgentHistoryList.model_thoughts() -> list[AgentBrain]
Get all thoughts from history
methodbrowser_use.agent.views.AgentHistoryList.number_of_steps() -> int
Get the number of steps in the history
methodbrowser_use.agent.views.AgentHistoryList.screenshot_paths(n_last:int | None=None, return_none_if_not_screenshot:bool=True) -> list[str | None]
Get all screenshot paths from history
methodbrowser_use.agent.views.AgentHistoryList.total_duration_seconds() -> float
Get total duration of all steps in seconds
methodbrowser_use.agent.views.AgentHistoryList.urls() -> list[str | None]
Get all unique URLs from history
methodbrowser_use.agent.views.AgentOutput.type_with_custom_actions(custom_actions:type[ActionModel]) -> type[AgentOutput]
Extend actions with custom actions
classbrowser_use.agent.views.AgentSettings
Configuration options for the Agent
classbrowser_use.agent.views.AgentState
Holds all state information for an Agent
classbrowser_use.agent.views.DetectedVariable
A detected variable in agent history
classbrowser_use.agent.views.JudgementResult
LLM judgement of agent trace
classbrowser_use.agent.views.PageFingerprint
Lightweight fingerprint of the browser page state.
classbrowser_use.agent.views.RerunSummaryAction
AI-generated summary for rerun completion
classbrowser_use.agent.views.VariableMetadata
Metadata about detected variables in history
methodbrowser_use.beta.service.Agent.authenticate_cloud_sync(show_instructions:bool=True) -> bool
Browser Use-compatible cloud-sync hook.
methodbrowser_use.beta.service.Agent.log_completion() -> None
Log Browser Use-style task completion.
methodbrowser_use.beta.service.Agent.resume() -> None
Resume a paused Rust-backed agent.
methodbrowser_use.beta.service.Agent.save_history(file_path:str | Path | None=None) -> None
Save the current Browser Use history to disk.
methodbrowser_use.beta.service.Agent.stop() -> None
Stop the Rust-backed agent before the next terminal run.
classbrowser_use.beta.service.BetaAgentError
Raised when the beta agent cannot run a task.
funcbrowser_use.browser.chrome.find_chrome_executable() -> str | None
Find Chrome/Chromium executable on the system.
classbrowser_use.browser.cloud.cloud.CloudBrowserClient
Client for browser-use cloud browser service.
methodbrowser_use.browser.cloud.cloud.CloudBrowserClient.create_browser(request:CreateBrowserRequest, extra_headers:dict[str, str] | None=None) -> CloudBrowserResponse
Create a new cloud browser instance.
methodbrowser_use.browser.cloud.cloud.CloudBrowserClient.stop_browser(session_id:str | None=None, extra_headers:dict[str, str] | None=None) -> CloudBrowserResponse
Stop a cloud browser session.
classbrowser_use.browser.cloud.views.CloudBrowserError
Exception raised when cloud browser operations fail.
classbrowser_use.browser.cloud.views.CloudBrowserResponse
Response from cloud browser API.
classbrowser_use.browser.cloud.views.CreateBrowserRequest
Request to create a cloud browser instance.
classbrowser_use.browser.events.AgentFocusChangedEvent
Agent focus changed to a different tab.
classbrowser_use.browser.events.BrowserConnectedEvent
Browser has started/connected.
classbrowser_use.browser.events.BrowserErrorEvent
An error occurred in the browser layer.
classbrowser_use.browser.events.BrowserKillEvent
Kill local browser subprocess.
classbrowser_use.browser.events.BrowserLaunchEvent
Launch a local browser process.
classbrowser_use.browser.events.BrowserLaunchResult
Result of launching a browser.
classbrowser_use.browser.events.BrowserReconnectedEvent
WebSocket reconnection succeeded.
classbrowser_use.browser.events.BrowserReconnectingEvent
WebSocket reconnection attempt is starting.
classbrowser_use.browser.events.BrowserStartEvent
Start/connect to browser.
classbrowser_use.browser.events.BrowserStateRequestEvent
Request current browser state.
classbrowser_use.browser.events.BrowserStopEvent
Stop/disconnect from browser.
classbrowser_use.browser.events.BrowserStoppedEvent
Browser has stopped/disconnected.
classbrowser_use.browser.events.CaptchaSolverFinishedEvent
Captcha solving finished by the browser proxy.
classbrowser_use.browser.events.CaptchaSolverStartedEvent
Captcha solving started by the browser proxy.
classbrowser_use.browser.events.ClickCoordinateEvent
Click at specific coordinates.
classbrowser_use.browser.events.ClickElementEvent
Click an element.
classbrowser_use.browser.events.CloseTabEvent
Close a tab.
classbrowser_use.browser.events.ElementSelectedEvent
An element was selected.
classbrowser_use.browser.events.FileDownloadedEvent
A file has been downloaded.
classbrowser_use.browser.events.GoBackEvent
Navigate back in browser history.
classbrowser_use.browser.events.GoForwardEvent
Navigate forward in browser history.
classbrowser_use.browser.events.LoadStorageStateEvent
Request to load browser storage state.
classbrowser_use.browser.events.NavigateToUrlEvent
Navigate to a specific URL.
classbrowser_use.browser.events.NavigationCompleteEvent
Navigation completed.
classbrowser_use.browser.events.NavigationStartedEvent
Navigation started.
classbrowser_use.browser.events.RefreshEvent
Refresh/reload the current page.
classbrowser_use.browser.events.SaveStorageStateEvent
Request to save browser storage state.
classbrowser_use.browser.events.ScreenshotEvent
Request to take a screenshot.
classbrowser_use.browser.events.ScrollEvent
Scroll the page or element.
classbrowser_use.browser.events.ScrollToTextEvent
Scroll to specific text on the page.
classbrowser_use.browser.events.SendKeysEvent
Send keyboard keys/shortcuts.
classbrowser_use.browser.events.StorageStateLoadedEvent
Notification that storage state was loaded.
classbrowser_use.browser.events.StorageStateSavedEvent
Notification that storage state was saved.
classbrowser_use.browser.events.SwitchTabEvent
Switch to a different tab.
classbrowser_use.browser.events.TabClosedEvent
A tab was closed.
classbrowser_use.browser.events.TabCreatedEvent
A new tab was created.
classbrowser_use.browser.events.TargetCrashedEvent
A target has crashed.
classbrowser_use.browser.events.TypeTextEvent
Type text into an element.
classbrowser_use.browser.events.UploadFileEvent
Upload a file to an element.
classbrowser_use.browser.events.WaitEvent
Wait for a specified number of seconds.
classbrowser_use.browser.profile.BrowserNewContextArgs
Pydantic model for new_context() arguments.
classbrowser_use.browser.profile.ProxySettings
Typed proxy settings for Chromium traffic.
funcbrowser_use.browser.profile.validate_cli_arg(arg:str) -> str
Validate that arg is a valid CLI argument.
funcbrowser_use.browser.profile.validate_float_range(value:float, min_val:float, max_val:float) -> float
Validate that float is within specified range.
funcbrowser_use.browser.python_highlights.get_element_color(tag_name:str, element_type:str | None=None) -> str
Get color for element based on tag name and type.
funcbrowser_use.browser.python_highlights.should_show_index_overlay(backend_node_id:int | None) -> bool
Determine if index overlay should be shown.
methodbrowser_use.browser.session.BrowserSession.cdp_client() -> CDPClient
Get the cached root CDP cdp_session.cdp_client.
methodbrowser_use.browser.session.BrowserSession.cdp_url() -> str | None
CDP URL from browser profile.
methodbrowser_use.browser.session.BrowserSession.clear_cookies() -> None
Clear all cookies.
methodbrowser_use.browser.session.BrowserSession.close() -> None
Alias for stop().
methodbrowser_use.browser.session.BrowserSession.close_page(page:'Union[Page, str]') -> None
Close a page by Page object or target ID.
methodbrowser_use.browser.session.BrowserSession.cookies() -> list['Cookie']
Get cookies, optionally filtered by URLs.
methodbrowser_use.browser.session.BrowserSession.demo_mode() -> 'DemoMode | None'
Lazy init demo mode helper when enabled.
methodbrowser_use.browser.session.BrowserSession.find_frame_target(frame_id:str, all_frames:dict[str, dict] | None=None) -> dict | None
Find the frame info for a specific frame ID.
methodbrowser_use.browser.session.BrowserSession.get_current_page() -> 'Page | None'
Get the current page as an actor Page.
methodbrowser_use.browser.session.BrowserSession.get_current_page_title() -> str
Get the title of the current page.
methodbrowser_use.browser.session.BrowserSession.get_current_page_url() -> str
Get the URL of the current page.
methodbrowser_use.browser.session.BrowserSession.get_dom_element_by_index(index:int) -> EnhancedDOMTreeNode | None
Get DOM element by index.
methodbrowser_use.browser.session.BrowserSession.get_focused_target() -> 'Target | None'
Get the target that currently has agent focus.
methodbrowser_use.browser.session.BrowserSession.get_index_by_id(element_id:str) -> int | None
Find element index by its id attribute.
methodbrowser_use.browser.session.BrowserSession.get_or_create_cdp_session(target_id:TargetID | None=None, focus:bool=True) -> CDPSession
Get CDP session for a target from the event-driven pool.
methodbrowser_use.browser.session.BrowserSession.get_selector_index(node:EnhancedDOMTreeNode) -> int
Return the model-visible selector index for a DOM node.
methodbrowser_use.browser.session.BrowserSession.get_state_as_text() -> str
Get the browser state as text.
methodbrowser_use.browser.session.BrowserSession.is_file_input(element:Any) -> bool
Check if element is a file input.
methodbrowser_use.browser.session.BrowserSession.kill() -> None
Kill the browser session and reset all state.
methodbrowser_use.browser.session.BrowserSession.must_get_current_page() -> 'Page'
Get the current page as an actor Page.
methodbrowser_use.browser.session.BrowserSession.navigate_to(url:str, new_tab:bool=False) -> None
Navigate to a URL using the standard event system.
methodbrowser_use.browser.session.BrowserSession.new_page(url:str | None=None) -> 'Page'
Create a new page (tab).
methodbrowser_use.browser.session.BrowserSession.on_BrowserStartEvent(event:BrowserStartEvent) -> dict[str, str]
Handle browser start request.
methodbrowser_use.browser.session.BrowserSession.on_BrowserStopEvent(event:BrowserStopEvent) -> None
Handle browser stop request.
methodbrowser_use.browser.session.BrowserSession.on_CloseTabEvent(event:CloseTabEvent) -> None
Handle tab closure - update focus if needed.
methodbrowser_use.browser.session.BrowserSession.on_FileDownloadedEvent(event:FileDownloadedEvent) -> None
Track downloaded files during this session.
methodbrowser_use.browser.session.BrowserSession.on_SwitchTabEvent(event:SwitchTabEvent) -> TargetID
Handle tab switching - core browser functionality.
methodbrowser_use.browser.session.BrowserSession.on_TabClosedEvent(event:TabClosedEvent) -> None
Handle tab closure - update focus if needed.
methodbrowser_use.browser.session.BrowserSession.remove_highlights() -> None
Remove highlights from the page using CDP.
methodbrowser_use.browser.session.BrowserSession.reset() -> None
Clear all cached CDP sessions with proper cleanup.
methodbrowser_use.browser.session.BrowserSession.screenshot_element(selector:str, path:str | None=None, format:str='png', quality:int | None=None) -> bytes
Take a screenshot of a specific element.
methodbrowser_use.browser.session.BrowserSession.start() -> None
Start the browser session.
methodbrowser_use.browser.session.BrowserSession.take_screenshot(path:str | None=None, full_page:bool=False, format:str='png', quality:int | None=None, clip:dict | None=None) -> bytes
Take a screenshot using CDP.
classbrowser_use.browser.session.CDPSession
CDP communication channel to a target.
classbrowser_use.browser.session_manager.SessionManager
Event-driven CDP session manager.
methodbrowser_use.browser.session_manager.SessionManager.clear() -> None
Clear all owned data structures for cleanup.
methodbrowser_use.browser.session_manager.SessionManager.get_all_page_targets() -> list
Get all page/tab targets using owned data.
methodbrowser_use.browser.session_manager.SessionManager.get_all_target_ids() -> list[TargetID]
Get all target IDs from owned data.
methodbrowser_use.browser.session_manager.SessionManager.get_session(session_id:SessionID) -> 'CDPSession | None'
Get session from owned data.
methodbrowser_use.browser.session_manager.SessionManager.get_target(target_id:TargetID) -> 'Target | None'
Get target from owned data.
methodbrowser_use.browser.session_manager.SessionManager.get_target_id_from_session_id(session_id:SessionID) -> TargetID | None
Look up which target a session belongs to.
methodbrowser_use.browser.session_manager.SessionManager.start_monitoring() -> None
Start monitoring Target attach/detach events.
methodbrowser_use.browser.session_manager.SessionManager.validate_session(target_id:TargetID) -> bool
Check if a target still has active sessions.
classbrowser_use.browser.views.NetworkRequest
Information about a pending network request
classbrowser_use.browser.views.PageInfo
Comprehensive page size and scroll information
classbrowser_use.browser.views.TabInfo
Represents information about a browser tab
classbrowser_use.browser.views.URLNotAllowedError
Error raised when a URL is not allowed
classbrowser_use.browser.watchdog_base.BaseWatchdog
Base class for all browser watchdogs.
classbrowser_use.browser.watchdogs.crash_watchdog.NetworkRequestTracker
Tracks ongoing network requests.
classbrowser_use.browser.watchdogs.local_browser_watchdog.LocalBrowserWatchdog
Manages local browser subprocess lifecycle.
methodbrowser_use.browser.watchdogs.local_browser_watchdog.LocalBrowserWatchdog.browser_pid() -> int | None
Get the browser process ID.
methodbrowser_use.browser.watchdogs.local_browser_watchdog.LocalBrowserWatchdog.on_BrowserKillEvent(event:BrowserKillEvent) -> None
Kill the local browser subprocess.
methodbrowser_use.browser.watchdogs.local_browser_watchdog.LocalBrowserWatchdog.on_BrowserLaunchEvent(event:BrowserLaunchEvent) -> BrowserLaunchResult
Launch a local browser process.
classbrowser_use.browser.watchdogs.screenshot_watchdog.ScreenshotWatchdog
Handles screenshot requests using CDP.
methodbrowser_use.browser.watchdogs.screenshot_watchdog.ScreenshotWatchdog.on_ScreenshotEvent(event:ScreenshotEvent) -> str
Handle screenshot request using CDP.
classbrowser_use.config.AgentEntry
Agent configuration entry.
classbrowser_use.config.DBStyleConfigJSON
New database-style configuration format.
classbrowser_use.config.DBStyleEntry
Database-style entry with UUID and metadata.
classbrowser_use.config.FlatEnvConfig
All environment variables in a flat namespace.
classbrowser_use.config.LLMEntry
LLM configuration entry.
funcbrowser_use.config.create_default_config() -> DBStyleConfigJSON
Create a fresh default configuration.
funcbrowser_use.config.get_default_llm(config:dict[str, Any]) -> dict[str, Any]
Get default LLM config from config dict.
funcbrowser_use.config.get_default_profile(config:dict[str, Any]) -> dict[str, Any]
Get default browser profile from config dict.
funcbrowser_use.config.load_and_migrate_config(config_path:Path) -> DBStyleConfigJSON
Load config.json or create fresh one if old format detected.
funcbrowser_use.config.load_browser_use_config() -> dict[str, Any]
Load browser-use configuration for MCP components.
classbrowser_use.dom.serializer.html_serializer.HTMLSerializer
Serializes enhanced DOM trees back to HTML format.
methodbrowser_use.dom.serializer.html_serializer.HTMLSerializer.serialize(node:EnhancedDOMTreeNode, depth:int=0) -> str
Serialize an enhanced DOM tree node to HTML.
classbrowser_use.dom.serializer.paint_order.RectUnionPure
Maintains a *disjoint* set of rectangles.
methodbrowser_use.dom.serializer.paint_order.RectUnionPure.add(r:Rect) -> bool
Insert r unless it is already covered.
methodbrowser_use.dom.serializer.paint_order.RectUnionPure.contains(r:Rect) -> bool
True iff r is fully covered by the current union.
classbrowser_use.dom.serializer.serializer.DOMTreeSerializer
Serializes enhanced DOM trees to string format.
funcbrowser_use.dom.utils.cap_text_length(text:str, max_length:int) -> str
Cap text length for display.
classbrowser_use.dom.views.MarkdownChunk
A structure-aware chunk of markdown content.
classbrowser_use.dom.views.MatchLevel
Element matching strictness levels for history replay.
classbrowser_use.dom.views.NodeType
DOM node types based on the DOM specification.
classbrowser_use.dom.views.SimplifiedNode
Simplified tree node for optimization.
funcbrowser_use.dom.views.filter_dynamic_classes(class_str:str | None) -> str
Remove dynamic state classes, keep semantic/identifying ones.
classbrowser_use.filesystem.file_system.BaseFile
Base class for all file types
methodbrowser_use.filesystem.file_system.BaseFile.append_file_content(content:str) -> None
Append content to internal content
methodbrowser_use.filesystem.file_system.BaseFile.extension() -> str
File extension (e.g.
methodbrowser_use.filesystem.file_system.BaseFile.write_file_content(content:str) -> None
Update internal content (formatted)
classbrowser_use.filesystem.file_system.DocxFile
DOCX file implementation
methodbrowser_use.filesystem.file_system.FileSystem.append_file(full_filename:str, content:str) -> str
Append content to file using file-specific append method
methodbrowser_use.filesystem.file_system.FileSystem.display_file(full_filename:str) -> str | None
Display file content using file-specific display method
methodbrowser_use.filesystem.file_system.FileSystem.get_allowed_extensions() -> list[str]
Get allowed extensions
methodbrowser_use.filesystem.file_system.FileSystem.get_dir() -> Path
Get the file system directory
methodbrowser_use.filesystem.file_system.FileSystem.get_state() -> FileSystemState
Get serializable state of the file system
methodbrowser_use.filesystem.file_system.FileSystem.get_todo_contents() -> str
Get todo file contents
methodbrowser_use.filesystem.file_system.FileSystem.list_files() -> list[str]
List all files in the system
methodbrowser_use.filesystem.file_system.FileSystem.nuke() -> None
Delete the file system directory
methodbrowser_use.filesystem.file_system.FileSystem.replace_file_str(full_filename:str, old_str:str, new_str:str) -> str
Replace old_str with new_str in file_name
methodbrowser_use.filesystem.file_system.FileSystem.save_extracted_content(content:str) -> str
Save extracted content to a numbered file
methodbrowser_use.filesystem.file_system.FileSystem.write_file(full_filename:str, content:str) -> str
Write content to file using file-specific write method
classbrowser_use.filesystem.file_system.FileSystemState
Serializable state of the file system
classbrowser_use.filesystem.file_system.HtmlFile
HTML file implementation
classbrowser_use.filesystem.file_system.JsonFile
JSON file implementation
classbrowser_use.filesystem.file_system.JsonlFile
JSONL (JSON Lines) file implementation
classbrowser_use.filesystem.file_system.MarkdownFile
Markdown file implementation
classbrowser_use.filesystem.file_system.PdfFile
PDF file implementation
classbrowser_use.filesystem.file_system.TxtFile
Plain text file implementation
classbrowser_use.filesystem.file_system.XmlFile
XML file implementation
classbrowser_use.integrations.gmail.actions.GetRecentEmailsParams
Parameters for getting recent emails
classbrowser_use.integrations.gmail.service.GmailService
Gmail API service for email reading.
methodbrowser_use.integrations.gmail.service.GmailService.is_authenticated() -> bool
Check if Gmail service is authenticated
classbrowser_use.llm.anthropic.chat.ChatAnthropic
A wrapper around Anthropic's chat model.
methodbrowser_use.llm.anthropic.chat.ChatAnthropic.get_client() -> AsyncAnthropic
Returns an AsyncAnthropic client.
classbrowser_use.llm.aws.chat_anthropic.ChatAnthropicBedrock
AWS Bedrock Anthropic Claude chat model.
methodbrowser_use.llm.aws.chat_anthropic.ChatAnthropicBedrock.get_client() -> AsyncAnthropicBedrock
Returns an AsyncAnthropicBedrock client.
classbrowser_use.llm.browser_use.chat.ChatBrowserUse
Client for browser-use cloud API.
classbrowser_use.llm.cerebras.chat.ChatCerebras
Cerebras inference wrapper (OpenAI-compatible).
classbrowser_use.llm.deepseek.chat.ChatDeepSeek
DeepSeek /chat/completions wrapper (OpenAI-compatible).
classbrowser_use.llm.exceptions.ModelProviderError
Exception raised when a model provider returns an error.
classbrowser_use.llm.ollama.chat.ChatOllama
A wrapper around Ollama's chat model.
methodbrowser_use.llm.ollama.chat.ChatOllama.get_client() -> OllamaAsyncClient
Returns an OllamaAsyncClient client.
methodbrowser_use.llm.openai.chat.ChatOpenAI.get_client() -> AsyncOpenAI
Returns an AsyncOpenAI client.
funcbrowser_use.llm.schema.SchemaOptimizer.ensure_additional_properties_false(obj:Any) -> None
Ensure all objects have additionalProperties: false
funcbrowser_use.llm.schema.SchemaOptimizer.remove_forbidden_fields(obj:Any) -> None
Recursively remove minItems/min_items and default values
classbrowser_use.llm.views.ChatInvokeCompletion
Response from a chat model invocation.
classbrowser_use.llm.views.ChatInvokeUsage
Usage information for a chat model invocation.
classbrowser_use.logging_config.FIFOHandler
Non-blocking handler that writes to a named pipe.
funcbrowser_use.logging_config.setup_log_pipes(session_id:str, base_dir:str | None=None)
Setup named pipes for log streaming.
funcbrowser_use.mcp.client.MCPClient.mcp_action_wrapper(params:param_model) -> ActionResult
Wrapper function that calls the MCP tool.
classbrowser_use.mcp.controller.MCPToolWrapper
Wrapper to integrate MCP tools as browser-use actions.
funcbrowser_use.mcp.controller.register_mcp_tools(registry:Registry, mcp_command:str, mcp_args:list[str] | None=None) -> MCPToolWrapper
Register MCP tools with a browser-use registry.
classbrowser_use.mcp.server.BrowserUseServer
MCP Server for browser-use capabilities.
funcbrowser_use.mcp.server.BrowserUseServer.handle_call_tool(name:str, arguments:dict[str, Any] | None) -> list[types.TextContent | types.ImageContent]
Handle tool execution.
funcbrowser_use.mcp.server.BrowserUseServer.handle_list_tools() -> list[types.Tool]
List all available browser-use tools.
methodbrowser_use.mcp.server.BrowserUseServer.run()
Run the MCP server.
funcbrowser_use.observability.is_debug_mode() -> bool
Check if we're currently in debug mode.
funcbrowser_use.observability.is_lmnr_available() -> bool
Check if lmnr is available for tracing.
funcbrowser_use.sandbox.sandbox.get_terminal_width() -> int
Get terminal width, default to 80 if unable to detect
classbrowser_use.sandbox.views.BrowserCreatedData
Data for browser_created event
classbrowser_use.sandbox.views.ErrorData
Data for error event
classbrowser_use.sandbox.views.ExecutionResponse
Execution result from the executor
classbrowser_use.sandbox.views.LogData
Data for log event
classbrowser_use.sandbox.views.ResultData
Data for result event
classbrowser_use.sandbox.views.SSEEventType
Event types for Server-Sent Events
funcbrowser_use.skills.browser_use.skill_text() -> str
Return the canonical Browser Use skill.
methodbrowser_use.skills.views.Skill.from_skill_response(response:SkillResponse) -> 'Skill'
Create a Skill from SDK SkillResponse
classbrowser_use.sync.auth.CloudAuthConfig
Configuration for cloud authentication
methodbrowser_use.sync.auth.CloudAuthConfig.load_from_file() -> 'CloudAuthConfig'
Load auth config from local file
methodbrowser_use.sync.auth.CloudAuthConfig.save_to_file() -> None
Save auth config to local file
classbrowser_use.sync.auth.DeviceAuthClient
Client for OAuth2 device authorization flow
methodbrowser_use.sync.auth.DeviceAuthClient.api_token() -> str | None
Get the current API token
methodbrowser_use.sync.auth.DeviceAuthClient.authenticate(agent_session_id:str | None=None, show_instructions:bool=True) -> bool
Run the full authentication flow.
methodbrowser_use.sync.auth.DeviceAuthClient.clear_auth() -> None
Clear stored authentication
methodbrowser_use.sync.auth.DeviceAuthClient.get_headers() -> dict
Get headers for API requests
methodbrowser_use.sync.auth.DeviceAuthClient.is_authenticated() -> bool
Check if we have valid authentication
methodbrowser_use.sync.auth.DeviceAuthClient.poll_for_token(device_code:str, interval:float=3.0, timeout:float=1800.0) -> dict | None
Poll for the access token.
methodbrowser_use.sync.auth.DeviceAuthClient.start_device_authorization(agent_session_id:str | None=None) -> dict
Start the device authorization flow.
methodbrowser_use.sync.auth.DeviceAuthClient.user_id() -> str
Get the current user ID (temporary or real)
classbrowser_use.sync.service.CloudSync
Service for syncing events to the Browser Use cloud
methodbrowser_use.sync.service.CloudSync.authenticate(show_instructions:bool=True) -> bool
Authenticate with the cloud service
methodbrowser_use.sync.service.CloudSync.handle_event(event:BaseEvent) -> None
Handle an event by sending it to the cloud
methodbrowser_use.sync.service.CloudSync.set_auth_flow_active() -> None
Mark auth flow as active to allow all events
classbrowser_use.telemetry.service.ProductTelemetry
Service for capturing anonymized telemetry data.
funcbrowser_use.telemetry.service.get_or_create_device_id() -> str
Return the anonymous device id shared by telemetry
classbrowser_use.telemetry.views.MCPClientTelemetryEvent
Telemetry event for MCP client usage
classbrowser_use.telemetry.views.MCPServerTelemetryEvent
Telemetry event for MCP server usage
funcbrowser_use.tokens.openrouter_pricing.get_openrouter_model_metadata(model_name:str, refresh:bool=False) -> dict[str, Any] | None
Fetch metadata for one OpenRouter model id.
funcbrowser_use.tokens.openrouter_pricing.get_openrouter_models_metadata(refresh:bool=False) -> dict[str, dict[str, Any]]
Fetch OpenRouter model metadata keyed by model id.
classbrowser_use.tokens.service.TokenCost
Service for tracking token usage and calculating costs
methodbrowser_use.tokens.service.TokenCost.clear_history() -> None
Clear usage history
methodbrowser_use.tokens.service.TokenCost.ensure_pricing_loaded() -> None
Ensure pricing data is loaded in the background.
methodbrowser_use.tokens.service.TokenCost.get_cost_by_model() -> dict[str, ModelUsageStats]
Get cost breakdown by model
methodbrowser_use.tokens.service.TokenCost.get_model_pricing(model_name:str) -> ModelPricing | None
Get pricing information for a specific model
methodbrowser_use.tokens.service.TokenCost.get_usage_tokens_for_model(model:str) -> ModelUsageTokens
Get usage tokens for a specific model
methodbrowser_use.tokens.service.TokenCost.initialize() -> None
Initialize the service by loading pricing data
methodbrowser_use.tokens.service.TokenCost.refresh_pricing_data() -> None
Force refresh of pricing data from GitHub
classbrowser_use.tokens.views.CachedPricingData
Cached pricing data with timestamp
classbrowser_use.tokens.views.ModelPricing
Pricing information for a model
classbrowser_use.tokens.views.ModelUsageStats
Usage statistics for a single model
classbrowser_use.tokens.views.ModelUsageTokens
Usage tokens for a single model
classbrowser_use.tokens.views.TokenCostCalculated
Token cost
classbrowser_use.tokens.views.TokenUsageEntry
Single token usage entry
classbrowser_use.tokens.views.UsageSummary
Summary of token usage and costs
funcbrowser_use.utils.check_env_variables(keys:list[str], any_or_all=all) -> bool
Check if all required environment variables are set
funcbrowser_use.utils.get_git_info() -> dict[str, str] | None
Get git information if installed from git repository
funcbrowser_use.utils.is_placeholder_url(url:str) -> bool
Return True for mock placeholder hostnames like https://XXX.XX.
funcbrowser_use.utils.match_url_with_domain_pattern(url:str, domain_pattern:str, log_warnings:bool=False) -> bool
Check if a URL matches a domain pattern.
funcbrowser_use.utils.sanitize_surrogates(text:str) -> str
Remove surrogate characters that can't be encoded in UTF-8.

この情報について

掲載しているシグネチャは browser-use/browser-use の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る