Skip to main content

ATB (Agent Trace Bundle) Python SDK — tamper-evident audit trails for AI agent workflows

Project description

ATB Python SDK

The official Python SDK for ATB (Agent Trace Bundle) — tamper-evident, replayable audit trails for AI agent workflows.

Installation

pip install atb-sdk

With LangChain integration:

pip install atb-sdk[langchain]

Quick Start

from atb import Bundle

# Create a new bundle
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.integrations.langchain 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.

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

atb_sdk-1.0.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

atb_sdk-1.0.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for atb_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8d0921429cd5ad2e3fb987eb2cb47dfae83e100589e2c72d4e8c7e9112fc9804
MD5 d2c16bf3992b63826c19d31fb9e86123
BLAKE2b-256 7757b53370f6fd99ec25c383516ad5cedd9029dcb97a1671b75311c9ce020a38

See more details on using hashes here.

Provenance

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

Publisher: release.yml on pcguest/atb

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

File details

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

File metadata

  • Download URL: atb_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for atb_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35b09155188700f4307ee4654ba88aeb8f36cdcb8c83ecb7d9db92f8b49b0fdc
MD5 5b97f76f59baee1fcb1dfc1de6bbb15b
BLAKE2b-256 fe458cf975e0a34baa22e5c0f5e558b2a2665daff101cced7872dee879349d47

See more details on using hashes here.

Provenance

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

Publisher: release.yml on pcguest/atb

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