Creating and Using Agreements

Agreements enable multi-party consent in JACS. Any signed document can carry agreement metadata so multiple agents can approve the same payload.

What is an Agreement?

An agreement:

  • Lists required signers
  • Records collected signatures
  • Supports quorum rules
  • Optionally constrains signing algorithms
  • Preserves the hash of the content being approved

Agreement Lifecycle

1. Create agreement -> 2. Share document -> 3. Agents sign -> 4. Verify status

Creating Agreements

jacs document create-agreement \
  -f ./document.json \
  -i agent1-uuid,agent2-uuid

Include a question and context when the payload needs human-readable review:

{
  "jacsAgreement": {
    "question": "Do you approve deploying this configuration?",
    "context": "Production rollout",
    "agentIDs": ["agent1-uuid", "agent2-uuid"]
  }
}

Signing Agreements

jacs document sign-agreement -f ./document-with-agreement.json

Use a different configuration to sign as another agent:

JACS_CONFIG_PATH=./agent2.config.json jacs document sign-agreement -f ./document.json

Checking Agreement Status

jacs document check-agreement -f ./document.json

This reports which agents signed, which signatures are still required, and whether quorum has been met.

Agreement Structure

{
  "$schema": "https://hai.ai/schemas/header/v1/header.schema.json",
  "jacsId": "doc-uuid",
  "jacsType": "document",
  "content": {
    "change": "Deploy model v2"
  },
  "jacsAgreement": {
    "question": "Do you approve this payload?",
    "context": "Deployment approval",
    "agentIDs": [
      "550e8400-e29b-41d4-a716-446655440000",
      "123e4567-e89b-12d3-a456-426614174000"
    ],
    "quorum": 2,
    "signatures": []
  },
  "jacsAgreementHash": "hash-of-agreement-content"
}

Agreement Options

Timeout

agreement = client.create_agreement(
    document=proposal,
    agent_ids=[alice.agent_id, bob.agent_id],
    timeout="2025-12-31T23:59:59Z"
)

Quorum

agreement = client.create_agreement(
    document=proposal,
    agent_ids=[alice.agent_id, bob.agent_id, carol.agent_id],
    quorum=2
)

Algorithm Constraints

agreement = client.create_agreement(
    document=proposal,
    agent_ids=agent_ids,
    required_algorithms=["pq2025"],
    minimum_strength="post-quantum"
)

See Also