tethered-trust (Python)
Fit, compatibility and recall checks for AI agents before they buy. Every answer is a decision (supported, conditional, incompatible, insufficient_evidence) with the rules checked, manufacturer sources and a signed receipt.
- Standard library only (Python 3.8+)
- Tool definitions for OpenAI, Anthropic and LangChain
- Same tools as the Tethered Trust MCP server (
https://tetheredtrust.com/mcp)
pip install tethered-trust # add [langchain] for LangChain tools
Quick start
from tethered_trust import TetheredTrust
tt = TetheredTrust(sandbox=True) # sandbox: free, never charged
cart = tt.check_cart({
"owned": ["Sony PlayStation 5 Pro"],
"line_items": [{"id": "li_1", "title": "Samsung 990 PRO with Heatsink 2TB", "quantity": 1}],
})
if cart["safe_to_checkout"]:
# place the order, then link the receipt to it (free)
tt.call("attach_order", {"receipt_id": cart["receipt"]["id"], "order_id": "112-5550001"})
else:
print(cart["action"], cart["questions"])
Drop sandbox=True for live answers. Without a key you get a small free daily allowance; after that use an API key with prepaid credits (TetheredTrust(api_key="tt_..."), buy at tetheredtrust.com/credits) or pay per answer in USDC with x402.
Give the tools to your model
from openai import OpenAI
from tethered_trust import TetheredTrust, to_openai_tools, run_tool, SHOPPING_TOOLS
tt = TetheredTrust(api_key="tt_...")
res = OpenAI().chat.completions.create(
model="gpt-4.1",
messages=[{"role": "user", "content": "Will this charger work with my Pixel 10? Anker Nano Charger 30W"}],
tools=to_openai_tools(SHOPPING_TOOLS),
)
for call in res.choices[0].message.tool_calls or []:
print(run_tool(tt, call.function.name, call.function.arguments))
Anthropic: to_anthropic_tools(SHOPPING_TOOLS) gives the tools list for client.messages.create(...); run each tool_use block with run_tool(tt, block.name, block.input).
LangChain: to_langchain_tools(tt, SHOPPING_TOOLS) returns StructuredTools you can bind to any chat model.
What to do with the answer
decision |
Do this |
|---|---|
supported |
Proceed; relay caveats. |
conditional |
Proceed only once every item in conditions is met. |
incompatible |
Don't buy; use substitutions or fix_purchase_plan. |
insufficient_evidence |
Ask the returned questions, then check again. |
Keep the receipt; after ordering, attach_order makes it a Decision Record. If an answer was wrong, file_claim within 60 days refunds the fee.
Docs: https://tetheredtrust.com/agents · Pricing: https://tetheredtrust.com/pricing · Terms: https://tetheredtrust.com/api-terms
Answers are informational; confirm with the manufacturer before buying. MIT licensed. © Chimes In LLC.
Metadata
Release files for tethered-trust 0.1.0
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 | Actions |
|---|---|---|---|---|
| tethered_trust-0.1.0.tar.gz | 16.2 kB | With provenance | Details for tethered_trust-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tethered_trust-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for tethered_trust-0.1.0-py3-none-any.whl |
Total release size: 31.8 kB
Release files / tethered_trust-0.1.0.tar.gz
| Download URL | tethered_trust-0.1.0.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
136e30831a5e753f71e243254c5f2fa375dd54fa6caca02008b27c5efcddd092
|
|
BLAKE2b-256 checksum How to use checksums |
af0c1615b86b51ca90508caa16ad944054f28f9247ae9f96823d3ba87d818b0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logRelease files / tethered_trust-0.1.0-py3-none-any.whl
| Download URL | tethered_trust-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8af5773f069379ce22375890d62f8c9726c0044e69a17d91f8bc6803804959b9
|
|
BLAKE2b-256 checksum How to use checksums |
7f303c6464e9ada2645bb77ff1d6a40557fa4c835ba8bada72af06864caa87ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logSecurity for tethered-trust 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tethered_trust-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logA 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.