LangChain Python tool that gates KeeperHub workflow execution through SBO3L's policy boundary. Composable with sbo3l-sdk.
Project description
sbo3l-langchain-keeperhub
LangChain Python tool that gates KeeperHub workflow execution through SBO3L's policy boundary. Composable with
sbo3l-sdk.
Why this exists alongside langchain-keeperhub (Devendra's PyPI pkg)
langchain-keeperhub (Devendra) |
sbo3l-langchain-keeperhub (this) |
|
|---|---|---|
| What it wraps | KH webhook execution | SBO3L policy gate → KH webhook execution |
| Decision step | ✗ (agent decides) | ✓ (SBO3L decides; signed receipt) |
| Budget enforcement | ✗ | ✓ |
| Audit chain | ✗ | ✓ (hash-chained Ed25519 log) |
| ENS / Turnkey TEE / MCP bridge | ✓ | ✗ (not duplicated) |
Composable: use Devendra's tool for the raw KH binding + ours as the policy gate that decides whether the raw call should fire. Or use ours alone for the full gate-then-execute path.
Install
pip install "sbo3l-langchain-keeperhub[langchain]" sbo3l-sdk
The [langchain] extra pulls in langchain-core so the typed Sbo3lKeeperHubTool (a BaseTool subclass) is importable. Without it, only the framework-agnostic sbo3l_keeperhub_tool() factory is available.
5-line setup
from sbo3l_sdk import SBO3LClientSync
from sbo3l_langchain_keeperhub import Sbo3lKeeperHubTool
client = SBO3LClientSync("http://localhost:8730")
tool = Sbo3lKeeperHubTool(client=client)
# pass `tool` into your AgentExecutor's tool list
Or framework-agnostic:
from sbo3l_langchain_keeperhub import sbo3l_keeperhub_tool
descriptor = sbo3l_keeperhub_tool(client=client)
# descriptor.name + descriptor.description + descriptor.func
Wire path
Same as the TS package — SBO3L decides → KH adapter executes on allow → tool returns kh_execution_ref. See the TS README's "Wire path" section for details. Both packages share the daemon as the policy boundary, so kh_execution_ref matches across SDK languages.
On kh_workflow_id_advisory
The _advisory suffix is intentional: today the daemon's env-configured webhook URL is the source of truth for actual routing. The per-call workflow_id you pass is surfaced in the envelope for context tagging / audit logs, not as a routing override. See KeeperHub/cli#52 for the proposed contract that would make per-call routing safe.
API
sbo3l_keeperhub_tool(
*,
client: SBO3LClientLike,
workflow_id: str | None = None, # default: DEFAULT_KH_WORKFLOW_ID
name: str = "sbo3l_keeperhub_payment_request",
description: str = ...,
idempotency_key: Callable[[dict], str] | None = None,
) -> SBO3LKeeperHubToolDescriptor
# Or, with langchain-core installed:
Sbo3lKeeperHubTool(
client=..., # required, kw-only
workflow_id=None, # default: DEFAULT_KH_WORKFLOW_ID
name=None, description=None,
)
# Real langchain.tools.BaseTool subclass — drops into AgentExecutor.
License
MIT
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 sbo3l_langchain_keeperhub-1.2.0.tar.gz.
File metadata
- Download URL: sbo3l_langchain_keeperhub-1.2.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c955ae5ab74151205aba314e55ee8852b676c18359c7c97f6652dd89f77fbed
|
|
| MD5 |
746c84eec20f8cf42207e3e3a1e1c5a4
|
|
| BLAKE2b-256 |
ca720e1a94c46b87a1b607babd7b96470306a327a6f3f5332dcc340b77549273
|
Provenance
The following attestation bundles were made for sbo3l_langchain_keeperhub-1.2.0.tar.gz:
Publisher:
integrations-publish.yml on B2JK-Industry/SBO3L-ethglobal-openagents-2026
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sbo3l_langchain_keeperhub-1.2.0.tar.gz -
Subject digest:
3c955ae5ab74151205aba314e55ee8852b676c18359c7c97f6652dd89f77fbed - Sigstore transparency entry: 1433415472
- Sigstore integration time:
-
Permalink:
B2JK-Industry/SBO3L-ethglobal-openagents-2026@351860ccb2560ef7c19a7e833d71740220b8a570 -
Branch / Tag:
refs/tags/langchain-keeperhub-py-v1.2.0 - Owner: https://github.com/B2JK-Industry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
integrations-publish.yml@351860ccb2560ef7c19a7e833d71740220b8a570 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl.
File metadata
- Download URL: sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl
- Upload date:
- Size: 9.0 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 |
26a61d426abd33326525d55b2b20a9367839cf45ed5585ad8b12205fc9960d6d
|
|
| MD5 |
0866867a8913a3b55b75127b12064779
|
|
| BLAKE2b-256 |
1ed9551d8cabb4d1ed9cea90624a61a135ae737a0624cd7724be7cb432b60f46
|
Provenance
The following attestation bundles were made for sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl:
Publisher:
integrations-publish.yml on B2JK-Industry/SBO3L-ethglobal-openagents-2026
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl -
Subject digest:
26a61d426abd33326525d55b2b20a9367839cf45ed5585ad8b12205fc9960d6d - Sigstore transparency entry: 1433415593
- Sigstore integration time:
-
Permalink:
B2JK-Industry/SBO3L-ethglobal-openagents-2026@351860ccb2560ef7c19a7e833d71740220b8a570 -
Branch / Tag:
refs/tags/langchain-keeperhub-py-v1.2.0 - Owner: https://github.com/B2JK-Industry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
integrations-publish.yml@351860ccb2560ef7c19a7e833d71740220b8a570 -
Trigger Event:
workflow_dispatch
-
Statement type: