Getting Started with AgDR v0.2

The Atomic Genesis Decision Record Standard provides autonomous agents with a tamper-evident, cryptographically signed record admissible in court.

⚡ Core Guarantee: Every inference is captured atomically, signed with BLAKE3, and persisted to a tamper-evident Merkle-append log.

1. Download the Spec

Download the canonical JSON specification to define your record structure:

curl -O https://raw.githubusercontent.com/aiccountability-source/AgDR/main/specs/agdr-v0.2.json

2. Install the Python SDK

The Atomic Kernel Inference (AKI) library is available via pip.

pip install agdr-aki

Or install directly from source:

git clone https://github.com/aiccountability-source/AgDR.git
                                cd AgDR/sdk/python
                                pip install -e .

3. Initialize Your First Capture

The SDK handles signing and Merkle persistence automatically.

from agdr import AtomicKernelInference
                                
                                # Initialize with your fiduciary key
                                aki = AtomicKernelInference(
                                    agent_id="agent-001",
                                    private_key_path="path/to/private_key.pem"
                                )
                                
                                # Capture an inference atomically
                                capture = aki.capture(
                                    provenance="User requested financial analysis",
                                    place="Target: generate compliant report",
                                    purpose="Fiduciary duty: accurate advice",
                                    payload={"model": "gpt-4", "temp": 0.7}
                                )
                                
                                print(f"Capture ID: {capture.id}")
                                print(f"Signature: {capture.signature.hex()}")
                                print(f"Merkle Root: {capture.merkle_root}")
📋 What Just Happened?
  • ✅ Hashed the inference payload with BLAKE3
  • ✅ Digitally signed the hash with your private key
  • ✅ Appended the record to a tamper-evident Merkle log
  • ✅ Returned a verifiable capture certificate

4. Verify Integrity

Anyone with the public key can independently verify a decision record.

from agdr import Verifier
                                
                                verifier = Verifier()
                                result = verifier.verify(capture_id="capture-abc123")
                                
                                if result.valid:
                                    print("✓ Signature valid")
                                    print("✓ Merkle proof verified")
                                    print("✓ No tampering detected")
                                else:
                                    print("✗ Capture invalid or compromised")
Component Description
sign(BLAKE3) Cryptographic signature over the full payload.
Merkle-append Immutable, verifiable entry into the global log.

5. Integrate with Your Agent Framework

Wrap your agent's decision points with AgDR captures to create an immutable audit trail.

class CompliantAgent:
                                    def __init__(self, aki):
                                        self.aki = aki
                                    
                                    def decide(self, input_data):
                                        capture = self.aki.capture(
                                            provenance=f"State: {self.get_state()}",
                                            place="Goal: make optimal decision",
                                            purpose="Alignment: maximize user benefit",
                                            payload=input_data
                                        )
                                        result = self._execute(input_data)
                                        result.capture_id = capture.id
                                        return result

Next Steps

📘 Read PPP Pillars → 💻 View on GitHub ⚙ Try the Sandbox
🔒 Legal Admissibility: AgDR records meet evidentiary standards globally. Cryptographic signatures, Merkle proofs, and atomic PPP capture create a contemporaneous record admissible under the Canada Evidence Act.