Skip to content

2319 - add tavily component #2469

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
merged 3 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions docs/src/content/docs/reference/components/tavily.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
title: "Tavily"
description: "Tavily is an AI-powered search tool designed to help users quickly find accurate, relevant, and up-to-date information from the web."
---

Tavily is an AI-powered search tool designed to help users quickly find accurate, relevant, and up-to-date information from the web.


Categories: Artificial Intelligence


Type: tavily/v1

<hr />



## Connections

Version: 1


### Bearer Token

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| token | Token | STRING | | true |





<hr />



## Actions


### Search
Name: search

Execute a search query.

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| query | Query | STRING | The search query to execute. | true |
| topic | Topic | STRING <details> <summary> Options </summary> general, news </details> | The category of the search. | false |
| search_depth | Search Depth | STRING <details> <summary> Options </summary> basic, advanced </details> | The depth of the search. | false |
| time_range | Time Range | STRING <details> <summary> Options </summary> day, week, month, year </details> | The time range back from the current date to filter results. | false |
| max_results | Max Results | INTEGER | The maximum number of search results to return. | false |
| include_answer | Include Answer | BOOLEAN <details> <summary> Options </summary> true, false </details> | Include an LLM-generated answer to the provided query. | false |
| include_images | Include Images | BOOLEAN <details> <summary> Options </summary> true, false </details> | Perform an image search and include the results in the response. | false |

#### Example JSON Structure
```json
{
"label" : "Search",
"name" : "search",
"parameters" : {
"query" : "",
"topic" : "",
"search_depth" : "",
"time_range" : "",
"max_results" : 1,
"include_answer" : false,
"include_images" : false
},
"type" : "tavily/v1/search"
}
```

#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| query | STRING | The search query that was executed. |
| answer | STRING | A short answer to the user's query, generated by an LLM. Included in the response only if include_answer is requested. |
| images | ARRAY <details> <summary> Items </summary> [{}] </details> | List of query-related images. |
| results | ARRAY <details> <summary> Items </summary> [{STRING\(title), STRING\(url), STRING\(content), NUMBER\(score)}] </details> | A list of sorted search results, ranked by relevancy. |
| response_time | NUMBER | Time in seconds it took to complete the request. |




#### Output Example
```json
{
"query" : "",
"answer" : "",
"images" : [ { } ],
"results" : [ {
"title" : "",
"url" : "",
"content" : "",
"score" : 0.0
} ],
"response_time" : 0.0
}
```


### Extract
Name: extract

Extract web page content from one or more specified URLs.

#### Properties

| Name | Label | Type | Description | Required |
|:---------------:|:--------------:|:------------:|:-------------------:|:--------:|
| urls | URLs | ARRAY <details> <summary> Items </summary> [STRING] </details> | A list of URLs to extract content from. | true |
| include_images | Include Images | BOOLEAN <details> <summary> Options </summary> true, false </details> | Include a list of images extracted from the URLs in the response. | false |
| extract_depth | Extract Depth | STRING <details> <summary> Options </summary> basic, advanced </details> | The depth of the extraction process. | false |

#### Example JSON Structure
```json
{
"label" : "Extract",
"name" : "extract",
"parameters" : {
"urls" : [ "" ],
"include_images" : false,
"extract_depth" : ""
},
"type" : "tavily/v1/extract"
}
```

#### Output



Type: OBJECT


#### Properties

| Name | Type | Description |
|:------------:|:------------:|:-------------------:|
| results | ARRAY <details> <summary> Items </summary> [{STRING\(url), STRING\(raw_content), [STRING]\(images)}] </details> | A list of extracted content from the provided URLs. |
| failed_results | ARRAY <details> <summary> Items </summary> [{STRING\(url), STRING\(error)}] </details> | A list of URLs that could not be processed. |
| response_time | NUMBER | Time in seconds it took to complete the request. |




#### Output Example
```json
{
"results" : [ {
"url" : "",
"raw_content" : "",
"images" : [ "" ]
} ],
"failed_results" : [ {
"url" : "",
"error" : ""
} ],
"response_time" : 0.0
}
```




