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.0.tar.gz (6.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.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_tools_keenable-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1ff21ea6d38aba98a6149103094eff6b83cc42cc49447eeab702b870c5f6f353
MD5 329e56a731e1e0e5600aa4ebd59f6aa5
BLAKE2b-256 e5f2d92f371f19b145ac64f9c2e4bb6943592f81574e88686432c316dbb35f41

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_tools_keenable-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_keenable-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7070cc209769ef9a992286f9b140fd15f0469a474bae0400ba07d2d3486a899
MD5 9ffb249e26b6400afd988523dcd563d4
BLAKE2b-256 a17ae243e2f83190e8a558a0b49bffac894a48da826cb176206c0cc9979d4816

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_tools_keenable-0.1.0-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