Skip to main content

CommandLayer Python SDK — semantic verbs, signed receipts, and verification helpers.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commandlayer-1.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commandlayer-1.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file commandlayer-1.1.0.tar.gz.

File metadata

  • Download URL: commandlayer-1.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for commandlayer-1.1.0.tar.gz
Algorithm Hash digest
SHA256 08b9557042cebbc4d03b1143f6b64a24fda08fa4b15de873b648126925be6bfe
MD5 05cf19b923f97ec50421794c5eadb1bf
BLAKE2b-256 3eb2b092fdf4fbe606bc441f6dc9b20b49dc77eedb4fb1d3b91de429fbed43bf

See more details on using hashes here.

File details

Details for the file commandlayer-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: commandlayer-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for commandlayer-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f844798cc7d94bf375a3ee7d7895214105cf26f8c661c758389a8bbb6ebcb627
MD5 dec34a9ba735a7fee8278bf63aa67172
BLAKE2b-256 6a67876e132a21e3d358297a37541cec27dc717758c072a83b993b5af6f81d46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page