Files
browser-use/docs/customize/tools-basic.mdx
Magnus Müller 9f272fab9a Enhance tool documentation with new examples and clarify action registration process
- Added new tools: "get 2fa code" and "send emails" to the basic tools section.
- Updated action registration instructions to simplify usage of the `@controller.action` decorator.
- Clarified return types for tools, allowing both `ActionResult` and simple strings.
- Improved examples for success and error responses, emphasizing the use of `ActionResult` properties.
2025-08-26 08:01:02 -07:00

41 lines
756 B
Plaintext

---
title: "Basics"
description: ""
icon: "play"
mode: "wide"
---
You can add custom tools to our [default tools](https://github.com/browser-use/browser-use/blob/main/browser_use/controller/service.py).
Examples:
- deterministic clicks
- file handling
- calling APIs
- human-in-the-loop
- browser interactions
- calling other LLMs
- get 2fa code
- send emails
...
## Quick Example
```python
from browser_use import Controller, ActionResult
controller = Controller()
@controller.action('Ask human for help with a question')
def ask_human(question: str) -> ActionResult:
answer = input(f'{question} > ')
return f'The human responded with: {answer}'
agent = Agent(
task='Ask human for help',
llm=llm,
controller=controller,
)
```