langchain-exa
БесплатноБез исполняемых скриптовНе проверенLangChain Exa integration — semantic web search with ExaSearchRetriever (RAG), ExaSearchResults (agent tool), and ExaFindSimilarResults (find similar URLs)…
от enuno★ 17 звёзд на GitHubОб этом скилле
LangChain Exa Skill
Expert assistance for langchain-exa: Exa's neural/semantic web search as a LangChain retriever and agent tools.
Install: pip install -U langchain-exa
Setup: export EXA_API_KEY=your_api_key
API: https://exa.ai
Reference: references/api.md (500 KB — full API reference).
When to Use This Skill
Activate when:
- Semantic web search for RAG — using
ExaSearchRetrieverto retrieve live web results as documents - Search as an agent tool — using
ExaSearchResultsfor tool-calling in a ReAct agent - Finding similar content — using
ExaFindSimilarResultsto find pages similar to a URL - Getting per-result summaries — setting
summary=Truefor LLM-generated page summaries - Getting highlighted excerpts — setting
highlights=Truefor relevant snippets from each page - Real-time crawling — setting
livecrawl="always"to bypass index and crawl live - LLM query rewriting — setting
use_autoprompt=Truefor Exa to optimize the query - Filtering by domain — using
include_domainsorexclude_domains - Filtering by date — using
start_published_date,end_published_date,start_crawl_date,end_crawl_date - Choosing search type — setting
type="neural","keyword", or"auto"
Quick Reference
ExaSearchRetriever — semantic search for RAG
from langchain_exa import ExaSearchRetriever
retriever = ExaSearchRetriever(
k=5, # number of results
# exa_api_key="...", # or set EXA_API_KEY env var
use_autoprompt=True, # Exa rewrites query for better results
type="neural", # "neural" | "keyword" | "auto"
highlights=True, # include relevant excerpts
summary=True, # include LLM-generated page summary
livecrawl="always", # "always" | "fallback" | "never"
)
docs = retriever.invoke("How does LangGraph handle state persistence?")
for doc in docs:
print(doc.page_content[:300])
print(doc.metadata) # url, title, score, published_date, highlights, summary
Filter by domain and date
from langchain_exa import ExaSearchRetriever
retriever = ExaSearchRetriever(
k=3,
include_domains=["arxiv.org", "github.com"], # only these domains
# exclude_domains=["reddit.com"], # block these domains
start_published_date="2024-01-01", # ISO date
end_published_date="2026-01-01",
# start_crawl_date="2025-01-01", # filter by when Exa crawled
use_autoprompt=True,
)
docs = retriever.invoke("LLM agent memory architectures")
ExaSearchResults — search as an agent tool
from langchain_exa import ExaSearchResults
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
search_tool = ExaSearchResults()
# Invoke directly
result = search_tool.invoke({
"query": "latest LangChain releases 2026",
"num_results": 3,
})
print(result) # SearchResponse with Result objects
# Use in a ReAct agent
agent = create_react_agent(
ChatOpenAI(model="gpt-4o-mini"),
tools=[search_tool],
)
response = agent.invoke({"messages": [("human", "What happened in AI this week?")]})
ExaFindSimilarResults — find similar URLs
from langchain_exa import ExaFindSimilarResults
find_similar = ExaFindSimilarResults()
# Find pages similar to a given URL
result = find_similar.invoke({
"url": "https://blog.langchain.dev/langgraph/",
"num_results": 5,
})
print(result) # Similar pages with title, url, score
Use in a RAG chain
from langchain_exa import ExaSearchRetriever
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_openai import ChatOpenAI
from langchain_core.runnables import RunnablePassthrough
retriever = ExaSearchRetriever(
k=3,
use_autoprompt=True,
summary=True, # get summaries instead of raw text for clean context
)
llm = ChatOpenAI(model="gpt-4o-mini")
prompt = ChatPromptTemplate.from_template("""
Answer based on the following web search results:
{context}
Question: {question}
""")
def format_docs(docs):
return "\n\n".join(
f"**{doc.metadata.get('title', 'Untitled')}**\n{doc.page_content}"
for doc in docs
)
chain = (
{"context": retriever | format_docs, "question": RunnablePassthrough()}
| prompt
| llm
| StrOutputParser()
)
answer = chain.invoke("What are the latest LangGraph features?")
print(answer)
Combine ExaSearchResults with other tools
from langchain_exa import ExaSearchResults, ExaFindSimilarResults
from langchain_community.tools import WikipediaQueryRun
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
tools = [
ExaSearchResults(),
ExaFindSimilarResults(),
Установить langchain-exa в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл langchain-exa?
LangChain Exa integration — semantic web search with ExaSearchRetriever (RAG), ExaSearchResults (agent tool), and ExaFindSimilarResults (find similar URLs). Unique features: use_autoprompt (LLM query rewriting), highlights (excerpts), summary (per-result LLM summaries), livecrawl (real-time), and date filtering.
Как установить скилл langchain-exa?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл langchain-exa запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic