Open agent handoff protocol and verification infrastructure.
Project description
ChainThread Python SDK
Open agent handoff protocol and verification infrastructure.
Install
pip install chainthread
Quick Start
from chainthread import ChainThread
ct = ChainThread()
# Create a chain
chain = ct.create_chain(
name="my-agent-pipeline",
description="Research to writer handoff"
)
# Send a handoff envelope
envelope = ct.send_envelope(
chain_id=chain["chain_id"],
sender_id="research-agent",
sender_role="researcher",
receiver_id="writer-agent",
receiver_role="writer",
payload={"summary": "AI is transforming software.", "confidence": 0.95},
summary="Research complete, handing off to writer",
provenance=[{"field": "summary", "source": "model_generated", "confidence": 0.95}],
contract={
"required_fields": ["summary", "confidence"],
"assertions": [{"field": "confidence", "type": "range", "value": {"min": 0.0, "max": 1.0}}],
"on_fail": "block"
}
)
print(envelope["contract_passed"])
print(ct.stats())
Links
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
chainthread-0.9.0.tar.gz
(3.6 kB
view details)
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 chainthread-0.9.0.tar.gz.
File metadata
- Download URL: chainthread-0.9.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c669f070e8030f485d407cdf07e9207863fa228dfe66e59b732a3c869c45a33e
|
|
| MD5 |
15376eeb7688432859a29b747ba47e1a
|
|
| BLAKE2b-256 |
d31dce367859bc71ee5d0f18b2a188fc29d9fbf52e75c068aa4f288e05aab3e9
|
File details
Details for the file chainthread-0.9.0-py3-none-any.whl.
File metadata
- Download URL: chainthread-0.9.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf1a294505e7bfb1da3e236741cd28b47a2e4e1474c34b9e6fe0c9dfb3f0ee3f
|
|
| MD5 |
adfd5ce632b543950602024f22d85d8d
|
|
| BLAKE2b-256 |
a4dd54bbb0692cd8d2fe1f8e3d8cd9ca146426889425df63557c7b80b297d85b
|