This release is a pre-release and may not be stable for production use.
tenbri-claude-agent-sdk
Tenbri for the Claude Agent SDK: every tool call your agent makes becomes a signed, chained decision in a Tenbri stream. One line at agent setup.
pip install --pre tenbri-claude-agent-sdk
from claude_agent_sdk import ClaudeAgentOptions, query
from tenbri import AsyncTenbri
from tenbri_claude_agent_sdk import TenbriHooks
log = await AsyncTenbri.open("./audit/support", create=True, digest_key=b"a 32-byte secret, kept apart....")
options = TenbriHooks(log, "agent:support", approver="person:alice").instrument(
ClaudeAgentOptions(can_use_tool=ask_a_human)
)
async for message in query(prompt=prompt(), options=options):
...
What is recorded
| SDK event | Entry |
|---|---|
PreToolUse |
An intent: principal = your agent, action.type = the tool name, action.target from the tool input (file path, URL), the input pinned by its keyed digest. Durable before the tool runs. |
can_use_tool allows, with an approver |
An approval by that person, for the same action |
PostToolUse |
Outcome ok, naming the approval if there was one |
PostToolUseFailure |
Outcome error; unknown when interrupted |
can_use_tool denies, or PermissionDenied |
Outcome refused |
Each entry carries the trace of the active OpenTelemetry span (install opentelemetry-api). An
intent left open (the process died mid-action) is reconciled as unknown by the next writer.
Nothing of the prompt, the tool input or the tool output is stored: the input is pinned by its
keyed digest (claude:tool_input@<tool_use_id>) when the stream was opened with a digest_key,
so whoever holds the input and the key can prove what the agent sent.
Options
tools: names to record, or a predicate of the name. All by default.describe(tool, tool_input): the intent's fields:target,inputs(what the call read,{ref, version, digest}),rule,subject, oractionto rename it. The default records the target of file and web tools.approver: who approves throughcan_use_tool, a principal or a function of(tool, tool_input, context)returning one;None(the default) when your own code decides and no person approves.fail_open: by default the adapter fails closed: a tool whose intent is not durable withintimeoutseconds (default 2) is denied. Withfail_open=Trueit runs anyway, unrecorded, and a warning is logged.
TenbriHooks adds its hooks next to yours and wraps your can_use_tool; can_use_tool itself
needs a streamed prompt (an async iterable), as the SDK requires. See
examples/refund_agent.py.
Metadata
Release files for tenbri-claude-agent-sdk 0.1.0b1
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 | |
|---|---|---|---|---|
| tenbri_claude_agent_sdk-0.1.0b1.tar.gz | 8.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tenbri_claude_agent_sdk-0.1.0b1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 kB
Release files / tenbri_claude_agent_sdk-0.1.0b1.tar.gz
| Download URL | tenbri_claude_agent_sdk-0.1.0b1.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faadcf1e6c86e5ef03e479cc7dedf3fd834d991d4ec6173c80decda13aee333d
|
|
BLAKE2b-256 checksum How to use checksums |
6c583c1e692c48a9443e4db2bf234378b0d692af00823088ecfc1927be152aa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / tenbri_claude_agent_sdk-0.1.0b1-py3-none-any.whl
| Download URL | tenbri_claude_agent_sdk-0.1.0b1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9315dd2642797ae3bf0d366a02739ea94cc75de057041e2c19570ef9a307cea3
|
|
BLAKE2b-256 checksum How to use checksums |
d44a9c0c9c2762bfcaf9079268e8f84ffac3514562b592e7ae4bc8a9a2e08a27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for tenbri-claude-agent-sdk 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.