Skip to main content

llama-index tools exa integration

Project description

LlamaIndex Tools Integration: Exa

This tool connects to Exa 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 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_documents: Combines search and retrieve_documents to directly return a list of documents related to a search

find_similar: Find similar documents to a given URL.

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.4.1.tar.gz (4.9 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.4.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_tools_exa-0.4.1.tar.gz
Algorithm Hash digest
SHA256 aac39aa926ea1ae770c8dcee328031ebd4ec45f814cd299e40d3ddc66b41a30b
MD5 0a89b7ff8e3ec08dd11bcbb7385d1649
BLAKE2b-256 5c93d69b2268f5fc40defeaaa4306ebeaf29ba0bfb9a5dcbd0bb51ebd96c51d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_tools_exa-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b5089a042418cba648032f0bb10a0a146541bbe7c7ee5a1a7045c1cffdfecf2
MD5 0da4fd9dc543769031e12b2546d3199b
BLAKE2b-256 04956e2fd3c728f641b524695e6e532980a213f4a2ce65fedca1da4fa493e3a1

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