1 change: 1 addition & 0 deletions server/apps/server-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ implementation(project(":server:libs:modules:components:bolna"))
implementation(project(":server:libs:modules:components:spotify"))
implementation(project(":server:libs:modules:components:stripe"))
implementation(project(":server:libs:modules:components:supabase"))
implementation(project(":server:libs:modules:components:tavily"))
implementation(project(":server:libs:modules:components:teamwork"))
implementation(project(":server:libs:modules:components:text-helper"))
implementation(project(":server:libs:modules:components:todoist"))
Expand Down
1 change: 1 addition & 0 deletions server/ee/apps/worker-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ implementation(project(":server:libs:modules:components:graphql-client"))
implementation(project(":server:libs:modules:components:spotify"))
implementation(project(":server:libs:modules:components:stripe"))
implementation(project(":server:libs:modules:components:supabase"))
implementation(project(":server:libs:modules:components:tavily"))
implementation(project(":server:libs:modules:components:teamwork"))
implementation(project(":server:libs:modules:components:text-helper"))
implementation(project(":server:libs:modules:components:todoist"))
Expand Down
162 changes: 162 additions & 0 deletions server/libs/modules/components/tavily/openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
---
openapi: "3.0.1"
info:
title: "Tavily"
description: "Tavily is an AI-powered search tool designed to help users quickly find accurate, relevant, and up-to-date information from the web."
version: "v1"
servers:
- url: "https://api.tavily.com"
paths:
/search:
post:
summary: "Search"
description: "Execute a search query."
operationId: "search"
x-ai-agent-tool: true
requestBody:
content:
application/json:
schema:
type: "object"
required:
- "query"
properties:
query:
type: "string"
description: "The search query to execute."
topic:
type: "string"
description: "The category of the search."
default: "general"
search_depth:
type: "string"
description: "The depth of the search."
default: "basic"
time_range:
type: "string"
description: "The time range back from the current date to filter results."
max_results:
type: "integer"
description: "The maximum number of search results to return."
default: "5"
include_answer:
type: "boolean"
description: "Include an LLM-generated answer to the provided query."
default: "false"
include_images:
type: "boolean"
description: "Perform an image search and include the results in the response."
default: "false"
responses:
200:
description: "Successful operation."
content:
application/json:
schema:
type: "object"
properties:
query:
type: "string"
description: "The search query that was executed."
answer:
type: "string"
description: "A short answer to the user's query, generated by an LLM. Included in the response only if include_answer is requested."
images:
type: "array"
description: "List of query-related images."
items:
type: "object"
results:
type: "array"
description: "A list of sorted search results, ranked by relevancy."
items:
type: "object"
properties:
title:
type: "string"
description: "The title of the search result."
url:
type: "string"
description: "The URL of the search result."
content:
type: "string"
description: "A short description of the search result."
score:
type: "number"
description: "The relevance score of the search result."
response_time:
type: "number"
description: "Time in seconds it took to complete the request."
/extract:
post:
summary: "Extract"
description: "Extract web page content from one or more specified URLs."
operationId: "extract"
x-ai-agent-tool: true
requestBody:
content:
application/json:
schema:
type: "object"
required:
- "urls"
properties:
urls:
type: "array"
description: "A list of URLs to extract content from."
title: "URLs"
items:
type: "string"
include_images:
type: "boolean"
description: "Include a list of images extracted from the URLs in the response."
default: "false"
extract_depth:
type: "string"
description: "The depth of the extraction process."
default: "basic"
responses:
200:
description: "Successful operation."
content:
application/json:
schema:
type: "object"
properties:
results:
type: "array"
description: "A list of extracted content from the provided URLs."
items:
type: "object"
properties:
url:
type: "string"
description: "The URL from which the content was extracted."
raw_content:
type: "string"
description: "The full content extracted from the page."
images:
type: "array"
description: "This is only available if include_images is set to true. A list of image URLs extracted from the page."
items:
type: "string"
failed_results:
type: "array"
description: "A list of URLs that could not be processed."
items:
type: "object"
properties:
url:
type: "string"
description: "The URL that failed to be processed."
error:
type: "string"
description: "An error message describing why the URL couldn't be processed."
response_time:
type: "number"
description: "Time in seconds it took to complete the request."
components:
securitySchemes:
bearerAuth:
scheme: "bearer"
type: "http"
Loading
Loading