KAKUNIN

AI Agent Identity: Cryptographic Verification & Compliance

What is AI Agent Identity?

AI agent identity is the cryptographic proof of who an autonomous system is, what it can do, and when it acted. Unlike human identity (passport, driver's license), agent identity is rooted in public key cryptography—specifically X.509 digital certificates issued and managed by trusted certificate authorities.

In regulated environments like fintech, trading, and EU jurisdictions, agent identity serves a critical function: it creates an immutable audit trail proving that a specific agent—not a human, not a generic service account—performed a transaction.

Core Components

1. X.509 Certificate Digital credential issued by a trusted CA (Certificate Authority) containing:

2. Private Key (in KMS) Cryptographic secret stored in Hardware Security Module (HSM) or AWS KMS—never exposed to application code.

3. Digital Signature Cryptographic proof that an agent authorized an action. Created by signing transaction data with the private key.

4. Audit Log (WORM) Write-Once-Read-Many append-only log proving when the agent acted, what it did, and what the outcome was.

Real-World Example

An AI trading bot operating under MiCA regulations:


Why Agents Need Cryptographic Identity

1. Regulatory Mandate: Non-Repudiation

EU AI Act (Article 12): High-risk AI systems must maintain "logging of the operation" and "human oversight." Cryptographic identity is the only way to prove an agent—not a human—made a decision.

MiCA (Articles 67–75): Crypto exchanges must ensure "operational resilience" and "segregation of duties." Agent identity enables automated enforcement: the system can prove which agent executed which trade and when.

GDPR (Article 22): Individuals have rights regarding "automated decision-making." Agent identity creates defensible audit trails proving the algorithm's logic.

Without cryptographic identity:

2. Operational Safety: Automated Revocation

An AI agent starts behaving abnormally. With cryptographic identity:

Without identity:

3. Developer Trust: Scope Isolation

In large microservices architectures, multiple agents operate simultaneously. Cryptographic identity enables scope enforcement:

Agent A (data processor):
  ✅ Read: /data/raw/*
  ✅ Write: /data/processed/*
  ❌ Access: /secrets/keys/

Agent B (reporting bot):
  ✅ Read: /data/processed/*
  ✅ Write: /reports/*
  ❌ Access: /data/raw/*

Each agent's certificate contains a scope policy. System enforces: "Agent B's key is valid, but Agent B's scope doesn't include /data/raw/—reject."

Without identity:


X.509 Certificate Requirements for AI Agents

Certificate Structure

An X.509 certificate for AI agents contains standard fields plus agent-specific extensions:

Certificate: {
  Version: 3
  Serial Number: f1d4e8c7b2a9f3e6
  Signature Algorithm: sha256WithRSAEncryption
  Issuer: Kakunin Root CA
  Validity: {
    Not Before: 2026-05-28
    Not After: 2027-05-28  (365 days for MiCA compliance)
  }
  Subject: {
    CommonName: ai_trading_bot_v2
    Organization: Immortal Reality PA LLC
  }
  Subject Public Key Info: {
    RSA 2048-bit key
  }
  Extensions: {
    keyUsage: digitalSignature
    extendedKeyUsage: clientAuth
    subjectAltName: ai_trading_bot_v2.kakunin.ai
    agentPolicy: {
      maxTransactionSize: 50000 USD
      allowedMarkets: [EUR_USD, GBP_USD]
      revocationTimeout: 15s
    }
  }
}

Cryptographic Requirements

RequirementDetailsReason
AlgorithmRSA 2048-bit minimumRegulatory baseline for financial systems
Validity365 days maxMiCA Art. 70 refresh cadence
Key StorageHSM/KMS onlyPrivate keys never on disk
Signature AlgorithmSHA-256 with RSANIST-approved, no collisions
Chain of TrustRoot CA → Intermediate → AgentEnables revocation at multiple levels

Issuance Workflow

  1. Agent Registration

    • System submits CSR (Certificate Signing Request)
    • Request includes agent scope (max transaction size, allowed markets)
    • Request signed with temporary key
  2. CA Validation

    • CA verifies requesting system identity
    • CA checks scope against regulatory limits
    • CA signs the certificate with its private key
  3. Installation

    • Certificate returned to system
    • Corresponding private key generated in KMS
    • Agent configured with cert + KMS ARN
  4. Monitoring

    • System monitors agent behavior in real-time
    • If risk score exceeds threshold, trigger revocation
    • Revocation published to OCSP responders

Kakunin Platform Integration

Kakunin automates the entire agent identity lifecycle.

1. Certificate Issuance (3 min setup)

curl -X POST https://api.kakunin.ai/v1/agents/certify \
  -H "Authorization: Bearer sk_prod_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "trading_bot_v2",
    "organization": "Acme Trading LLC",
    "max_transaction_size_usd": 50000,
    "allowed_markets": ["EUR_USD", "GBP_USD"],
    "validity_days": 365
  }'

Response:

{
  "certificate_pem": "-----BEGIN CERTIFICATE-----\n...",
  "kms_key_arn": "arn:aws:kms:eu-west-1:123456789:key/12345678-1234-1234-1234-123456789012",
  "serial_number": "f1d4e8c7b2a9f3e6",
  "valid_until": "2027-05-28",
  "agent_id": "trading_bot_v2"
}

Install the certificate in your application:

import { KakuninClient } from '@kakunin/sdk';

const kakunin = new KakuninClient({
  apiKey: process.env.KAKUNIN_API_KEY,
  kmsKeyArn: 'arn:aws:kms:eu-west-1:...',
});

// Sign a transaction
const signature = await kakunin.sign({
  payload: JSON.stringify(tradeRequest),
  agentId: 'trading_bot_v2',
});

// Submit with proof
await exchange.submitTrade({
  trade: tradeRequest,
  agentCertificate: certificatePem,
  signature: signature,
});

2. Real-Time Risk Monitoring

Kakunin continuously monitors agent behavior:

// Agent publishes behavioral events
await kakunin.recordEvent({
  agent_id: 'trading_bot_v2',
  action_type: 'trade_executed',
  metadata: {
    market: 'EUR_USD',
    size: 45000,  // within 50k limit
    direction: 'BUY',
    timestamp: Date.now(),
  },
});

// Kakunin computes risk score
// If score > 0.85, trigger auto-revocation

3. Automated Revocation

When risk exceeds threshold:

  1. Revocation event published

    certificate revoked at 2026-06-01T14:33:45Z
    reason: behavioral_anomaly (risk_score=0.87)
  2. OCSP responder updated

    • Within 5 seconds, OCSP returns "revoked"
    • All downstream systems reject signatures from revoked cert
  3. Audit logged

    INSERT INTO audit_log VALUES (
      event_type: 'certificate.revoked',
      agent_id: 'trading_bot_v2',
      reason: 'behavioral_anomaly',
      risk_score: 0.87,
      timestamp: '2026-06-01T14:33:45Z'
    );

4. Compliance Reporting

Export audit trails for regulators:

const report = await kakunin.complianceReport({
  agent_id: 'trading_bot_v2',
  start_date: '2026-01-01',
  end_date: '2026-06-01',
  include: ['trades', 'risk_events', 'revocations'],
});

// PDF report ready for regulator submission

Regulatory Compliance Mapping

EU AI Act

ArticleRequirementKakunin Solution
Article 12"Logging of the operation of high-risk AI systems"X.509 cert + immutable audit_log
Article 13"Appropriate human oversight"Risk scores + automated alerts
Article 14"Record-keeping"WORM audit trail, 7-year retention
Article 22Right to explanation (GDPR sync)Behavioral event logs explain why agent was revoked

MiCA

ArticleRequirementKakunin Solution
Article 67"Operational resilience"Automated revocation on anomaly
Article 68"Key management"KMS-only key storage, no material on disk
Article 70"Cert validity & renewal"Auto-refresh every 365 days
Article 72"Incident reporting"Event logging + incident classification

GDPR

ArticleRequirementKakunin Solution
Article 22"Right not to be subject to purely automated decisions"Audit trail proves whether human or agent acted
Article 32"Encryption & key management"RSA 2048 + AWS KMS
Article 34"Breach notification"Anomaly detection triggers incident response

Getting Started

  1. Create your first agent

    curl -X POST https://api.kakunin.ai/v1/agents \
      -H "Authorization: Bearer $KAKUNIN_API_KEY" \
      -d '{"name": "my_trading_bot"}'
  2. Issue X.509 certificate

    curl -X POST https://api.kakunin.ai/v1/agents/{id}/certify \
      -d '{"validity_days": 365}'
  3. Integrate with your system

    • Install Kakunin SDK (Node.js, Python, Go)
    • Use kakunin.sign() to cryptographically authorize actions
    • Publish events with kakunin.recordEvent()
  4. Monitor & maintain

    • View real-time risk scores in dashboard
    • Export compliance reports quarterly
    • Rotate certificates annually (auto-refresh available)

Resources