ATB (Agent Trace Bundle) Python SDK - local-first, tamper-evident audit trails for AI workflows
Project description
ATB Python SDK
The official Python SDK for ATB (Agent Trace Bundle) - local-first, tamper-evident audit trails for AI workflows.
Installation
pip install atb-sdk
Use this package when you need to write or verify bundles from Python code. The Go CLI remains the authoritative CLI path:
go install github.com/pcguest/atb/cmd/atb@latest
The package does not include a standalone ATB CLI. The installed atb command is a compatibility stub that prints Go CLI install guidance and will be removed in a future major release.
With LangChain integration:
pip install atb-sdk[langchain]
Quick Start
from atb import Bundle
# Create a new bundle in Python
bundle = Bundle()
# Append events
bundle.append("dev.session", {
"date": "2025-01-15",
"features_built": ["hash chaining", "CLI init"],
"blockers": ["RFC 8785 library compatibility"],
})
bundle.append("decision", {
"choice": "Go over Rust for CLI",
"reason": "Solo founder velocity",
"alternatives": ["Rust", "Python-only"],
})
# Save to disk
bundle.save("run.atb/bundle.atb")
# Later - reload and verify integrity
b = Bundle.load("run.atb/bundle.atb")
b.verify() # Raises ATBVerificationError if tampered
print(f"Verified {len(b)} events - chain intact.")
LangChain Integration
from atb import Bundle
from atb.langchain_callback import ATBCallbackHandler
from langchain.chat_models import ChatOpenAI
bundle = Bundle()
handler = ATBCallbackHandler(bundle, auto_save=True)
llm = ChatOpenAI(callbacks=[handler])
# All LLM calls are now automatically recorded in the bundle.
The deprecated shim import path atb.integrations.langchain.ATBCallbackHandler still works for compatibility, but it emits a DeprecationWarning. Use atb.langchain_callback.ATBCallbackHandler for new code.
Licence
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atb_sdk-1.7.0.tar.gz.
File metadata
- Download URL: atb_sdk-1.7.0.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86aa86a9cbc04433b5b189eeb7951e1963bd868ba9342d9db98c5755792de8ff
|
|
| MD5 |
cd9d0d32d9de2ef433b130f62ac6b0dd
|
|
| BLAKE2b-256 |
80807855800de5acdb8e4efa9da001fbf093b8aab3775a509efef8baef958221
|
Provenance
The following attestation bundles were made for atb_sdk-1.7.0.tar.gz:
Publisher:
release.yml on pcguest/atb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atb_sdk-1.7.0.tar.gz -
Subject digest:
86aa86a9cbc04433b5b189eeb7951e1963bd868ba9342d9db98c5755792de8ff - Sigstore transparency entry: 1205295448
- Sigstore integration time:
-
Permalink:
pcguest/atb@9c016e33091c10a2384d83ae365957daecaa22f4 -
Branch / Tag:
refs/tags/v1.7.0 - Owner: https://github.com/pcguest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9c016e33091c10a2384d83ae365957daecaa22f4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atb_sdk-1.7.0-py3-none-any.whl.
File metadata
- Download URL: atb_sdk-1.7.0-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3db79ecd572f7fb348e5bb26f9e76a3057cfc6da4474d1ffa266c9e68781e80c
|
|
| MD5 |
75a486b9b7c92208b779ea21174be0a4
|
|
| BLAKE2b-256 |
7dad96966f2ab2e50c53a2ceff094e010379d72f64592fb11c1ba87cc6a37d81
|
Provenance
The following attestation bundles were made for atb_sdk-1.7.0-py3-none-any.whl:
Publisher:
release.yml on pcguest/atb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atb_sdk-1.7.0-py3-none-any.whl -
Subject digest:
3db79ecd572f7fb348e5bb26f9e76a3057cfc6da4474d1ffa266c9e68781e80c - Sigstore transparency entry: 1205295528
- Sigstore integration time:
-
Permalink:
pcguest/atb@9c016e33091c10a2384d83ae365957daecaa22f4 -
Branch / Tag:
refs/tags/v1.7.0 - Owner: https://github.com/pcguest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9c016e33091c10a2384d83ae365957daecaa22f4 -
Trigger Event:
push
-
Statement type: