Skip to main content

OpenBox base SDK - governance contracts, strict gate, identity/signing, evaluate client, context runtime, OTel span wire serialization, and generic instrumentation shared by every OpenBox framework SDK

Project description

openbox-sdk-python

OpenBox base SDK (import openbox_core) — the standalone core every OpenBox framework SDK builds on. It owns:

  • Contracts — event and result dataclasses (EventEnvelope, EvaluationResult, ApprovalResult, Verdict).
  • Always-strict governance gate — malformed event/runtime contracts raise ContractError before send; there are no configurable gate modes.
  • Identity & signing — AIP DID validation + Ed25519 request signing, byte-compatible with the Temporal SDK signing contract.
  • Evaluate client — sync + async calls to OpenBox Core (/api/v1/governance/evaluate, /approval, /auth/validate).
  • Context & runtimeActivityContext, ContextStore, trace correlation, FrameworkAdapter protocol, OpenBoxRuntime.
  • OTel span wire serialization — OTel spans are the internal source of truth, projected to the current Core SpanData wire shape before send.
  • Generic instrumentation — HTTP/DB/file/function wrappers with a started/completed hook runtime enforcing preflight before real operations.
  • Conformance kit — reusable fixtures framework SDKs run to prove parity.

Framework SDKs (Temporal, LangGraph, LangChain, DeepAgent, CrewAI) are thin adapters: they bind framework lifecycle into ActivityContext, emit lifecycle events, and translate EvaluationResult into native behavior.

Framework SDK integration

New framework SDK developers and agents should start with the OpenBox Python Framework SDK Integration guide. It describes how to build a framework SDK on top of this base package without reimplementing config, signing, governance gates, hook wire payloads, or conformance fixtures.

Install

uv sync                 # core
uv sync --extra http    # + HTTP instrumentation targets
uv sync --extra db      # + DB instrumentation targets

Import safety

openbox_core.__init__ and all openbox_core.contracts.* modules import without pulling in httpx, cryptography, requests, or OTel instrumentation — safe for constrained framework paths such as the Temporal workflow sandbox. tests/test_import_safety.py enforces this in CI.

Development

uv sync --all-extras
uv run pytest
uv run ruff check .

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

openbox_sdk_python-1.0.0.tar.gz (174.0 kB view details)

Uploaded Source

Built Distribution

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

openbox_sdk_python-1.0.0-py3-none-any.whl (87.8 kB view details)

Uploaded Python 3

File details

Details for the file openbox_sdk_python-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for openbox_sdk_python-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dfc2193fd48e008dbcbd5b33266e37a3549fa2246957a271942c4a78a6538cf0
MD5 dc333d7cc77f0db2b4db8031356c7b94
BLAKE2b-256 bfd6a7cd2b7e8ead0cb4e3d9b067ebd715167945754d3709cbdb4c484ccf2e62

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbox_sdk_python-1.0.0.tar.gz:

Publisher: publish.yml on OpenBox-AI/openbox-sdk-python

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

File details

Details for the file openbox_sdk_python-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openbox_sdk_python-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 968d85dac4ee524e65cede94a1df1d3f9d6f19ae06afcb13492338a970e3271f
MD5 fd33f6a3f590b456d0f3865ec087b8ee
BLAKE2b-256 62fe43c592aca193e553606f2295136d2fd400efb4ddc0f063cf73c38d579ae6

See more details on using hashes here.

Provenance

The following attestation bundles were made for openbox_sdk_python-1.0.0-py3-none-any.whl:

Publisher: publish.yml on OpenBox-AI/openbox-sdk-python

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