> For the complete documentation index, see [llms.txt](https://docs.projectbit.ca/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.projectbit.ca/documentation/tools/website.md).

# Website

**WebsiteTools** enable an Agent to parse a website and add its contents to the knowledge base.

### [​](https://docs.phidata.com/tools/website#prerequisites)Prerequisites <a href="#prerequisites" id="prerequisites"></a>

The following example requires the `beautifulsoup4` library.

```shell
pip install -U beautifulsoup4
```

### [​](https://docs.phidata.com/tools/website#example)Example <a href="#example" id="example"></a>

The following agent will read the contents of a website and add it to the knowledge base.

cookbook/tools/website\_tools.py

```python
from bitca.agent import Agent
from bitca.tools.website import WebsiteTools

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

### [​](https://docs.phidata.com/tools/website#toolkit-params)Toolkit Params <a href="#toolkit-params" id="toolkit-params"></a>

| Parameter        | Type                   | Default | Description                                                                                                            |
| ---------------- | ---------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| `knowledge_base` | `WebsiteKnowledgeBase` | -       | The knowledge base associated with the website, containing various data and resources linked to the website’s content. |

### [​](https://docs.phidata.com/tools/website#toolkit-functions)Toolkit Functions <a href="#toolkit-functions" id="toolkit-functions"></a>

| Function                        | Description                                                                                                                                                                                                          |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `add_website_to_knowledge_base` | This function adds a website’s content to the knowledge base. **NOTE:** The website must start with `https://` and should be a valid website. Use this function to get information about products from the internet. |
| `read_url`                      | This function reads a URL and returns the contents.                                                                                                                                                                  |
