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

# tavily

[Tavily](https://www.tavily.com/) is an AI-powered search API designed specifically for LLM applications. It provides reliable, real-time information retrieval capabilities with features optimized for AI use cases, including semantic search, content extraction, and structured data retrieval.

With Tavily, you can:

* **Perform contextual searches**: Get relevant results based on semantic understanding rather than just keyword matching
* **Extract structured content**: Pull specific information from web pages in a clean, usable format
* **Access real-time information**: Retrieve up-to-date data from across the web
* **Process multiple URLs simultaneously**: Extract content from several web pages in a single request
* **Receive AI-optimized results**: Get search results specifically formatted for consumption by AI systems

The Agent Forge **Tavily integration** enables your agents to search the web and extract up-to-date information as part of their workflows.

This allows for sophisticated automations where agents can formulate queries, retrieve relevant results, and extract content from specific web pages to inform their decision-making.

By connecting Agent Forge with Tavily, the integration bridges the gap between workflow automation and the vast knowledge of the web, allowing agents to access real-time information, stay current, provide accurate responses, and deliver more value to users without manual intervention.

### Usage Instructions

Access Tavily's AI-powered search engine to find relevant information from across the web. Extract and process content from specific URLs with customizable depth options.

### Where to Get Your Tavily API Key

To get your Tavily API key, you need to access your account dashboard on the Tavily website.

Here is the simple, step-by-step process:

1. **Go to the Tavily Website and Sign Up:** Navigate to [**https://tavily.com/**](https://tavily.com/) and create an account if you don't have one already.
2. **Log In to Your Dashboard:** After signing in, you will be automatically redirected to your user dashboard.
3. **Find Your API Key Section:** On the dashboard page, look for a section specifically dedicated to **API Keys** (it might be in a sidebar or a prominent card).
4. **Copy and Store the Key:** Click to reveal and **copy your API key**.

### Tools

#### `tavily_search`

Perform AI-powered web searches using Tavily

**Input**

| Parameter     | Type   | Required | Description                      |
| ------------- | ------ | -------- | -------------------------------- |
| `query`       | string | Yes      | The search query to execute      |
| `max_results` | number | No       | Maximum number of results (1-20) |
| `apiKey`      | string | Yes      | Tavily API Key                   |

**Output**

| Parameter | Type   | Description         |
| --------- | ------ | ------------------- |
| `results` | json   | Search results data |
| `answer`  | any    | Search answer       |
| `query`   | string | Query used          |
| `content` | string | Extracted content   |
| `title`   | string | Page title          |
| `url`     | string | Source URL          |

#### `tavily_extract`

Extract raw content from multiple web pages simultaneously using Tavily

**Input**

| Parameter       | Type   | Required | Description                                                                |
| --------------- | ------ | -------- | -------------------------------------------------------------------------- |
| `urls`          | string | Yes      | URL or array of URLs to extract content from                               |
| `extract_depth` | string | No       | The depth of extraction (basic=1 credit/5 URLs, advanced=2 credits/5 URLs) |
| `apiKey`        | string | Yes      | Tavily API Key                                                             |

**Output**

| Parameter | Type   | Description         |
| --------- | ------ | ------------------- |
| `results` | json   | Search results data |
| `answer`  | any    | Search answer       |
| `query`   | string | Query used          |
| `content` | string | Extracted content   |
| `title`   | string | Page title          |
| `url`     | string | Source URL          |

### Notes

* Category: `tools`
* Type: `tavily`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://whitepaper.aitech.io/agentforge/tools/tavily.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
