mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-01 13:18:10 +00:00
Added docs for TavilyGetResearch (#5707)
* Add Tavily Research and get Research - Added tavily research with docs to crew AI - Added tavily get research with docs to crew AI * Update `tavily-python` installation instructions and adjust version constraints - Changed installation command from `pip install` to `uv add` for `tavily-python` in multiple documentation files. - Updated version constraint for `tavily-python` in `pyproject.toml` from `>=0.7.14` to `~=0.7.14`. - Modified the `exclude-newer` date in `uv.lock` to `2026-04-23T07:00:00Z`. * Add Tavily Research Tool documentation in multiple languages - Introduced `TavilyResearchTool` documentation in English, Arabic, Korean, and Portuguese. - Updated `docs.json` to include paths for the new documentation files. - The `TavilyResearchTool` allows CrewAI agents to perform multi-step research tasks and generate cited reports using the Tavily Research API. * Fix Tavily research CI failures * added getResearchTool docs - Added docs for getResearchTool --------- Co-authored-by: lorenzejay <lorenzejaytech@gmail.com> Co-authored-by: Evan Rimer <evan.rimer@tavily.com> Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
This commit is contained in:
@@ -1216,6 +1216,8 @@
|
||||
"en/tools/search-research/youtubevideosearchtool",
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -1698,6 +1700,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -2181,6 +2184,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -2664,6 +2668,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -3147,6 +3152,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -3629,6 +3635,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -4110,6 +4117,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -4591,6 +4599,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -5072,6 +5081,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -5555,6 +5565,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
@@ -6037,6 +6048,7 @@
|
||||
"en/tools/search-research/tavilysearchtool",
|
||||
"en/tools/search-research/tavilyextractortool",
|
||||
"en/tools/search-research/tavilyresearchtool",
|
||||
"en/tools/search-research/tavilygetresearchtool",
|
||||
"en/tools/search-research/arxivpapertool",
|
||||
"en/tools/search-research/serpapi-googlesearchtool",
|
||||
"en/tools/search-research/serpapi-googleshoppingtool",
|
||||
|
||||
@@ -54,6 +54,14 @@ These tools enable your agents to search the web, research topics, and find info
|
||||
Extract structured content from web pages using the Tavily API.
|
||||
</Card>
|
||||
|
||||
<Card title="Tavily Research Tool" icon="flask" href="/en/tools/search-research/tavilyresearchtool">
|
||||
Run multi-step research tasks and get cited reports using the Tavily Research API.
|
||||
</Card>
|
||||
|
||||
<Card title="Tavily Get Research Tool" icon="clipboard-list" href="/en/tools/search-research/tavilygetresearchtool">
|
||||
Retrieve the status and results of an existing Tavily research task.
|
||||
</Card>
|
||||
|
||||
<Card title="Arxiv Paper Tool" icon="box-archive" href="/en/tools/search-research/arxivpapertool">
|
||||
Search arXiv and optionally download PDFs.
|
||||
</Card>
|
||||
@@ -76,7 +84,15 @@ These tools enable your agents to search the web, research topics, and find info
|
||||
- **Academic Research**: Find scholarly articles and technical papers
|
||||
|
||||
```python
|
||||
from crewai_tools import SerperDevTool, GitHubSearchTool, YoutubeVideoSearchTool, TavilySearchTool, TavilyExtractorTool
|
||||
from crewai_tools import (
|
||||
GitHubSearchTool,
|
||||
SerperDevTool,
|
||||
TavilyExtractorTool,
|
||||
TavilyGetResearchTool,
|
||||
TavilyResearchTool,
|
||||
TavilySearchTool,
|
||||
YoutubeVideoSearchTool,
|
||||
)
|
||||
|
||||
# Create research tools
|
||||
web_search = SerperDevTool()
|
||||
@@ -84,11 +100,21 @@ code_search = GitHubSearchTool()
|
||||
video_research = YoutubeVideoSearchTool()
|
||||
tavily_search = TavilySearchTool()
|
||||
content_extractor = TavilyExtractorTool()
|
||||
tavily_research = TavilyResearchTool()
|
||||
tavily_get_research = TavilyGetResearchTool()
|
||||
|
||||
# Add to your agent
|
||||
agent = Agent(
|
||||
role="Research Analyst",
|
||||
tools=[web_search, code_search, video_research, tavily_search, content_extractor],
|
||||
tools=[
|
||||
web_search,
|
||||
code_search,
|
||||
video_research,
|
||||
tavily_search,
|
||||
content_extractor,
|
||||
tavily_research,
|
||||
tavily_get_research,
|
||||
],
|
||||
goal="Gather comprehensive information on any topic"
|
||||
)
|
||||
```
|
||||
|
||||
85
docs/en/tools/search-research/tavilygetresearchtool.mdx
Normal file
85
docs/en/tools/search-research/tavilygetresearchtool.mdx
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
title: "Tavily Get Research Tool"
|
||||
description: "Retrieve the status and results of an existing Tavily research task"
|
||||
icon: "clipboard-list"
|
||||
mode: "wide"
|
||||
---
|
||||
|
||||
The `TavilyGetResearchTool` lets CrewAI agents check an existing Tavily research task by `request_id`. Use it when a research task was started earlier and you need to retrieve its current status or final results.
|
||||
|
||||
If you need to start a new research job, use the [Tavily Research Tool](/en/tools/search-research/tavilyresearchtool). This tool is specifically for looking up an existing Tavily research request after you already have its `request_id`.
|
||||
|
||||
## Installation
|
||||
|
||||
To use the `TavilyGetResearchTool`, install the `tavily-python` library alongside `crewai-tools`:
|
||||
|
||||
```shell
|
||||
uv add 'crewai[tools]' tavily-python
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Set your Tavily API key:
|
||||
|
||||
```bash
|
||||
export TAVILY_API_KEY='your_tavily_api_key'
|
||||
```
|
||||
|
||||
Get an API key at [https://app.tavily.com/](https://app.tavily.com/) (sign up, then create a key).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```python
|
||||
from crewai_tools import TavilyGetResearchTool
|
||||
|
||||
tavily_get_research_tool = TavilyGetResearchTool()
|
||||
|
||||
status_result = tavily_get_research_tool.run(
|
||||
request_id="your-research-request-id"
|
||||
)
|
||||
|
||||
print(status_result)
|
||||
```
|
||||
|
||||
## Common Workflow
|
||||
|
||||
Use `TavilyGetResearchTool` when your application or another service has already created a Tavily research task and saved its `request_id`.
|
||||
|
||||
Typical cases include:
|
||||
|
||||
- Polling for completion after kicking off research in a background job.
|
||||
- Looking up the latest status of a long-running research task.
|
||||
- Fetching final research output from a previously created Tavily request.
|
||||
|
||||
## Configuration Options
|
||||
|
||||
The `TavilyGetResearchTool` accepts the following argument when calling the `run` method:
|
||||
|
||||
- `request_id` (str): **Required.** The existing Tavily research request ID to retrieve.
|
||||
|
||||
## Async Usage
|
||||
|
||||
Use `_arun` when your application is already running inside an async event loop:
|
||||
|
||||
```python
|
||||
from crewai_tools import TavilyGetResearchTool
|
||||
|
||||
tavily_get_research_tool = TavilyGetResearchTool()
|
||||
|
||||
status_result = await tavily_get_research_tool._arun(
|
||||
request_id="your-research-request-id"
|
||||
)
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- **Research status retrieval**: Fetch the current status of an existing Tavily research task.
|
||||
- **Result retrieval**: Return available research output once Tavily has completed the task.
|
||||
- **Sync and async**: Use either `_run`/`run` or `_arun` depending on your application's runtime.
|
||||
- **JSON output**: Returns Tavily responses as formatted JSON strings.
|
||||
|
||||
## Response Format
|
||||
|
||||
The tool returns a JSON string containing the current research task status and any available results from Tavily. The exact response shape depends on the task state returned by Tavily, so incomplete tasks may return status information before the final research output is available.
|
||||
|
||||
Refer to the [Tavily API documentation](https://docs.tavily.com/) for full details on the Research API.
|
||||
Reference in New Issue
Block a user