Skip to main content
Give OpenCode, the open-source terminal coding agent, live web search, extraction, crawling, and research through the official opencode-tavily plugin. The plugin drives the Tavily CLI.
1

Install the Tavily CLI

Or install it with Python: uv tool install tavily-cli or pip install tavily-cli.
2

Sign in to Tavily

This opens Tavily’s sign-in in your browser. Alternatively, set an API key from the Tavily dashboard:
If TAVILY_API_KEY is set in your environment, the plugin passes it through to shell commands.
3

Add the plugin

Add opencode-tavily to the plugin array in your opencode.json:
OpenCode installs npm plugins automatically on next launch.
Or via npm:
4

Try it

Start OpenCode and ask a current-events question:
The agent should run tvly search and return grounded results with sources.

What the plugin adds

The plugin registers the Tavily skill, so the agent can use these CLI commands:
All output is written to a .tavily/ directory to avoid flooding the agent’s context.

Example prompts

Troubleshooting

If the agent cannot access the web or Tavily commands fail, check these in order:
  1. Is the plugin listed in opencode.json?
  2. Is the Tavily CLI installed and authenticated?

Learn more