Python SDK for the Agent Trust Protocol — verifiable identity, cryptographic receipts, and reputation scoring for AI agents
Project description
Viatoris Python SDK
Trust infrastructure for AI agents — cryptographic identity, signed receipts, and audit trails.
Built on W3C DIDs and Ed25519 signatures. Works with any agent framework: LangChain, CrewAI, AutoGen, or your own.
Install
pip install viatorisai
Requires Python 3.10+. Only dependency is PyNaCl for Ed25519 signing.
Quick Start
Get an API key from dashboard.viatoris.ai, then:
from agent_trust import AgentTrust
client = AgentTrust(org_api_key="at_live_...")
# Create an agent — generates an Ed25519 key pair locally
passport = client.create_passport(
agent_id="scout-1",
controller_did="did:web:example.com",
metadata={
"name": "Scout",
"description": "Research agent",
"version": "1.0.0",
"agentType": "autonomous",
"capabilities": ["search"],
},
)
# IMPORTANT: save passport.private_key_jwk securely — only returned once.
# Sign and submit a receipt
signer = client.create_signer(passport)
signer.record_action(
action="web-search",
capability="research",
inputs={"query": "AI safety papers"},
outputs={"results": 12},
result="success",
)
Decorator pattern
Wrap any function with @client.track to automatically emit a signed receipt for every call. Inputs and outputs are captured from the function signature, and submission is fire-and-forget so it never adds latency.
@client.track(passport, capability="research")
def search(query: str):
return {"results": do_search(query)}
# Each call to search(...) now produces a signed receipt in the background.
search("AI safety papers")
If the wrapped function raises, the receipt is recorded with result="failure" and the exception is re-raised.
Fire-and-forget receipts
For inline call sites where you don't want a decorator, use record_action_async to submit on a background thread:
signer.record_action_async(
action="web-search",
capability="research",
inputs={"query": "AI safety papers"},
outputs={"results": 12},
result="success",
)
# Returns immediately. Errors are logged, never raised.
What you get
- Cryptographic identity — every agent has a W3C DID and Ed25519 key pair. Private keys never leave your process.
- Signed receipts — every action produces a tamper-proof, timestamped record. Inputs and outputs are SHA-256 hashed before signing, so payload contents stay private.
- Public verification — anyone can verify an agent's identity and receipts via
https://api.viatoris.ai/v1/verify/<did>. No API key required. - Reputation scoring — Wilson score confidence intervals computed from your verified receipt history.
- Compliance profiles — attach HIPAA, SOC2, GDPR, or custom policy declarations to your agents.
Documentation
Full guide at viatoris.ai/quickstart.
Questions? Email jared@viatoris.ai.
License
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 viatorisai-1.0.0.tar.gz.
File metadata
- Download URL: viatorisai-1.0.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42b74c84b1957bf80c5d8919e9ff4aca818b91275d4b34221dc1981319e7e4c8
|
|
| MD5 |
6ef4b3b22cb6b277407b7561980a7193
|
|
| BLAKE2b-256 |
e68d3b92240c112bc6766dca902cbcc331c40107aa6944c276e8c29ac2116412
|
File details
Details for the file viatorisai-1.0.0-py3-none-any.whl.
File metadata
- Download URL: viatorisai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.0 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 |
95dd765919c06489fe1f6475f1202b204cbe1b7c3aa4d2800c2f2ba44fde20b0
|
|
| MD5 |
24dcc4416c7448c58661cba2a3527152
|
|
| BLAKE2b-256 |
bc5772b7603d514c1dad8c4a1ae6afd3484395b43c5d58ecb6db3abc304769c0
|