EXIT Protocol SDK — create, sign, and verify ExitMarkers for AI agent departure records
Project description
exit-door 𓉸
𓉸 Passage Protocol · exit-door · entry-door · mcp · langchain · vercel · eliza · eas · erc-8004 · sign · python
⚠️ Pre-release software -- no formal security audit has been conducted. This project is published for transparency, review, and community feedback. It should not be used in production systems where security guarantees are required. If you find a vulnerability, please report it to hawthornhollows@gmail.com.
Vehicle registration for AI. Cryptographic proof that an agent left, when, and why. Python SDK.
What is EXIT?
The EXIT Protocol creates verifiable departure records for AI agents. When an agent leaves a platform, it can create a cryptographically signed marker proving it departed, preserving reputation and continuity across contexts.
Think of it as a passport stamp for AI agents.
Quick Start
pip install exit-door
Create a signed departure marker in 3 lines:
from exit_door import quick_exit, quick_verify
result = quick_exit("https://platform.example.com")
print(result.marker.id) # urn:exit:a1b2c3...
Verify a marker:
verification = quick_verify(result.marker)
assert verification.valid # True
From JSON:
from exit_door import to_json, quick_verify
json_str = to_json(result.marker)
verification = quick_verify(json_str) # Accepts both strings and objects
Core API
from exit_door import (
generate_identity,
create_marker,
sign_marker,
verify_marker,
from_json,
to_json,
ExitType,
ExitStatus,
)
# Generate an identity (DID + Ed25519 keypair)
identity = generate_identity()
print(identity.did) # did:key:z6Mk...
# Create an unsigned marker
marker = create_marker(
subject=identity.did,
origin="https://platform.example.com",
exit_type=ExitType.VOLUNTARY,
)
# Sign it
signed = sign_marker(marker, identity.private_key, identity.public_key)
# Serialize to JSON (camelCase, spec-compliant)
json_str = to_json(signed)
# Parse and validate from JSON
parsed = from_json(json_str)
# Verify signature
result = verify_marker(parsed)
assert result.valid
P-256 Support
result = quick_exit("https://example.com", algorithm="P-256")
# Uses ECDSA P-256 with low-S normalization for cross-language compatibility
Features
- Ed25519 + P-256 signing and verification
- Pydantic v2 models with full type annotations and
py.typed - RFC 8785 JCS canonicalization for deterministic signing
- did:key encoding/decoding (Ed25519 + P-256)
- Content-addressed marker IDs (SHA-256)
- Cross-language compatible with the TypeScript
exit-doorpackage - Frozen models (immutable after creation)
- Zero async dependencies (sync-only, CPU-bound crypto)
Cross-Language Compatibility
This package produces markers that verify correctly with the TypeScript exit-door package and vice versa. Key interop decisions:
- P-256 signatures use compact
r||sformat with low-S normalization - Ed25519 multicodec prefix:
[0xed, 0x01](varint) - Domain prefix:
"exit-marker-v1.2:" - Base64 standard encoding (not URL-safe)
- Timestamps: millisecond precision with
Zsuffix
Ecosystem
| Package | Language | Description |
|---|---|---|
| exit-door | TypeScript | Core protocol (reference impl) |
| exit-door | Python | Core protocol ← you are here |
| cellar-door-entry | TypeScript | Arrival/entry markers |
| @cellar-door/langchain | TypeScript | LangChain integration |
| cellar-door-langchain | Python | LangChain integration |
| @cellar-door/vercel-ai-sdk | TypeScript | Vercel AI SDK |
| @cellar-door/mcp-server | TypeScript | MCP server |
| @cellar-door/eliza | TypeScript | ElizaOS plugin |
| @cellar-door/eas | TypeScript | EAS attestation anchoring |
| @cellar-door/erc-8004 | TypeScript | ERC-8004 identity/reputation |
| @cellar-door/sign-protocol | TypeScript | Sign Protocol attestation |
License
Apache-2.0
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 exit_door-0.1.0.tar.gz.
File metadata
- Download URL: exit_door-0.1.0.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f91c08be3a5f1286002317456af874cf792f4ef117a7657736d15557b8f29c6c
|
|
| MD5 |
391ce573196328120aad2815c3170c5f
|
|
| BLAKE2b-256 |
68d5c6862e23d12446866d70973e2ba433788eb8a5ea410d7bd2b2afb4912833
|
File details
Details for the file exit_door-0.1.0-py3-none-any.whl.
File metadata
- Download URL: exit_door-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e05fb1aa8790808173678270223cfcc797d3dd4bcff9c89c1f46276243141c5f
|
|
| MD5 |
116f2a060820da8b6c04336fc7cb5870
|
|
| BLAKE2b-256 |
6a6b718da3812ac3ae61d0ce90fa68d02580c33072e10a23b2faa8797e429193
|