Skip to main content

Microsoft AutoGen Python tool that gates KeeperHub workflow execution through SBO3L's policy boundary. Composable with sbo3l-sdk.

Project description

sbo3l-autogen-keeperhub

Microsoft AutoGen 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-autogen-keeperhub (this)
Target framework LangChain Microsoft AutoGen (pyautogen)
What it wraps KH webhook execution SBO3L policy gate → KH webhook execution
Decision step x (agent decides) yes (SBO3L decides; signed receipt)
Budget enforcement x yes
Audit chain x yes (hash-chained Ed25519 log)
ENS / Turnkey TEE / MCP bridge yes x (not duplicated)

Composable: use Devendra's tool for the raw KH binding (in a LangChain branch of your stack) + ours as the policy gate that decides whether the raw call should fire (in an AutoGen branch). Or use ours alone for the full gate-then-execute path inside an AutoGen ConversableAgent.

Install

pip install "sbo3l-autogen-keeperhub[autogen]" sbo3l-sdk

The [autogen] extra pulls in pyautogen so the register_sbo3l_keeperhub_tool helper can drop directly into a ConversableAgent's function registry. Without it, only the framework-agnostic sbo3l_autogen_keeperhub_tool() factory is available.

5-line setup

from autogen import ConversableAgent
from sbo3l_sdk import SBO3LClientSync
from sbo3l_autogen_keeperhub import register_sbo3l_keeperhub_tool

client = SBO3LClientSync("http://localhost:8730")
executor = ConversableAgent(name="executor", llm_config=False)
register_sbo3l_keeperhub_tool(executor, client=client)

Or framework-agnostic:

from sbo3l_autogen_keeperhub import sbo3l_autogen_keeperhub_tool
descriptor = sbo3l_autogen_keeperhub_tool(client=client)
# descriptor.name + descriptor.description + descriptor.func

Wire path

Same as the LangChain + TS packages — SBO3L decides → KH adapter executes on allow → tool returns kh_execution_ref. The daemon is the policy boundary, so kh_execution_ref matches across SDK languages and frameworks.

  1. AutoGen agent calls sbo3l_keeperhub_payment_request(aprp_json=...) via its function registry.
  2. The registered callable POSTs the APRP to SBO3L's /v1/payment-requests.
  3. SBO3L decides allow / deny / requires_human against the loaded policy + budget + nonce + provider trust list.
  4. On allow: SBO3L's executor_callback hands the signed PolicyReceipt to the daemon-side KeeperHub adapter.
  5. KH adapter POSTs the IP-1 envelope to the workflow webhook, captures executionId, surfaces it as receipt.execution_ref.
  6. Tool returns: {decision, kh_workflow_id_advisory, kh_execution_ref, audit_event_id, request_hash, policy_hash, deny_code}.

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_autogen_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 pyautogen installed:
register_sbo3l_keeperhub_tool(
    agent,                          # ConversableAgent (or duck-typed equivalent)
    *,
    client=...,                     # required, kw-only
    workflow_id=None,               # default: DEFAULT_KH_WORKFLOW_ID
    name=None, description=None,
) -> SBO3LKeeperHubToolDescriptor
# Registers the SBO3L tool with the agent's function_map and returns
# the descriptor (so callers can mirror name+description on a sibling
# proposer agent's register_for_llm decorator).

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_autogen_keeperhub-1.2.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

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

sbo3l_autogen_keeperhub-1.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sbo3l_autogen_keeperhub-1.2.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sbo3l_autogen_keeperhub-1.2.0.tar.gz
Algorithm Hash digest
SHA256 898bbb8ed95ceb077fa29aec946d4fefdeb7676ba2be33b5387e80d9338a7743
MD5 420256b05f2ec4bc2515079f5a73b7d6
BLAKE2b-256 a21e97b9cefb190b5a48c43b098e2518563d002704366e8577fd7277565e06a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for sbo3l_autogen_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_autogen_keeperhub-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sbo3l_autogen_keeperhub-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a4e51f3df56598c58c9b4a3bd8bb6410ff92df50ca338e1b0ba44488bae6f72
MD5 ecf6cb5bc218d7404dca2781fe0009d8
BLAKE2b-256 d6cb83ab52207704531afce8a776ab408673da65c3c1678e0310df37bf4ebd7c

See more details on using hashes here.

Provenance

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