---
name: bijection-tavily
description: "Evaluate and integrate the Tavily component with Bijection."
---

# Tavily

Tavily web search and content extraction for Bijection applications

- Package: @bijectionhq/tavily
- Category: AI & Agents
- Status: Preview
- License: Apache-2.0
- Bijection source (repository access required): https://github.com/bijectionhq/tavily/tree/09a5a5feeb54da1dc1d1534a275cfaa93e32644e
- Upstream: https://github.com/tavily-ai/convex-tavily/tree/e910659f7f7bf78fa758cb5d6a3305d268b3494a
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/tavily

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/tavily.git
cd tavily
git checkout 09a5a5feeb54da1dc1d1534a275cfaa93e32644e
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This is a source candidate for evaluation. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes @tavily/convex-tavily. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


> Agents: read this skill fully before writing code that uses Tavily. Follow the installation and configuration steps exactly.

# Tavily

## Instructions

Use Tavily to add tavily web search and content extraction to convex apps via a stateless component that keeps your api key in typed environment config. This Convex component integrates directly with your backend.

### Installation

```bash
npm install @tavily/convex-tavily
```

Current npm version: `@tavily/convex-tavily@0.1.0`

### Capabilities

- Query the live web from Convex actions using a typed TavilyClient with basic or advanced search depth and configurable result filters
- Extract and chunk content from up to 20 URLs in a single call, with optional query-focused chunks and markdown output for RAG pipelines
- Store TAVILY_API_KEY in Convex environment configuration rather than app code, scoped to the isolated component
- Wrap TavilyClient calls in your own application actions to layer on authentication, authorization, and rate limiting without modifying the component

## Examples

### how to search the web from a Convex action

The @tavily/convex-tavily component exposes a TavilyClient that you instantiate with components.tavily and call from your own Convex action. The tavily.search method accepts a query string plus options like searchDepth, maxResults, timeRange, and includeFavicon, then delegates the HTTP call to the component action so your API key never touches application code.

### extract webpage content for RAG in Convex

The tavily.extract method accepts an array of up to 20 URLs and an optional query string, returning chunked content per source in markdown format. Setting chunksPerSource alongside the query enables query-focused extraction, making it straightforward to feed retrieved content into an embedding or LLM pipeline hosted in Convex.

### how to give an AI agent real-time web access in Convex

Install @tavily/convex-tavily, wire it into convex.config.ts, and call tavily.search from an action that your agent invokes. The component is stateless and owns no database tables, so it adds no schema overhead while giving the agent access to live search results and extracted page content.

### store third party API key securely in Convex component

The convex-tavily component uses typed Convex environment configuration to hold TAVILY_API_KEY. You set it with npx convex env set TAVILY_API_KEY and pass it to the component via app.env in convex.config.ts, keeping the key scoped to the component rather than exposed in application environment variables.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by Tavily is not needed

## Troubleshooting

**What Tavily API methods does @tavily/convex-tavily expose?**

The @tavily/convex-tavily component currently exposes two methods on TavilyClient: search, which supports basic and advanced depth, timeRange, images, favicon, and usage options; and extract, which accepts up to 20 URLs with optional query-focused chunking, image extraction, format selection, and a timeout parameter.

**Does @tavily/convex-tavily create any database tables in my Convex deployment?**

No. The @tavily/convex-tavily component is entirely stateless and owns no database tables. It acts as a typed proxy between your application actions and the Tavily HTTP API, adding no schema overhead to your deployment.

**How does the request flow work between my Convex app and Tavily?**

Your application action calls TavilyClient.search or TavilyClient.extract, which uses ctx.runAction to invoke the component action inside the isolated component. The component action then makes a POST request to api.tavily.com/search or /extract. Your app code never calls the Tavily API directly.

**Can I add authentication or rate limiting to the Tavily integration?**

Yes. The recommended pattern is to keep TavilyClient calls inside your own application-owned Convex actions rather than exposing the component directly. This gives you a single place to add authentication checks, authorization logic, and rate limiting before the search or extract call reaches the component.

**How do I configure the Tavily API key in a Convex project?**

In convex.config.ts, declare TAVILY_API_KEY as a typed environment variable using v.string(), then pass it to the component via app.env when calling app.use(tavily, ...). Set the actual key value by running npx convex env set TAVILY_API_KEY tvly-your-key from your project root.

## Resources

- [npm package](https://www.npmjs.com/package/%40tavily%2Fconvex-tavily)
- [GitHub repository](https://github.com/tavily-ai/convex-tavily)
- [Live demo](https://github.com/tavily-ai/convex-tavily/tree/main/example)
- [Convex Components Directory](https://www.convex.dev/components/tavily/convex-tavily)
- [Convex documentation](https://docs.convex.dev)