> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Website Tools

> WebsiteTools exposes a read_url function to read a website's contents, or an add_website_to_knowledge function when a Knowledge instance is passed in.

**WebsiteTools** enable an Agent to read a website's contents, or to add them to a knowledge base when one is provided.

## Prerequisites

The following example requires the `beautifulsoup4` library.

```shell theme={null}
uv pip install -U beautifulsoup4 openai
```

## Example

The following agent will read the contents of a website.

```python cookbook/91_tools/website_tools.py theme={null}
from agno.agent import Agent
from agno.tools.website import WebsiteTools

agent = Agent(tools=[WebsiteTools()])
agent.print_response("Search web page: 'https://docs.agno.com/introduction'", markdown=True)
```

## Toolkit Params

| Parameter   | Type                  | Default | Description                                                                                                                   |
| ----------- | --------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `knowledge` | `Optional[Knowledge]` | `None`  | The knowledge base to add website contents to. When provided, `add_website_to_knowledge` is registered instead of `read_url`. |

## Toolkit Functions

| Function                   | Description                                                                                                                                                  |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `add_website_to_knowledge` | Adds a website's content to the knowledge base. Registered only when `knowledge` is provided. The website must start with `https://` and be a valid website. |
| `read_url`                 | Reads a URL and returns the contents. Registered when no `knowledge` is provided.                                                                            |

## Developer Resources

* [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/website.py)
