-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Added docs for TavilyGetResearch #5707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lorenzejay
merged 11 commits into
crewAIInc:main
from
manisrinivasan2k1:feat/add-tavily-research
May 12, 2026
+125
−2
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d153295
Add Tavily Research and get Research
manisrinivasan2k1 a96e8bf
Merge branch 'main' of github.com:crewAIInc/crewAI into feat/add-tavi…
lorenzejay 24cca8a
Update `tavily-python` installation instructions and adjust version c…
lorenzejay e59e75c
Add Tavily Research Tool documentation in multiple languages
lorenzejay 9035908
Fix Tavily research CI failures
evanYDL b18e59b
Merge branch 'main' into feat/add-tavily-research
lorenzejay cdac739
Merge branch 'main' of github.com:crewAIInc/crewAI into feat/add-tavi…
lorenzejay e470727
added getResearchTool docs
manisrinivasan2k1 1c898ce
Merge remote-tracking branch 'upstream/main' into feat/add-tavily-res…
manisrinivasan2k1 19d8308
Merge branch 'main' into feat/add-tavily-research
manisrinivasan2k1 e54e2a8
Merge branch 'main' into feat/add-tavily-research
lorenzejay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
|
manisrinivasan2k1 marked this conversation as resolved.
|
||
| - **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. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.