Skip to main content

Keenable web-search and page-fetch tool spec for LlamaIndex. Keyless by default.

Project description

LlamaIndex Tools Integration: Keenable

Keenable is a web search and page-fetch API built for AI agents. This package provides KeenableToolSpec, a LlamaIndex tool spec with two tools, search and fetch, usable from any LlamaIndex agent.

Keyless by default: with no API key the keyless public endpoints are used. Provide a key to use the authenticated endpoints (required for mode="realtime" and for higher rate limits).

Install

pip install llama-index-tools-keenable

Usage

from llama_index.tools.keenable import KeenableToolSpec
from llama_index.agent.openai import OpenAIAgent

# No api_key -> keyless public endpoints. Pass api_key=... or set
# KEENABLE_API_KEY to use the authenticated endpoints.
keenable_tool = KeenableToolSpec()

agent = OpenAIAgent.from_tools(keenable_tool.to_tool_list())
agent.chat("Find recent TypeScript best practices and summarize the top result")

Call the tools directly:

docs = keenable_tool.search("typescript best practices", site="github.com")
page = keenable_tool.fetch(docs[0].metadata["url"])
print(page[0].text)

search accepts optional per-query filters (site, published_after/before, acquired_after/before, mode) and returns one Document per result. fetch returns the page's main content as markdown. There is no max_results argument: the API returns a fixed-size result set as-is.

Configuration

  • API key (optional). Constructor api_key=... or the KEENABLE_API_KEY environment variable. Blank → keyless public endpoints.
  • Endpoint (optional). KEENABLE_API_URL overrides the base URL (HTTPS enforced; plain http only for loopback). The endpoint is never a tool argument the model can set, so it cannot be used to redirect requests.

The fetch tool rejects non-http(s) schemes and private/internal hosts client-side before sending.

License

MIT © Keenable

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_keenable-0.1.1.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.

llama_index_tools_keenable-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_keenable-0.1.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_tools_keenable-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e4af53912590598fa30943837b1e9fbc288186ce59ac1cbcfddf04ed1ccd820a
MD5 117d22a5a31509455af1bebcf49c8f52
BLAKE2b-256 0740fef72d6d4cd87ee1f614c94464f7657a734cde1efea1c026bee92b3a7e0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_tools_keenable-0.1.1.tar.gz:

Publisher: publish.yml on keenableai/llama-index-tools-keenable

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

File details

Details for the file llama_index_tools_keenable-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_keenable-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0151edd7a54d4f06571607e15b084b1cf2b7a5995bda271dbce2d809f073c907
MD5 c71556ac472016171b181b110092de4f
BLAKE2b-256 d8e744e4065ed96866c78c1f11a217fb3f22964744f266cf8358606f29e62e92

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_tools_keenable-0.1.1-py3-none-any.whl:

Publisher: publish.yml on keenableai/llama-index-tools-keenable

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