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.2.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.2-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.2-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.2-cp310-abi3-manylinux_2_38_aarch64.whl (9.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.38+ ARM64

jacs-0.11.2-cp310-abi3-macosx_11_0_arm64.whl (9.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

jacs-0.11.2-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.2.tar.gz.

File metadata

  • Download URL: jacs-0.11.2.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.2.tar.gz
Algorithm Hash digest
SHA256 51942ea24f23347d7d47a45de61e0c84e0b09195dc9bfb4923b50233ae97ee48
MD5 35b7c3df31c72524314a069dc8d7926c
BLAKE2b-256 72635f45ae8ab05ed0a87d49f0c4b0d0c22d8a6141d23c89c11cd7c98b16fd66

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.2.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.2-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for jacs-0.11.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6157d3876e4aa6c15acc2c16b69600cbd0d767b71f6bb8aa5186344d4caf64e3
MD5 76be0f1ded383c8237e004a237d6fd7e
BLAKE2b-256 5daf0225ff7b56cf733bbf692210683abcf71111d4fbecda85ec10746930e44b

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.2-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.2-cp310-abi3-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for jacs-0.11.2-cp310-abi3-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 e0b697e850541a476a8ff81d5ecb51502e1b06e73a77a122cfa53dcc7aad2993
MD5 a23e1a111dc48ab125bc804fb408fa8d
BLAKE2b-256 bfc6d00eee4c70411b7040743c753479b61cc17b2283c371732e9a595b82fd1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.2-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.2-cp310-abi3-manylinux_2_38_aarch64.whl.

File metadata

File hashes

Hashes for jacs-0.11.2-cp310-abi3-manylinux_2_38_aarch64.whl
Algorithm Hash digest
SHA256 2fed7c965f683f430da659f63246d7d790b6b3a5c12402015843e944a15ae2e9
MD5 a6e89937e6f125f5ed83a83256ec51a7
BLAKE2b-256 113f75044b6d48ccb91f73d7fa33a27fccfd5dcff3b65d9241beb7d8c401bc3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.2-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.2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for jacs-0.11.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 14f856b1c6f8a30bbe5ea62a33c7862c6c68e3a2816376a970316729e25babff
MD5 d187d7fa373e51dad22511accbb2375e
BLAKE2b-256 842d2c5266a9d3bbdfd22d26feeb14ec2cc6e68cb6293ddb8ea0af66670eae26

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.2-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.2-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for jacs-0.11.2-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6d3e8aba3372a8f988741035b332a5051b44bc29ab064d4434c134ab2c32911f
MD5 b31d98bdc16b16059d917ff9e995bfd3
BLAKE2b-256 4b202ccc12193dc12f3a4fa982c085cb6434f2702a558250389e6aa10b744728

See more details on using hashes here.

Provenance

The following attestation bundles were made for jacs-0.11.2-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