Skip to main content

CommandLayer Python SDK

Official Python SDK for CommandLayer Commons v1.1.0.

The Python package mirrors the TypeScript SDK's protocol model:

  • client methods return { "receipt": ..., "runtime_metadata": ... },
  • the signed receipt is the canonical verification payload,
  • runtime_metadata is optional execution context, and
  • verification can use an explicit Ed25519 key or ENS discovery.

Install

pip install commandlayer

Supported Python versions: 3.10+.

Quick start

from commandlayer import create_client, verify_receipt

client = create_client(actor="docs-example")
response = client.summarize(
    content="CommandLayer makes agent execution verifiable.",
    style="bullet_points",
)

print(response["receipt"]["result"]["summary"])
print(response["receipt"]["metadata"]["receipt_id"])
print(response.get("runtime_metadata", {}).get("duration_ms"))

verification = verify_receipt(
    response["receipt"],
    public_key="ed25519:BASE64_PUBLIC_KEY",
)
print(verification["ok"])

Verification

result = verify_receipt(
    response["receipt"],
    ens={
        "name": "summarizeagent.eth",
        "rpcUrl": "https://mainnet.infura.io/v3/YOUR_KEY",
    },
)

Development

cd python-sdk
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
ruff check .
mypy commandlayer
pytest

Metadata

Release files for commandlayer 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for commandlayer 1.1.0
File Size Uploaded
commandlayer-1.1.0.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for commandlayer 1.1.0
File Interpreter ABI Platform
commandlayer-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.1 kB

Release files / commandlayer-1.1.0.tar.gz

Download URL commandlayer-1.1.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
08b9557042cebbc4d03b1143f6b64a24fda08fa4b15de873b648126925be6bfe
BLAKE2b-256 checksum
How to use checksums
3eb2b092fdf4fbe606bc441f6dc9b20b49dc77eedb4fb1d3b91de429fbed43bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / commandlayer-1.1.0-py3-none-any.whl

Download URL commandlayer-1.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f844798cc7d94bf375a3ee7d7895214105cf26f8c661c758389a8bbb6ebcb627
BLAKE2b-256 checksum
How to use checksums
6a67876e132a21e3d358297a37541cec27dc717758c072a83b993b5af6f81d46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page