Skip to main content

Cryptographic provenance for AI-generated code

Project description

agentmark

Cryptographic provenance for AI-generated code.

agentmark proves that code traveled through a verified autonomous AI pipeline with no direct human write path — and provides a verifiable audit trail for every commit.

spec license tests

Installation

pip install agentmark

# With provider support
pip install agentmark[anthropic]
pip install agentmark[openai]
pip install agentmark[all]

What it does

agentmark attaches a cryptographically verifiable manifest to every AI-generated commit:

{
  "version": "1.0",
  "provider": "anthropic",
  "model": "claude-sonnet-4-20250514",
  "request_id": "req_011CZRtQztYq...",
  "output_hash": "sha256:a1b2c3d4...",
  "challenge_token": "agentmark-3f9a2b1c4d5e6f7a",
  "challenge_echo_verified": true,
  "pipeline_key": "my-pipeline-v1",
  "signature": "TuBWjzVsxEwy33mS..."
}

The manifest proves:

  • output_hash — committed code matches raw LLM response byte-for-byte
  • challenge_token — the LLM processed this specific task
  • request_id — a real API call happened at the declared provider
  • signature — a registered pipeline identity signed this commit

Quick start

import agentmark
from agentmark import ChallengeRegistry, PipelineRegistry

# Issue challenge for the task
challenge = ChallengeRegistry().issue("myorg/myrepo#42")

# Call LLM with provenance capture
result = agentmark.call(
    provider="anthropic",
    model="claude-sonnet-4-20250514",
    prompt="Implement a signing function.",
    challenge_token=challenge,
)

# Sign the manifest
manifest = agentmark.sign(
    result=result,
    pipeline_key="my-pipeline-v1",
    private_key_bytes=ed25519_private_key_bytes,
)

# Verify (runs in CI)
result = agentmark.verify(manifest, result.raw_bytes)

Security

Core dependency: cryptography >= 46.0.0 (pyca — 82M+ weekly downloads, actively maintained).

agentmark does not depend on LiteLLM or any AI gateway proxy. Provider SDKs are optional extras. We call provider APIs directly.

Links

License

Apache 2.0

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

agentmark-0.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

agentmark-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file agentmark-0.1.0.tar.gz.

File metadata

  • Download URL: agentmark-0.1.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for agentmark-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cae170ea7f21a626c689a6ed04d81af9cc47e6dfebf0e85b4e6a319f3238f51b
MD5 908c357c8015a85a91510727b46423d7
BLAKE2b-256 78b39eb260748d8ae5b4259ab6999a7e0d5b74263ca3d4a789639a7e68439e72

See more details on using hashes here.

File details

Details for the file agentmark-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentmark-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for agentmark-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1915936ec9302f53f5d7698e92ae36df425d369f4199adb1ee447ed8beb23e10
MD5 a792c2e84dd4dbc000a08ecb77a9d60f
BLAKE2b-256 c10a6d502dee86c19fc779f5a5b0eb5f3a3d49e3848751f86ec34d2fd5c757cd

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