Skip to main content

JACS - JSON AI Communication Standard: Cryptographic signing and verification for AI agents.

Project description

JACS Python Library

Cryptographic identity, signing, and verification for AI agents from Python.

pip install jacs

Prebuilt native bindings are distributed via maturin. A normal install does not require compiling Rust.

Full documentation | Quick Start

Quick start

import jacs.simple as jacs

info = jacs.quickstart(name="my-agent", domain="my-agent.example.com")
signed = jacs.sign_message({"action": "approve", "amount": 100})
result = jacs.verify(signed.raw)
print(f"Valid: {result.valid}, Signer: {result.signer_id}")

quickstart() creates a persistent agent with keys on disk. If jacs.config.json exists, it loads it; otherwise it creates a new agent.

Core operations

Operation Description
quickstart(name, domain) Create or load a persistent agent
load() Load an existing agent from config
sign_message() Sign JSON-serializable data
sign_file() Sign a file with optional embedding
verify() Verify a signed document
verify_standalone() Verify without loading an agent
create_agreement_v2() Create a standalone Agreement v2 document
sign_agreement_v2() Sign as signer, witness, or notary
verify_agreement_v2() Verify Agreement v2 hash, policy, transcript, and status
export_agent() Export agent JSON for sharing
audit() Run a security audit

Text and image provenance

Python exposes the same inline text and image signing surface as the CLI:

import jacs.simple as jacs
from jacs import MissingSignatureError

jacs.load("./jacs.config.json")

# Markdown/text: append and verify an inline signature block.
jacs.sign_text("README.md")
text = jacs.verify_text("README.md")
print(text.status)  # 'signed' | 'missing_signature' | 'malformed'

try:
    jacs.verify_text("README.md", strict=True)
except MissingSignatureError:
    print("not signed")

jacs.verify_text("README.md", key_dir="./trusted-keys/")

# Images: embed and verify a signature in PNG, JPEG, or WebP metadata.
jacs.sign_image("photo.png", out="signed.png")
image = jacs.verify_image("signed.png")
print(image.status)  # 'valid'

payload = jacs.extract_media_signature("signed.png")

The same methods are available on the instance-based JacsClient for multi-agent processes. These signatures prove that an agent signed specific canonical bytes at its claimed time; they do not prove first creation or legal ownership.

Verify without an agent

result = jacs.verify_standalone(signed_json, key_directory="./keys")

Cross-language interop is tested on every commit. Documents signed in Rust or Node.js verify in Python, and Python-signed documents verify in the other bindings.

Agreement v2

Use Agreement v2 for new multi-agent consent workflows:

from jacs import SimpleAgent

agent, info = SimpleAgent.ephemeral(algorithm="ed25519")
agent_id = info["agent_id"]

agreement = agent.create_agreement_v2({
    "title": "Refund approval",
    "description": "Approval for a bounded refund.",
    "terms": "Refund up to $25 for order 123.",
    "status": "proposed",
    "parties": [{"agentId": agent_id, "agentType": "ai", "role": "signer"}],
    "signaturePolicy": {"partyQuorum": "all", "witnessRequired": 0, "notaryRequired": 0},
    "controllers": [agent_id],
})

signed = agent.sign_agreement_v2(agreement, "signer")
assert agent.verify_agreement_v2(signed)["valid"]

The same operations are available as module-level functions once an agent is loaded (quickstart() / create() / load()), matching Node's @hai.ai/jacs/simple surface:

import jacs.simple as jacs

jacs.quickstart(name="my-agent", domain="agent.example.com")
agent_id = jacs.get_agent_info().agent_id

agreement = jacs.create_agreement_v2({
    "title": "Refund approval",
    "description": "Approval for a bounded refund.",
    "terms": "Refund up to $25 for order 123.",
    "status": "proposed",
    "parties": [{"agentId": agent_id, "agentType": "ai", "role": "signer"}],
    "signaturePolicy": {"partyQuorum": "all", "witnessRequired": 0, "notaryRequired": 0},
    "controllers": [agent_id],
})

signed = jacs.sign_agreement_v2(agreement, "signer")
assert jacs.verify_agreement_v2(signed)["valid"]

Verifying another agent's agreement signature requires that agent's public key, so distinct agents must share a data_directory or exchange public keys; ephemeral agents verify only their own signatures.

