Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ejirocodes avatar

Exa Rag

  • 109 installs
  • 5 repo stars
  • Updated June 25, 2026
  • ejirocodes/agent-skills

Build RAG pipelines with Exa.ai real-time web retrieval, integrating with LangChain, LlamaIndex, Vercel AI SDK, or Claude MCP tool calling.

About

Shows how to wire Exa.ai web search into retrieval-augmented generation across LangChain, LlamaIndex, Vercel AI SDK, and OpenAI-compatible or MCP tool calls. A developer uses it when adding grounded, cited web search to an AI agent or chat app.

  • Framework-specific retrievers: ExaSearchRetriever, ExaReader, Vercel AI SDK tools
  • Guidance on highlights, summaries, and source attribution for grounded RAG

Exa Rag by the numbers

  • 109 all-time installs (skills.sh)
  • Ranked #4,092 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Jul 24, 2026 (Skillselion catalog sync)
npx skills add https://github.com/ejirocodes/agent-skills --skill exa-rag

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs109
repo stars5
Last updatedJune 25, 2026
Repositoryejirocodes/agent-skills

What it does

Build RAG pipelines with Exa.ai real-time web retrieval, integrating with LangChain, LlamaIndex, Vercel AI SDK, or Claude MCP tool calling.

Files

SKILL.mdMarkdownGitHub ↗

Exa RAG Integration

Quick Reference

TopicWhen to UseReference
LangChainBuilding RAG chains with LangChainlangchain.md
LlamaIndexUsing Exa as a LlamaIndex data sourcellamaindex.md
Vercel AI SDKAdding web search to Next.js AI appsvercel-ai.md
MCP & ToolsClaude MCP server, OpenAI tools, function callingmcp-tools.md

Essential Patterns

LangChain Retriever

from langchain_exa import ExaSearchRetriever

retriever = ExaSearchRetriever(
    exa_api_key="your-key",
    k=5,
    highlights=True
)

docs = retriever.invoke("latest AI research papers")

LlamaIndex Reader

from llama_index.readers.web import ExaReader

reader = ExaReader(api_key="your-key")
documents = reader.load_data(
    query="machine learning best practices",
    num_results=10
)

Vercel AI SDK Tool

import { exa } from "@agentic/exa";
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";

const result = await generateText({
  model: openai("gpt-4"),
  tools: { search: exa.searchAndContents },
  prompt: "Search for the latest TypeScript features",
});

OpenAI-Compatible Endpoint

from openai import OpenAI

client = OpenAI(
    base_url="https://api.exa.ai/v1",
    api_key="your-exa-key"
)

response = client.chat.completions.create(
    model="exa",
    messages=[{"role": "user", "content": "What are the latest AI trends?"}]
)

Integration Selection

FrameworkBest ForKey Feature
LangChainComplex chains, agentsExaSearchRetriever, tool integration
LlamaIndexDocument indexing, Q&AExaReader, query engines
Vercel AI SDKNext.js apps, streamingTool definitions, edge-ready
OpenAI CompatDrop-in replacementMinimal code changes
Claude MCPClaude Desktop, Claude CodeNative tool calling

Common Mistakes

1. Not using highlights for RAG - Full text wastes context; use highlights=True for relevant snippets 2. Missing source attribution - Always include result.url in citations for grounded responses 3. Ignoring summaries - summary=True provides concise context without full page overhead 4. Over-fetching results - Start with 3-5 results; more isn't always better for RAG quality 5. Not filtering domains - Use include_domains to limit to authoritative sources 6. Skipping date filters - For current events, always add start_published_date to avoid stale info 7. Forgetting async patterns - Use async retrievers in production for better throughput

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.