BROWSER USE

- Browser Use Agents: give Browser Use a task and receive completed work. API V4 is current for new integrations.
- Browser Infrastructure: connect your agent or automation to managed browsers through SDK, REST, or CDP. Starts at $0.02/browser-hour.
- Developer tools: Open Source, Browser Harness, SDK, and MCP support the two products above.

[Developer Index](https://browser-use.com/index.md)
[Product Map](https://browser-use.com/llms.txt)
[Full Product Context](https://browser-use.com/llms-full.txt)
[Pricing](https://browser-use.com/pricing.md)
[Cloud Docs](https://docs.browser-use.com/cloud/quickstart)
[Open Source Docs](https://docs.browser-use.com/open-source/introduction)

---

# Custom Tools

> Register custom tools that agents can invoke during task execution.

---

### The Idea

Browser Use comes with powerful built-in actions for web automation, but what if you need **domain-specific functionality**? 

The tools template shows you how to extend agent capabilities by registering a custom `save_to_file` tool.


### Requirements

You'll need one API Key:
- **Browser Use**



### Installation


uvx browser-use init --template tools


### Customization

Build your own custom tools by following these steps: 

1. **Create a Tools Registry** - Initialize a `Tools()` instance to manage custom actions
2. **Define Custom Actions** - Use the `@tools.registry.action()` decorator to register functions
3. **Return Action Results** - Provide feedback to the agent with `ActionResult` objects
4. **Pass to Agent** - Integrate your custom tools when initializing the Agent

In the end, this comes down to a few lines of code, like: 

```Python
tools = Tools()
@tools.registry.action('my_function')
async def my_function(filename: str, content: str):
	# Do Something

    return ActionResult(extracted_content="...")

agent = Agent(task=task, llm=llm, tools=tools)
```