The older create_agreement() / sign_agreement() / check_agreement() methods remain for simple jacsAgreement sidecars on existing documents.

Framework adapters

pip install jacs[langchain]    # LangChain / LangGraph
pip install jacs[fastapi]      # FastAPI / Starlette
pip install jacs[crewai]       # CrewAI
pip install jacs[anthropic]    # Anthropic / Claude SDK
pip install jacs[a2a]          # A2A protocol
pip install jacs[all]          # Everything

Instance-based API

For multiple agents in one process:

from jacs.client import JacsClient

client = JacsClient.quickstart(name="my-agent", domain="example.com")
signed = client.sign_message({"action": "approve"})

See DEVELOPMENT.md for the full API reference, advanced usage, framework adapter examples, and testing utilities.

Links

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

jacs-0.11.3.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

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

jacs-0.11.3-cp310-abi3-musllinux_1_2_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

jacs-0.11.3-cp310-abi3-manylinux_2_38_x86_64.whl (9.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.38+ x86-64

jacs-0.11.3-cp310-abi3-manylinux_2_38_aarch64.whl (9.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.38+ ARM64

jacs-0.11.3-cp310-abi3-macosx_11_0_arm64.whl (9.0 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

jacs-0.11.3-cp310-abi3-macosx_10_12_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file jacs-0.11.3.tar.gz.

File metadata

  • Download URL: jacs-0.11.3.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for jacs-0.11.3.tar.gz
Algorithm Hash digest
SHA256 20b698495754922ba3e24614f59272894de13ae8a9f793afea69d0020cdd408b
MD5 e3ced95697981411cb6a05b9ed096f52
BLAKE2b-256 9481fc0145eb4be45cdc892855dc6716d4a5dfac4f1dde40325fc5fe41092639

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.3.tar.gz:

Publisher: release-pypi.yml on HumanAssisted/JACS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jacs-0.11.3-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for jacs-0.11.3-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b374d7032da134c1674fb5e256ad9dcbac51e3f005f980f49bdb0c19934f596e
MD5 b9ceeb8813920ea30bf6df757ebc2894
BLAKE2b-256 f501dec9ba3022d53832db7693aeebd6ffa85fcadc86cd6f72bd3431e9fb7f27

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.3-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release-pypi.yml on HumanAssisted/JACS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jacs-0.11.3-cp310-abi3-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for jacs-0.11.3-cp310-abi3-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 d2402778ddbbeb078e0bdc70f6410047fb7d4adc739f6ab72e00ffb8cea7112f
MD5 ed649b7542256919f6ae7a7b536afdb5
BLAKE2b-256 af3a5b4bf28dcf9614582c9cef26c746eeea5ddc323a47052dfc2f04e34bee1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.3-cp310-abi3-manylinux_2_38_x86_64.whl:

Publisher: release-pypi.yml on HumanAssisted/JACS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jacs-0.11.3-cp310-abi3-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for jacs-0.11.3-cp310-abi3-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 28fffc80798aa03125d7ba86854d8afe70ac1e3e0b519a597281697c2eab5a5d
MD5 7b332f604bee87bc0dd433c80ddeef7f
BLAKE2b-256 732011af3e04a87a670cb4398acc3368d715384389d4d40719c2451452a17fb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.3-cp310-abi3-manylinux_2_38_aarch64.whl:

Publisher: release-pypi.yml on HumanAssisted/JACS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jacs-0.11.3-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jacs-0.11.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6f3ce03aefb2b42ba7256f730fb54259f458bcf5d3fbd6becc751a6e81168e7
MD5 dc666b18c962b66d183ff967571dbb35
BLAKE2b-256 c88809ad7f74f47e72040fbd7bd7133b0bcc6448d50005267e8ebecd7b2208aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.3-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release-pypi.yml on HumanAssisted/JACS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jacs-0.11.3-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jacs-0.11.3-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f4db44fec63bd6e0c952ffa7a64faf355f2948443f159436aa90d8f645f9e2c8
MD5 ac7eb628dcc5ff4fef5dfd4983fbe623
BLAKE2b-256 674aedc97075aedd7f1915a9571e8e2b637157bebfea53d7e10c9959317544fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.3-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release-pypi.yml on HumanAssisted/JACS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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