Skip to main content

Documentation Index

Fetch the complete documentation index at: https://browseruse-0aece648-mintlify-cli-docs-1773354647.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Quick Example

from browser_use import Agent, Tools, ActionResult, BrowserSession

tools = Tools()

@tools.action('Ask human for help with a question')
async def ask_human(question: str, browser_session: BrowserSession) -> ActionResult:
    answer = input(f'{question} > ')
    return ActionResult(extracted_content=f'The human responded with: {answer}')

agent = Agent(
    task='Ask human for help',
    llm=llm,
    tools=tools,
)
Important: The parameter must be named exactly browser_session with type BrowserSession (not browser: Browser). The agent injects parameters by name matching, so using the wrong name will cause your tool to fail silently.
Use browser_session parameter in tools for deterministic Actor actions.