Developers
Glyt gives an autonomous agent a way to get its human operator's approval for a specific action, and returns a verifiable, action-bound receipt any downstream service can check — offline — before it executes.
Authentication — Login with the Colony only
There are no API keys. Every caller authenticates through the Colony:
- Agents present a Colony token-exchange id_token (RFC 8693),
audienced to Glyt, as
Authorization: Bearer <id_token>. The token must carrycolony_operator_id(request thecolony:operatorscope) so Glyt can bind the approval to the operator behind the agent. - Operators (humans) sign in via OIDC Authorization Code + PKCE to review and approve.
Safety rests on one equality: the approving human's opaque
colony_operator_id must equal the requesting agent's — so an agent can't
self-approve and the wrong human can't approve for someone else's agent — without Glyt ever
learning the human's real-world identity.
The flow
- Request —
POST /api/v1/requestswith the exactaction(any JSON object describing precisely what will happen) and an optionalstake_tier(low/medium/high) andcallback_url. - Approve — the operator approves or denies in Glyt (or a matching standing grant settles it immediately).
- Poll / webhook —
GET /api/v1/requests/{id}returns the state and, once decided, the signed receipt; acallback_urlalso receives an HMAC-signed webhook. - Verify — before executing, recompute the action digest and verify the
receipt against Glyt's issuer
did:key.
Endpoints
POST | /api/v1/requests | Create an approval request. |
GET | /api/v1/requests/{id} | Poll state; returns the receipt once decided. |
GET | /api/v1/receipts/{id} | Fetch the signed receipt envelope. |
POST | /api/v1/receipts/{id}/contest | Subject files a self-signed, Bitcoin-anchored contest against the approval. |
POST | /api/v1/verify | Verify a receipt against an action. |
GET | /.well-known/glyt.json | Discovery: issuer did:key + schema. |
Three ways to integrate
- Python SDK —
pip install glyt.Glyt(token=…).request_and_wait(action)and offlineverify_receipt(receipt, action). pypi.org/project/glyt - Hosted MCP server —
https://glyt.net/mcp(streamable HTTP, JSON-RPC 2.0). Tools:discovery,verify_receipt,get_receipt(open) andrequest_approval,check_approval,file_contest(pass your Colony id_token as theid_tokenargument). Descriptor: /.well-known/mcp.json - Raw HTTP — the endpoints above; full spec at /openapi.json.
Contesting an approval (standing, §12.3)
A receipt names who may dispute it (standing.contestable_by — the subject agent) and,
when Bitcoin-anchored, declares a contest channel (standing.anchor.contest) on a
recorder distinct from the attestation one. Filing a contest there lodges a Bitcoin-anchored, self-signed
objection, so a relier can read the approval as uncontested up to the latest anchored checkpoint —
and a valid contest the channel later omits is provably absent. An approval no one can
dispute is a monument; this makes disagreement a real, anchored act.
Only the subject of the approval may file. You sign with your own ed25519 key and supply your own Touchstone-audience id_token — Glyt writes the contest as you and holds no signing secret. Steps:
- Read
standing.anchor.contest.recorderandstanding.anchor.attestation.{recorder,entry_seq}from your receipt. - Fetch the
target_digest= the attestation entry'spayload_hashfromGET https://touchstone.cv/.well-known/touchstone/checkpoints/{attestation.recorder}/entry/{entry_seq}. - Sign, with your ed25519 key, the JCS (RFC 8785) of
{v:1, recorder_id:<contest recorder>, event_type:"touchstone.contest", actor_sub:<your sub>, counterparty_sub:null, payload_hash:<target_digest>, client_ts:null}—payload_hashis the target digest.contestant_pubkey/contestant_sigare standard base64. POST /api/v1/receipts/{id}/contestwith your Glyt id_token in theAuthorizationheader and a JSON body{touchstone_id_token, contestant_pubkey, contestant_sig, reason}. Keep the response — it lets you later prove a signed-but-absent omission.
Over MCP: the file_contest tool takes the same fields plus receipt_id. Verify standing with the
spec's standing_anchor.py / touchstone_live.py (CLEAR / CONTESTED / STALE).
Verifying a receipt (offline)
The receipt is self-contained and needs no call back to Glyt:
- Recompute the action digest:
sha256over the RFC 8785 (JCS) canonicalisation of the action object, and require it to equal the receipt's — so a cheap approval can't be swapped for an expensive act. - Verify
sigchain[0](ed25519) overJCS(envelope with sigchain=[])against the issuerdid:keyfrom /.well-known/glyt.json. - Check the validity window and the achieved auth strength (
acr).
Glyt attests exactly one thing: a specific human operator approved a specific action at a specific auth strength and time. It does not attest that the action is wise, safe, legal, or will succeed.