Skip to main content

AgentOath ShadowOS Adapter

Trust receipts for an AI agent backend, wired in at the pipeline boundary.

This is a standalone adapter for the AgentOath trust protocol. It depends on agentoath and on nothing else -- it contains no ShadowOS code and does not import ShadowOS. It was written against a FastAPI agent backend, and the shape it assumes is a common one: an agent that calls tools, reads and writes memory, and answers over HTTP.

Quick Start

pip install agentoath-shadowos
from agentoath_shadowos import ShadowOSTrustAdapter

adapter = ShadowOSTrustAdapter.create(agent_name="MyAI Secretary")
adapter.save("agent_identity.json", password="...")

receipt = adapter.record_tool_call(
    tool="send_email",
    outcome="delivered",
    rating=9,
)

Reload a persisted identity rather than minting a new one -- a DID is derived from its key, so creating a second identity means a second agent as far as the protocol is concerned:

adapter = ShadowOSTrustAdapter.load("agent_identity.json", password="...")

The three pieces

ShadowOSTrustAdapter Owns the identity and turns operations into signed receipts
TrustHooks pre_* / post_* pairs to bracket each stage of an agent pipeline
AgentOathMiddleware ASGI middleware that adds trust headers to API responses

What to record, and what not to

Receipts are public and cannot be deleted. Record the operations somebody may later need you to prove happened -- an approval, a decision, a promise made to a customer. Do not record polling, cache hits, or debug traces: it turns the Registry into a log system, which is not what it is for, and the noise is permanent.

Recording must never break the operation it describes. Do the work first, then record, and let recording fail silently:

result = do_the_actual_work()
try:
    adapter.record_tool_call(tool="send_email", outcome="delivered", rating=9)
except Exception:
    pass          # a receipt that fails is not a request that failed
return result

Privacy

The Registry rejects receipts whose metadata contains any of 28 blocked keys -- prompt, email, raw, transcript, token and similar -- and the match is on underscore-separated words, so prompt_hash and user_email are rejected too. Send a digest, or rename the field to something that is not about the content. The full list and the reasoning are in the integration guide.

License

Apache-2.0. See LICENSE and NOTICE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentoath_shadowos-0.2.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

agentoath_shadowos-0.2.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file agentoath_shadowos-0.2.0.tar.gz.

File metadata

  • Download URL: agentoath_shadowos-0.2.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.12

File hashes

Hashes for agentoath_shadowos-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6887e1e0c38b8f342c3f3b9f61f51b5b276c872aedcb7b316ccd6d526d10db8f
MD5 8723d076933a2f35ddb49978e13a35a4
BLAKE2b-256 657470355453a199919ed1b8e61902eff2db03819d15d82a95c941204f17a24e

See more details on using hashes here.

File details

Details for the file agentoath_shadowos-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentoath_shadowos-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cb715483250395e7bca4159275c52ec60585f3bc1d4e007e574d63a09137439
MD5 77e956fb032753866a401da5c23f5428
BLAKE2b-256 2d1ec457b39b6a350d5462b9a9f1ee08990bd04996accdc51415356a7d3890bb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page