Agent Capsule Protocol for inspectable text-native artifact transfer
Project description
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_messages
result = ingest_messages(
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.
- AES-256-GCM payload encryption.
- Zstandard compression.
- Resumable reference fetching.
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]"
Reference fetching support only:
python3 -m pip install "agentcapsule[fetch]"
Docs
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 agentcapsule-0.1.3.tar.gz.
File metadata
- Download URL: agentcapsule-0.1.3.tar.gz
- Upload date:
- Size: 45.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
423460e2f85485e87009012ece00e1753e05ad401f3ab392cc7fb7715dcc529f
|
|
| MD5 |
f03cdc19bafeb4c55b7740166f1068ad
|
|
| BLAKE2b-256 |
d2f5b964b373a7967f13c20d5cbbcfa315204cff5b11eb6003edde031be93fa1
|
Provenance
The following attestation bundles were made for agentcapsule-0.1.3.tar.gz:
Publisher:
pypi-publish.yml on arikyp/agentcapsule
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentcapsule-0.1.3.tar.gz -
Subject digest:
423460e2f85485e87009012ece00e1753e05ad401f3ab392cc7fb7715dcc529f - Sigstore transparency entry: 1545861308
- Sigstore integration time:
-
Permalink:
arikyp/agentcapsule@1707dbda459d71dd0a5439da27804a8af4a54c6f -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/arikyp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@1707dbda459d71dd0a5439da27804a8af4a54c6f -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentcapsule-0.1.3-py3-none-any.whl.
File metadata
- Download URL: agentcapsule-0.1.3-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44ad2fd47097af5b49b4e47dd021bc6259015a63139d4fad1f91740155504e5a
|
|
| MD5 |
bb34609b48518bba240b51383c491405
|
|
| BLAKE2b-256 |
faf8c2506c236747fe5a251bfe6629058f38f7734aecf309b8e611c1486f13c1
|
Provenance
The following attestation bundles were made for agentcapsule-0.1.3-py3-none-any.whl:
Publisher:
pypi-publish.yml on arikyp/agentcapsule
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentcapsule-0.1.3-py3-none-any.whl -
Subject digest:
44ad2fd47097af5b49b4e47dd021bc6259015a63139d4fad1f91740155504e5a - Sigstore transparency entry: 1545861393
- Sigstore integration time:
-
Permalink:
arikyp/agentcapsule@1707dbda459d71dd0a5439da27804a8af4a54c6f -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/arikyp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@1707dbda459d71dd0a5439da27804a8af4a54c6f -
Trigger Event:
push
-
Statement type: