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
Metadata
Release files for sbo3l-langchain-keeperhub 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sbo3l_langchain_keeperhub-1.2.0.tar.gz | 8.1 kB | With provenance | Details for sbo3l_langchain_keeperhub-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl |
Total release size: 17.1 kB
Release files / sbo3l_langchain_keeperhub-1.2.0.tar.gz
| Download URL | sbo3l_langchain_keeperhub-1.2.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c955ae5ab74151205aba314e55ee8852b676c18359c7c97f6652dd89f77fbed
|
|
BLAKE2b-256 checksum How to use checksums |
ca720e1a94c46b87a1b607babd7b96470306a327a6f3f5332dcc340b77549273
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 3, 2026.
Transparency logRelease files / sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl
| Download URL | sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26a61d426abd33326525d55b2b20a9367839cf45ed5585ad8b12205fc9960d6d
|
|
BLAKE2b-256 checksum How to use checksums |
1ed9551d8cabb4d1ed9cea90624a61a135ae737a0624cd7724be7cb432b60f46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 3, 2026.
Transparency logSecurity for sbo3l-langchain-keeperhub 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sbo3l_langchain_keeperhub-1.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.