Solution

Add Search Grounding to LangGraph Research Agents

LangGraph agents that rely solely on LLM training data produce hallucinated facts, outdated pricing, and incorrect technical details. The agent cannot distinguish between what it k

The Problem

LangGraph agents that rely solely on LLM training data produce hallucinated facts, outdated pricing, and incorrect technical details. The agent cannot distinguish between what it knows accurately and what it is fabricating.

The Scavio Solution

Add a Scavio search tool to LangGraph that the agent calls when it needs current information. The tool returns structured JSON from Google, Reddit, or YouTube. The agent cites search results in its responses, reducing hallucination.

Before

Before search grounding, a LangGraph research agent answered 'What are the current ClickHouse pricing tiers?' with fabricated tier names and prices from training data. The answer was confidently wrong.

After

After adding search grounding, the same agent searches Google for 'ClickHouse pricing 2026', extracts the current tiers from the results, and cites the source. The answer is accurate and verifiable. 1 search = $0.005.

Who It Is For

LangGraph developers, AI agent builders, and teams building research assistants that need factual grounding beyond LLM training data.

Key Benefits

  • Reduce hallucination on factual questions
  • Multi-platform search: Google, Reddit, YouTube
  • Structured JSON works directly with LangGraph state
  • Agent decides when to search vs use training data
  • 1 search per factual claim at $0.005

Python Example

Python
from langchain_core.tools import tool
import requests, os

@tool
def web_search(query: str, platform: str = 'google') -> list:
    """Search the web for current information."""
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': os.environ['SCAVIO_API_KEY']},
        json={'platform': platform, 'query': query}, timeout=10).json()
    return [{'title': r.get('title', ''), 'snippet': r.get('snippet', ''),
             'url': r.get('link', '')}
            for r in r.get('organic_results', [])[:5]]

# Add to LangGraph agent: tools=[web_search]
results = web_search.invoke({'query': 'ClickHouse pricing 2026'})
print(f'{len(results)} results')

JavaScript Example

JavaScript
// LangGraph tool definition for web search
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function webSearch({query, platform = 'google'}) {
  const r = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST', headers: H,
    body: JSON.stringify({platform, query})
  }).then(r => r.json());
  return (r.organic_results || []).slice(0, 5).map(r => ({
    title: r.title, snippet: r.snippet || '', url: r.link || ''
  }));
}
// Add as tool in LangGraph: tools: [webSearch]
const results = await webSearch({query: 'ClickHouse pricing 2026'});
console.log(`${results.length} results`);

Platforms Used

Google

Web search with knowledge graph, PAA, and AI overviews

Reddit

Community, posts & threaded comments from any subreddit

YouTube

Video search with transcripts and metadata

Frequently Asked Questions

LangGraph agents that rely solely on LLM training data produce hallucinated facts, outdated pricing, and incorrect technical details. The agent cannot distinguish between what it knows accurately and what it is fabricating.

Add a Scavio search tool to LangGraph that the agent calls when it needs current information. The tool returns structured JSON from Google, Reddit, or YouTube. The agent cites search results in its responses, reducing hallucination.

LangGraph developers, AI agent builders, and teams building research assistants that need factual grounding beyond LLM training data.

Yes. Scavio's free tier includes 250 credits per month with no credit card required. That is enough to validate this solution in your workflow.

Add Search Grounding to LangGraph Research Agents

Add a Scavio search tool to LangGraph that the agent calls when it needs current information. The tool returns structured JSON from Google, Reddit, or YouTube. The agent cites sear