LangChain

Web search for a LangChain agent

LangChain's Tavily tool sends Tavily's request shape. Gyaansetu answers that same shape, so the agent keeps its tools, its prompts and its output parser — only the base URL changes.

By signing in you agree to the Terms and Privacy Policy.

Read the API reference

Set it up

  1. 1

    Make an API key

    Sign in with Google at the dashboard and create a key. 1,000 Credits a month are free, and no card is needed.

  2. 2

    Point the client at Gyaansetu

    Keep the Tavily client or LangChain's Tavily tool, and set the base URL to https://web-search.gyaansetu.com with your Gyaansetu key.

  3. 3

    Read the scores, not just the text

    Each result carries content (the passages) and score (0 to 1). A filter on score is usually better than a longer prompt.

Python

from tavily import TavilyClient

client = TavilyClient(api_key="***")
client._api_base_url = "https://web-search.gyaansetu.com"   # the only change

results = client.search(
    "what changed in the EU AI Act this year",
    search_depth="advanced",
    max_results=5,
)

for r in results["results"]:
    print(round(r["score"], 3), r["url"])
    print(r["content"][:200])

The JavaScript SDK takes the same change. LangChain's Tavily tool wraps this client, so the agent's tool definition stays as it is.

Questions people actually ask

Try it before you decide

By signing in you agree to the Terms and Privacy Policy.

Open the dashboard