Registry / llm-agents / langchain-exa

langchain-exa

JSON →
library1.1.0pypypi✓ verified 80d ago

An integration package connecting Exa (formerly Metaphor) and LangChain. Current version 1.1.0, requires Python >=3.10 and <4.0.0. Maintained under the LangChain monorepo, with releases tied to LangChain core updates.

pip install langchain-exa
INSTALL
IMPORT
SIG · LANGCHAIN-EXA
L
langchain-exa
llm-agentspythonv1.1.0
Install
8.5s avg
Import
Disk
88MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 84.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 8.5s · import 0.000s · 93MB
88MB installed
● package 88MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ExaSearchResults
from langchain_exa import ExaSearchResults
from langchain_exa import ExaSearchToolkit
ExaFindSimilarResults
from langchain_exa import ExaFindSimilarResults
ExaSearchRetriever
from langchain_exa import ExaSearchRetriever

Initialize the Exa search toolkit with an API key and perform a search.

import os from langchain_exa import ExaSearchToolkit api_key = os.environ.get('EXA_API_KEY', '') toolkit = ExaSearchToolkit(api_key=api_key, max_results=5) result = toolkit.search('latest AI news') print(result)
Debug
Known issues
breakingIn v1.0.0, the package was renamed from 'langchain-metaphor' to 'langchain-exa'. All imports have changed.
fix
Replace 'from langchain_metaphor import ...' with 'from langchain_exa import ...'.
affects: >=1.0.0
deprecatedThe 'MetaphorSearchToolkit' alias was removed in v1.1.0.
fix
Use 'ExaSearchToolkit' instead.
affects: >=1.1.0
gotchaIf you pass the API key directly, it may be logged or exposed in traces. Always use environment variables or a secrets manager in production.
fix
Set EXA_API_KEY via os.environ and omit the api_key parameter.
affects: all
Upgrade
Version history
1.1.0latest on PyPI · released Mar 26, 2026
Audit
Dependencies
langchain-corerequiredBase abstractions for tools, retrievers, and chat models.
exa_pyrequiredOfficial Exa Python SDK for API calls.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
langchain-exa — pip install langchain-exa · libregistry