Skip to main content

llama-index tools exa integration

Project description

LlamaIndex Tools Integration: Exa

This tool connects to Exa, one of the best web search APIs for AI, to easily enable your agent to search and get HTML content from the Internet.

To begin, you need to obtain an API key on the Exa developer dashboard.

Usage

This tool has more a extensive example usage documented in a Jupyter notebook here

Here's an example usage of the ExaToolSpec.

# %pip install llama-index llama-index-core llama-index-tools-exa

from llama_index.tools.exa import ExaToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

exa_tool = ExaToolSpec(
    api_key=os.environ["EXA_API_KEY"],
)
agent = FunctionAgent(
    tools=exa_tool.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(
    await agent.run(
        "Can you summarize the news published in the last month on superconductors"
    )
)

search: Search the web using Exa for a list of articles relating to a natural language query

retrieve_documents: Retrieve a list of documents returned from exa_search.

search_and_retrieve_highlights: Search and retrieve query-relevant highlights from results.

search_and_retrieve_documents: Combines search and retrieve_documents to directly return a list of documents related to a search

current_date: Utility for the Agent to get todays date

This loader is designed to be used as a way to load data as a Tool in a Agent.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_exa-0.5.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_tools_exa-0.5.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_exa-0.5.2.tar.gz.

File metadata

  • Download URL: llama_index_tools_exa-0.5.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_exa-0.5.2.tar.gz
Algorithm Hash digest
SHA256 94b67c13824df8a1f9a030e0356866f864d8c133f54ee57ae62ec6983775e8ee
MD5 09ef06b6336f7a0229d269a325060adf
BLAKE2b-256 402dce063e6e0cac13c3ead36077b410e538cfef28adbfb6344af5245b26ddb3

See more details on using hashes here.

File details

Details for the file llama_index_tools_exa-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: llama_index_tools_exa-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_exa-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3cb2d92075ef00753558e22cbf531927f05e5a8136885d78b19a4fe2c3846d2c
MD5 507276dfab34383caf4ab8fb7f1a4876
BLAKE2b-256 562c10ecbc65aad63b3756fa6b4757fd72e926ba5c388dcecacfacb9a5beee99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page