Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sbo3l_langchain_keeperhub-1.2.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file sbo3l_langchain_keeperhub-1.2.0.tar.gz.

File metadata

File hashes

Hashes for sbo3l_langchain_keeperhub-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3c955ae5ab74151205aba314e55ee8852b676c18359c7c97f6652dd89f77fbed
MD5 746c84eec20f8cf42207e3e3a1e1c5a4
BLAKE2b-256 ca720e1a94c46b87a1b607babd7b96470306a327a6f3f5332dcc340b77549273

See more details on using hashes here.

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

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

File details

Details for the file sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sbo3l_langchain_keeperhub-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26a61d426abd33326525d55b2b20a9367839cf45ed5585ad8b12205fc9960d6d
MD5 0866867a8913a3b55b75127b12064779
BLAKE2b-256 1ed9551d8cabb4d1ed9cea90624a61a135ae737a0624cd7724be7cb432b60f46

See more details on using hashes here.

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

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