An integration package connecting Keenable web search and LangChain
Project description
langchain-keenable
This package contains the LangChain integration with Keenable, a web search and page-fetch API built for AI agents.
Installation
pip install -U langchain-keenable
Optionally set a KEENABLE_API_KEY environment variable to use the authenticated endpoints. Without a
key, both search and fetch transparently fall back to their keyless public endpoints.
export KEENABLE_API_KEY="your-api-key" # optional; create one at https://keenable.ai/console
The API endpoint defaults to https://api.keenable.ai and can be overridden (e.g. for staging) with the
KEENABLE_API_URL environment variable. It must be an https:// URL.
Tools
KeenableSearch
Queries the Keenable search API and returns a list of result dictionaries. All filters are per-invocation, so an agent can vary them per query:
from langchain_keenable import KeenableSearch
# Works with no key (keyless public endpoint) or with KEENABLE_API_KEY set.
tool = KeenableSearch()
results = tool.invoke({
"query": "typescript best practices",
"site": "github.com", # optional: restrict to a domain
"published_after": "2026-01-01", # optional: YYYY-MM-DD date filters
# "published_before" / "acquired_after" / "acquired_before" also supported
# "mode": "realtime", # optional per-call override (needs an org key)
})
for result in results:
print(result["title"], result["url"])
mode defaults to "pro" (deeper retrieval); use "realtime" for latency-sensitive cases such as
voice agents. It can be set as a class default and overridden per call. realtime requires an org key.
KeenableFetch
Fetches a page via Keenable and returns its main content as markdown — pair it with KeenableSearch so
an agent can read the pages it discovers:
from langchain_keenable import KeenableFetch
tool = KeenableFetch()
page = tool.invoke({"url": "https://example.com/article"})
print(page["title"], page["content"])
Error handling
Both tools set handle_tool_error = True: rate limits (429), auth (401) and credit (402) errors, network
timeouts and malformed responses are surfaced to the agent as an error string (carrying the backend's
message) rather than raising and crashing the agent loop.
Async
Both tools implement _arun, so await tool.ainvoke({...}) works (the request runs in a worker thread).
The tools can be bound to any LangChain chat model that supports tool calling and used within an agent.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_keenable-0.1.0.tar.gz.
File metadata
- Download URL: langchain_keenable-0.1.0.tar.gz
- Upload date:
- Size: 143.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f6a0fd1c3aa14d64e462649d4433efa872f6152eab0b4377449ac04f6059cdc
|
|
| MD5 |
6928761e702af4adc7e939ceda04034a
|
|
| BLAKE2b-256 |
7ee6fc06f0fe4a0a1fc4f10e6b6adbf5388db9f4081e1db531f45cfcd92e4558
|
Provenance
The following attestation bundles were made for langchain_keenable-0.1.0.tar.gz:
Publisher:
publish.yml on keenableai/langchain-keenable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_keenable-0.1.0.tar.gz -
Subject digest:
8f6a0fd1c3aa14d64e462649d4433efa872f6152eab0b4377449ac04f6059cdc - Sigstore transparency entry: 1859645146
- Sigstore integration time:
-
Permalink:
keenableai/langchain-keenable@f93dc2899825f910c32747d5b955727dfdefa199 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/keenableai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f93dc2899825f910c32747d5b955727dfdefa199 -
Trigger Event:
release
-
Statement type:
File details
Details for the file langchain_keenable-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_keenable-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa8ebf6e88bda78590f14108f0ee3818f55f53b5c95b2f05ed3c39d7ee1cd3f9
|
|
| MD5 |
4a62b964e1fbe8fa361f845addd5f103
|
|
| BLAKE2b-256 |
9fe315419f7a3ef4b2b607fa181450fb323079f06de4a5bba30f3eaa549e4bc7
|
Provenance
The following attestation bundles were made for langchain_keenable-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on keenableai/langchain-keenable
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_keenable-0.1.0-py3-none-any.whl -
Subject digest:
fa8ebf6e88bda78590f14108f0ee3818f55f53b5c95b2f05ed3c39d7ee1cd3f9 - Sigstore transparency entry: 1859645153
- Sigstore integration time:
-
Permalink:
keenableai/langchain-keenable@f93dc2899825f910c32747d5b955727dfdefa199 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/keenableai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f93dc2899825f910c32747d5b955727dfdefa199 -
Trigger Event:
release
-
Statement type: