Skip to main content

llm-exa

PyPI License

LLM plugin for accessing Exa.ai - an AI-powered search engine and data retrieval API.

Installation

Install this plugin in the same environment as LLM.

llm install llm-exa

Configuration

First, set an API key for Exa.ai:

llm keys set exa
# Paste your Exa.ai API key here

You can obtain an API key by signing up at exa.ai and navigating to your dashboard.

Available Models

This plugin provides access to the following Exa.ai capabilities:

  • exa-search - Search the web using Exa.ai's neural or keyword search
  • exa-search-contents - Search and retrieve full content of relevant web pages
  • exa-find-similar - Find web pages similar to a provided URL
  • exa-answer - Get direct answers to questions with citations from the web

You can view all models and their options with:

llm models
llm models --options

Usage Examples

Web Search

Search the web using neural search (semantic understanding):

llm -m exa-search "Latest developments in quantum computing" --option type neural

Search with category filtering:

llm -m exa-search "Recent papers on LLMs" --option category "papers" 

Limit search to specific domains:

llm -m exa-search "Climate change impacts" --option include_domains '["nature.com", "science.org"]'

Search with Full Content Retrieval

Search and get full content of web pages:

llm -m exa-search-contents "The future of renewable energy" --option text true --option highlights true

Include summaries of retrieved pages:

llm -m exa-search-contents "AI chip advancements" --option summary true 

Finding Similar Content

Find pages similar to a URL:

llm -m exa-find-similar "https://example.com/article-about-agi" 

Exclude the original domain:

llm -m exa-find-similar "https://example.com/some-article" --option exclude_domains '["example.com"]'

Getting Direct Answers

Get a direct answer to a question with citations:

llm -m exa-answer "What are the environmental impacts of blockchain?"

Stream the answer in real-time:

llm -m exa-answer "What are the latest developments in fusion energy?" --option stream true

Options

Common options for all models:

  • num_results - Number of results to return (default: 5)
  • text - Whether to include full text content (default: true)

Search-specific options:

  • type - Search type: "neural", "keyword", or "auto" (default: "auto")
  • category - Filter by data category (e.g., "company", "research paper", "news")
  • include_domains - List of domains to include in search
  • exclude_domains - List of domains to exclude from search

Content-specific options:

  • highlights - Include relevant highlights in response (default: false)
  • summary - Include generated summary in response (default: false)

Answer-specific options:

  • stream - Stream the response (default: true)

Development

To set up this plugin locally:

git clone https://github.com/nicobailon/llm-exa.git
cd llm-exa
python -m venv venv
source venv/bin/activate
pip install -e '.[test]'

License

This project is licensed under the Apache License 2.0.

Metadata

Release files for llm-exa 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-exa 0.1.0
File Size Uploaded
llm_exa-0.1.0.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-exa 0.1.0
File Interpreter ABI Platform
llm_exa-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release files / llm_exa-0.1.0.tar.gz

Download URL llm_exa-0.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6d4778447bddd722f69d4d82319a9047495f548a107c513a01cb6a28e947eedb
BLAKE2b-256 checksum
How to use checksums
62ab7d58498fc48a545affd8af54c6d52f52c527227f191880059708db9fac84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / llm_exa-0.1.0-py3-none-any.whl

Download URL llm_exa-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0433632bd2228eab300f6a4c7f04be38fe854234a725751f1f7fa91badc30364
BLAKE2b-256 checksum
How to use checksums
7f58f805fbf66d5650c42960467773a25f23972863651325e2aec2d6134f7a17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page