A tool plugin for LLM that allows you to search the web using Exa.
Install this plugin in the same environment as LLM:
llm install llm-tools-exaCreate an account at Exa and get your API key from this page. Add it to llm with llm keys set exa.
This plugin provides two tools which can be bundled together or provided separately.
Use -T Exa to include both tools, -T web_search for web search only, and -T get_answer for get answer only.
Search the web for high-quality, relevant results with content and highlights:
llm -m claude-4-sonnet -T web_search "search the web to get today's weather in nyc"Get a direct answer to a question with optional citations:
llm -m claude-4-sonnet -T get_answer "What is the capital of France?"You can ask the model to include or omit citations, as desired.
Get the contents of a webpage as markdown:
llm -m claude-4-sonnet -T get_contents "What's on the homepage of nytimes.comTo set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-tools-exa
python -m venv venv
source venv/bin/activateInstall the dependencies and test dependencies:
pip install -e '.[test]'To run the tests:
pytest- llm: The LLM CLI tool this plugin extends
- sqlite-utils: For querying LLM's sqlite databases