Signing#

Provenance and trust for AgentPM artifacts.

Goal#

AgentPM attaches signatures to published packages so consumers can verify what they’re installing.

There are two, complementary signatures:

  1. Author-signing (optional per namespace) — you sign the package at publish time using an Ed25519 key you control.
  2. Registry-attested — the AgentPM registry signs the package on receipt to attest what it stored. New-format releases require successful attestation before publication.
Signing mode

Signing mode is set per namespace on your profile (“Manage” button): off | optional | required. Required mode needs at least one valid registered author signature. Off and optional do not require one, but every supplied author signature must be valid.

Key concepts#

  • Author keypairs live locally and are passphrase-encrypted on disk.
  • Namespaces own the signer allow-list. You must register your public key with the namespace before using it to sign.
  • Publish flow can be gated: if a namespace is set to required, the registry will reject unsigned publishes or keys not on the allow-list.
  • Explicit signing must succeed: agentpm publish --sign fails if the key is unregistered/inactive, the statement does not match, or the signature is invalid, including in optional namespaces. Register a key separately in each Registry environment you publish to.
  • Key IDs are display fingerprints: CLI and Registry use the same 16-character fingerprint. Verification matches the full public key. Existing local key filenames stay valid.

CLI workflows#

1) Local key management: agentpm keys#

Generate, list, and export public keys.

# Create a new Ed25519 keypair (stores encrypted private key locally)
agentpm keys generate --label "Zack Prod CLI Key"
# → prompts twice for a passphrase
# → prints key id and storage path
 
# List local keys
agentpm keys list
# ZPVjHbC9CN0-cKTk   Zack Prod CLI Key   2025-10-25T21:20:47.646678Z
 
# Export the public key (base64, 32 bytes) for registration
agentpm keys export --key-id ZPVjHbC9CN0-cKTk --out pub.txt

2) Namespace signer management: agentpm namespace#

Add or revoke signers on a namespace (auth required).

# Add a signer (public key) to a namespace
agentpm namespace add-signer --namespace your-namespace --label "Zack Prod" --pubkey pub.txt
# stdin also supported if --pubkey is omitted
 
# Revoke a signer (by id displayed in UI)
agentpm namespace revoke-signer --namespace your-namespace --signer-id <UUID>
UI Note

Create keys locally and register signer public keys through the CLI. The website lists existing signers and allows revoke/deactivate actions, but it does not provide an add-signer flow.

End-to-end author-sign flow (example)#

# 1) Create a local key, export public key
agentpm keys generate --label "Zack Prod CLI Key"
agentpm keys export --key-id ZPVjHbC9CN0-cKTk --out pub.txt
 
# 2) Register the public key with your namespace
agentpm namespace add-signer --namespace your-namespace --label "Zack Prod" --pubkey pub.txt
 
# 3) Publish with signing
agentpm publish --namespace your-namespace --sign --key-id ZPVjHbC9CN0-cKTk
# → prompts for key passphrase, uploads signed package

If your namespace requires author-signing and you forget --sign, you’ll see:

Error: HTTP 422: signature_required: At least one valid registered author signature is required

An unregistered key produces unregistered_signer with an instruction to register the public key in the publish namespace. An inactive key produces inactive_signer. A failed signed attempt does not become an unsigned successful publication. If an older Registry does not confirm signature acceptance, the CLI reports that failure; check the published version's signing state before retrying with a new version. Signatures cannot be attached retroactively to an already-published unsigned version.

What gets signed#

  • Author-signed statement (Ed25519). At publish time, the author signs a small JSON “statement” that includes the tool identity and the SHA-256 digest of the packaged tarball. The signature is an Ed25519 signature over the UTF-8 bytes of that JSON, base64-encoded.

Example:

{
  "name": "wikipedia-scrape",
  "type": "agentpm.package.signature.v1",
  "kind": "tool",
  "version": "0.1.3",
  "createdAt": "2025-10-25T21:31:05Z",
  "artifactDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
  • Registry attestation. After upload, the registry creates its own attested signature for the stored artifact. agentpm install --require-attestation verifies that signature using the Registry's authenticated public key list, using the root public key shipped with the CLI. Legacy Registry signing failures retain their historical behavior, so an attestation may be absent; such a package cannot satisfy this flag.

Example:

{
  "name": "wikipedia-scrape",
  "type": "agentpm.registry.attestation.v2",
  "kind": "tool",
  "version": "0.1.3",
  "storedAt": "2025-10-25T21:31:08Z",
  "namespace": "zack",
  "registryKeyId": "apm-prod-1",
  "artifactDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "publishedByAccountId": "user_xxx"
}

Best practices#

  • Use per-machine keys with clear labels; keep passphrases in your password manager.
  • Register only the keys you intend to use for a namespace. Revoke unused ones.
  • Automate in CI: materialize the encrypted author key JSON as a private runner file and supply its passphrase separately with AGENTPM_KEY_PASSPHRASE; select it with --sign --key-file. Never store raw private-key bytes as the recommended CI secret.
  • Require verified provenance with --require-signature and/or --require-attestation when installing.

Release-format statements#

New-format Python Tool publication uses agentpm.package.signature.v2 author statements and agentpm.registry.attestation.v3 Registry statements. Both bind the same release digest: one signature covers the qualified package name/version, manifest, recorded Python resolution and complete target-artifact inventory. The Registry independently verifies stored artifact hashes and sizes before publication. A missing Registry signing key or failed attestation write leaves the new-format release unpublished.

The official Registry uses the new release format for newly published Python Tools; other package kinds retain their legacy single-archive publication format. Existing author v1 and Registry v1/v2 signatures retain their historical byte format, including the older agentpm.package.attestation.v1 Registry variant. These old attestations can be verified without republishing their packages.

CLI 0.1.42 or newer also verifies the original agentpm.tool.signature.v1 author statements on historical Tool releases, including statements that omit kind. This compatibility uses the original signed bytes and still requires matching package identity, version, Tool kind and artifact digest, plus a valid Ed25519 signature. New publications continue using agentpm.package.signature.v1 or v2 as appropriate; no historical release needs to be rewritten or republished.

Ordinary signer revocation prevents new publications with that key. Signatures accepted while the key was authorized remain attached to their historical versions; current activation/revocation status is reported separately.

Verify during installation#

agentpm install @namespace/tool --require-signature --require-attestation

--require-signature requires at least one cryptographically valid author signature from the namespace's recorded publish-time signers. A namespace requiring signing enforces that policy even without the flag. A signer's current revoked status is separate from whether its historically accepted signature remains valid.

--require-attestation verifies the Registry's actual signature, including for already-published legacy packages. The CLI authenticates the Registry signing-key list using an audited root public key shipped with the CLI. It does not trust a boolean badge, a truncated digest or an arbitrary public key beside a signature. Retired Registry keys remain available for old attestations.

The official Registry serves a root-signed agentpm.registry.keyset.v1 document at /v1/registry/signing-keys. The CLI verifies its RFC 8785/JCS canonical payload with the pinned root before trusting attestation keys. Unconfigured roots, unknown keys, invalid signatures and expired key lists produce errors. Only authenticated, unexpired key lists can be reused from the local cache. Normal legacy installs without an attestation requirement still allow unattested packages where namespace policy permits them.

The Security tab exposes new-format release integrity, available artifact digests and scan results, and recorded signing information. It does not perform browser cryptographic verification or treat ordinary signer revocation as proof that an old package was altered. CLI 0.1.43+ verifies the release and selected artifact before installation. See Releases and Integrity for the complete chain.