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-0.1.2.tar.gz (8.9 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-0.1.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for atb_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ff7379168f86ccde0404d46f3f54809465f129f9fa11a58151d5005b5318f32a
MD5 918ce00a1155bc5a296b6887b68f255e
BLAKE2b-256 298bcbe6586ebfe352ea8209242edf36729c016be74308f56a3b38d3c8e7e526

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for atb_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7a4623b708525639599cbf43d5c61c0aaa8de9547731c90a1a7e10aa24d963a9
MD5 78a096eaec3d8d144c15ab246f29f697
BLAKE2b-256 62e534ac57f9074e69a2b22edb38b494ad04d8e9895dbb1fa2ea88d721f8d1c6

See more details on using hashes here.

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