Skip to content

Quick start

This page starts once the plugin is installed and the default alias is signed in; installation has both steps. One account needs no option at all.

1. Ask for status

Ask the agent to call tools.tavily.status. It names the version, the OpenCode host, every alias with its state and one next step. It spends nothing.

Ask the agent to search, or call Tavily's tool yourself:

await tools.tavily.tavily_search({ query: "OpenCode plugin API 2.4", max_results: 5 })

tools.tavily.tavily_search is the Code Mode call. The direct tool is tavily_tavily_search. Tavily's own parameters are the contract: the plugin does not wrap the tool and copies no schema. Set search_depth: "basic" unless a basic search missed, because advanced search costs twice as much.

3. Read a page

tavily_extract reads one URL or several, including script-heavy pages and PDFs. Add query to keep only the passages that match it.

await tools.tavily.tavily_extract({ urls: ["https://opencode.ai/docs/plugins/"] })

For a URL you already have, OpenCode's own webfetch is free: try it first, and use tavily_extract when it fails, when there are several URLs, or when a long page needs narrowing with query.

4. Map or crawl a site

tavily_map lists a site's URLs without reading them. tavily_crawl reads the pages, so set limit: by default it reads up to 50.

await tools.tavily.tavily_map({ url: "https://opencode.ai", limit: 20, select_paths: ["/docs/.*"] })

5. Run research

tavily_research writes a cited report from many sources. It takes minutes, shows no progress until it ends, and costs 4 to 250 credits. Propose the scope and the cost to the person first, and start only after they agree; the tavily-research skill has the whole recipe. One fact is one basic search, not a research task.

Where the account goes

The alias is in the tool name: tavily_tavily_search for default, tavily-work_tavily_search for work, or tools["tavily-work"].tavily_search in Code Mode. A Tavily tool has no account field. Only probe takes one.

Several accounts

Add a profile for each alias in the plugin's entry in opencode.json; a profile is empty, because the alias is the whole setting:

{
  "plugins": [
    {
      "package": "github:we-the-rebel-alliance/tavily-plugin#v0.0.8",
      "options": {
        "accounts": { "work": {}, "personal": {} }
      }
    }
  ]
}

Each alias gets its own server and its own sign-in. Accounts has the rest.

Next