mirror of
https://github.com/browser-use/browser-use
synced 2026-05-06 17:52:15 +02:00
32 lines
632 B
Plaintext
32 lines
632 B
Plaintext
---
|
|
title: "Basics"
|
|
description: "Tools are the functions that the agent has to interact with the world."
|
|
icon: "play"
|
|
mode: "wide"
|
|
---
|
|
|
|
|
|
## Quick Example
|
|
|
|
|
|
```python
|
|
from browser_use import Tools, ActionResult, Browser
|
|
|
|
tools = Tools()
|
|
|
|
@tools.action('Ask human for help with a question')
|
|
def ask_human(question: str, browser: Browser) -> ActionResult:
|
|
answer = input(f'{question} > ')
|
|
return f'The human responded with: {answer}'
|
|
|
|
agent = Agent(
|
|
task='Ask human for help',
|
|
llm=llm,
|
|
tools=tools,
|
|
)
|
|
```
|
|
|
|
<Note>
|
|
Use `browser` parameter in tools for deterministic [Actor](/customize/actor/basics) actions.
|
|
</Note>
|