Agent Capsule
Agent Capsule is the verifiable handoff format for agents.
It is a small open protocol + developer toolkit for safe agent handoffs. It wraps exact machine-readable payloads in a text-native envelope so receivers can detect, verify, policy-check, and unpack safely.
2-Minute Proof
python3 -m pip install agentcapsule
agentcapsule pack handoff.json --out capsule.txt
agentcapsule ingest thread.txt --out ./sandbox --strict --json
If ingest exits 0, the handoff passed verification/policy and unpacked safely.
If ingest exits non-zero in --strict, treat it as a CI/governance failure.
One Command, One Function
CLI:
agentcapsule ingest thread.txt --out ./sandbox --policy ./policy.json --json --strict
Python:
from agentcapsule import ingest_for_framework
result = ingest_for_framework(
messages=thread_messages,
out_dir="./sandbox",
policy="./policy.json",
)
print(result.inline_capsules)
print(result.references)
print(result.unpacked_files)
What It Solves
Normal agent channels are lossy for machine payloads (truncation, formatting drift, silent edits). Agent Capsule turns handoffs into verifiable artifacts.
Protocol Layers
- Capsule: exact payload bytes + metadata + hash/signature context.
- Envelope: text wire format with boundary markers, headers, and encoded payload.
- Manifest: handoff intent (creator, task, files, capabilities, policy hints).
- Delivery modes: inline, attachment, reference (URI + capsule hash + payload hash).
Delivery Modes
inline: full capsule in message body.attachment: full capsule as file/blob.reference: descriptor in message, full capsule fetched by URI.
Reference descriptors are not authoritative by themselves. Receivers must fetch the full capsule and verify capsule_sha256, payload_sha256, signature trust policy, and receiver policy.
Not A Transport Platform
Agent Capsule does not replace transport. It travels through existing systems: chat, tickets, email, GitHub, A2A/MCP workflows, and object storage.
Security And Trust Model
Baseline:
- SHA256 payload integrity checks.
- Local policy checks.
- Safe unpacking into a chosen output directory.
Optional hardening:
- HMAC-SHA256 signatures.
- Ed25519 signatures and trust registry checks.
- Signed trust snapshot import/sync into local registries (
trust import-snapshot,trust sync). - AES-256-GCM payload encryption (
agentcapsule[signing], experimental optional extra). - Zstandard compression (
agentcapsule[compression], experimental optional extra). - Resumable reference fetching (
agentcapsule[fetch], experimental optional extra).
For trust sync, snapshot key entries must include inline public_key; public_key_path entries are rejected.
Current Limitations
- No hosted trust service: signature trust resolution is local-file policy/registry driven.
- No remote/global key-discovery protocol yet: receivers must supply local trust inputs.
- No first-party JS/TS reference implementation yet.
- Governance output is JSON-first; there is no built-in long-running dashboard service.
- Encryption, compression, and reference fetching are optional extras and currently experimental surfaces.
Typical Flow
- Sender packs payload into a capsule.
- Sender transports inline/attachment/reference.
- Receiver scans and ingests.
- Receiver verifies metadata, hashes, signature trust, and policy.
- Receiver unpacks verified payload into sandbox.
- Receiver runs downstream logic on unpacked files.
Install
PyPI:
python3 -m pip install agentcapsule
Full optional capabilities:
python3 -m pip install "agentcapsule[all]"
Individual optional extras:
python3 -m pip install "agentcapsule[signing]"
python3 -m pip install "agentcapsule[compression]"
python3 -m pip install "agentcapsule[fetch]"
Reference fetching support only:
python3 -m pip install "agentcapsule[fetch]"
Docs
Metadata
Release files for agentcapsule 0.1.4
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 |
|---|---|---|---|---|
| agentcapsule-0.1.4.tar.gz | 57.9 kB | With provenance | Details for agentcapsule-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentcapsule-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for agentcapsule-0.1.4-py3-none-any.whl |
Total release size: 106.8 kB
Release files / agentcapsule-0.1.4.tar.gz
| Download URL | agentcapsule-0.1.4.tar.gz |
|---|---|
| Size | 57.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9425d3f6c153d0b1132234391d210f13bdc784ba98fdb81041ca2f5f452fb6e
|
|
BLAKE2b-256 checksum How to use checksums |
b3b8ce917683b94d6074530321ab6b48ef726e00e56b3dc2e9bb529a218d837a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 16, 2026.
Transparency logRelease files / agentcapsule-0.1.4-py3-none-any.whl
| Download URL | agentcapsule-0.1.4-py3-none-any.whl |
|---|---|
| Size | 48.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30b787bf69674a9eafb877f824bf3bd730a06db8dec180a4148d250e6c86881c
|
|
BLAKE2b-256 checksum How to use checksums |
ede66d7307fc94e9b95a9fa0a834ba636079f76990a1a50f2c075de18ff79edd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 16, 2026.
Transparency logSecurity for agentcapsule 0.1.4
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 agentcapsule-0.1.4.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 May 16, 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.