Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

tenbri-openai-agents

Tenbri for the OpenAI Agents SDK: every tool call, handoff and approval of an agent becomes a signed, chained decision that anyone holding the stream's key fingerprint can verify offline.

from agents import Runner
from tenbri import AsyncTenbri
from tenbri_openai_agents import TenbriRecorder

log = await AsyncTenbri.open("s3://acme-audit/tenbri/support")
async with TenbriRecorder(log) as recorder:
    result = await Runner.run(agent, "Refund ch_123", hooks=recorder, run_config=recorder.run_config())
What happens What is recorded
A tool call An intent by agent:<name>, action the tool's name, durable before the tool runs; then the outcome ok, or error if the tool raised
A tool input guardrail rejects or trips, or a person rejects the call An intent and the outcome refused (by the person, for a rejection)
A handoff An intent and an outcome ok, action handoff, target agent:<next agent>
await recorder.approve(state, item, "person:alice") An approval entry; the tool's intent names it in approval
The run raises The open intents end in error (unknown when cancelled)

The SDK awaits its run hooks, so the guarantee is enforce: if the intent cannot be written, the run stops before the tool runs. fail_open=True lets the tool run instead and logs a warning.

Tool arguments, results and prompts are never written. Choose what is:

TenbriRecorder(
    log,
    tools=["issue_refund", "close_ticket"],                 # default: every tool
    target=lambda tool, args: f"stripe:{args['charge']}",   # action.target
    inputs=lambda tool, args: [{"ref": "policy:refund", "version": "14", "content": policy}],
    subject=customer_handle,                                # per-subject keys, for erasure
)
recorder.read("ticket:4821", "3", ticket_text)              # pinned to the next decision

Contents are pinned by keyed digest (digest_key at AsyncTenbri.open). Entries carry the SDK's trace id, so a decision and its trace find each other.

Use one recorder per run, or per conversation when a run resumes after approvals. Pass run_config=recorder.run_config(your_config): it is how the recorder hears that a tool raised (otherwise only the SDK's default error message tells). Use async with so a run that raises closes its open intents; a process that dies mid-action leaves its intent open, and the next writer session reconciles it as unknown.

examples/refunds.py runs end to end, with or without an OpenAI API key.

Metadata

Release files for tenbri-openai-agents 0.1.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tenbri-openai-agents 0.1.0b1
File Size Uploaded Provenance Actions
tenbri_openai_agents-0.1.0b1.tar.gz 10.7 kB Without provenance Details for tenbri_openai_agents-0.1.0b1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tenbri-openai-agents 0.1.0b1
File Interpreter ABI Platform Actions
tenbri_openai_agents-0.1.0b1-py3-none-any.whl Python 3 none any Details for tenbri_openai_agents-0.1.0b1-py3-none-any.whl

Total release size: 18.2 kB

Release files / tenbri_openai_agents-0.1.0b1.tar.gz

Download URL tenbri_openai_agents-0.1.0b1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
568b93ccd94d1cca590a2e0f0da0722a6744132a98ed39bfe2a775543a6b07c1
BLAKE2b-256 checksum
How to use checksums
ddcd4d30fad5a651de5759c45fdec9a3af8f470a6f20169b10c2005a71b216f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tenbri_openai_agents-0.1.0b1-py3-none-any.whl

Download URL tenbri_openai_agents-0.1.0b1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35069e0619f0a640b00cbfb0137d2f57054b8113011876d18c2af3f90ee62f59
BLAKE2b-256 checksum
How to use checksums
4fab3fb30f3c0ed3b28c830c7277097566193e7786d91c5a4908e3c0a061e8fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for tenbri-openai-agents 0.1.0b1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page