Skip to main content

A tool plugin for LLM to enable web search with Brave Search API

Project description

llm-tools-brave

A tool plugin for LLM that allows you to search the web using Brave Search API.

PyPI Changelog Tests License

Installation

Install this plugin in the same environment as LLM:

llm install llm-tools-brave

Usage

Create an account at Brave Search API and get your API key. Add it to llm with llm keys set brave.

This plugin provides four search tools which can be bundled together or provided separately.

Use -T Brave to include all tools, or use individual tool names: -T web_search, -T image_search, -T news_search, -T video_search.

web_search

Search the web for high-quality, relevant results with descriptions and snippets:

llm -m claude-4-sonnet -T web_search "search the web to get today's weather in nyc"

image_search

Search for images with metadata and thumbnails:

llm -m claude-4-sonnet -T image_search "find images of golden retrievers"

news_search

Search for recent news articles with age and source information:

llm -m claude-4-sonnet -T news_search "latest news about AI developments"

video_search

Search for videos with duration, thumbnails, and source information:

llm -m claude-4-sonnet -T video_search "python programming tutorials"

Features

  • Web Search: Get comprehensive web results with descriptions and extra snippets
  • Image Search: Find images with metadata, dimensions, and thumbnail previews
  • News Search: Access recent news articles with publication timing
  • Video Search: Discover videos with duration and preview information
  • Advanced Filtering: Support for country-specific results, language preferences, freshness filters, and domain inclusion/exclusion
  • Error Handling: Robust error handling with informative error messages

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-tools-brave
python -m venv venv
source venv/bin/activate

Install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Dependencies

  • llm: The LLM CLI tool this plugin extends
  • httpx: For making HTTP requests to the Brave Search API

Credits

[!NOTE] This is a fork of llm-tools-exa by Dan Turkel, converted from the Exa API to Brave Search API. All credit for the original implementation goes to Dan Turkel. This conversion was mostly vibe coded with Claude 4 and Cursor.

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

llm_tools_brave-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

llm_tools_brave-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file llm_tools_brave-0.1.0.tar.gz.

File metadata

  • Download URL: llm_tools_brave-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_tools_brave-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fdf040494802288bc964c55db874787828c577a9eb88f42bcbef7bcdd231c789
MD5 c9a3c518184c8d9bb0102d409e81bde3
BLAKE2b-256 3d1f011a9f023362c0a385e9635ba636236815d5772431f4b1cd0278fc5c9ab3

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_tools_brave-0.1.0.tar.gz:

Publisher: publish.yml on statico/llm-tools-brave

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_tools_brave-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_tools_brave-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e168ce2b9770e40f947b0d6219289bb0663344fab5dbf97fd34c522d9dd0492d
MD5 2bf7963895e937a89640f5b9ac6088a9
BLAKE2b-256 b358ad30b3413df804fcf43e971dd2a0686ee1308a7228c98c02bdb8ba6d6741

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_tools_brave-0.1.0-py3-none-any.whl:

Publisher: publish.yml on statico/llm-tools-brave

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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