Aira

Agent Estate

Wills, death certificates, and compliance snapshots for agent lifecycle management — Phase 4 of the Aira accountability stack.

All endpoints require a Bearer token (Authorization: Bearer aira_live_xxxxx). Base URL: https://api.airaproof.com/api/v1

Set Agent Will

PUT /api/v1/estate/agents/{agent_slug}/will
Authorization: Bearer aira_live_xxxxx

Creates or updates the will for an agent. The will defines what happens when the agent is decommissioned — successor assignment, data retention policy, and notification rules.

Request Body

FieldTypeRequiredDescription
successor_slugstringNoAgent slug that inherits responsibilities
succession_policystringYestransfer_to_successor, archive, or delete
data_retention_daysintegerNoHow long to retain action records after death
notify_emailsstring[]NoEmail addresses to notify on death
instructionsstringNoFree-text instructions for succession

Notification Object

FieldTypeDescription
typestringemail, webhook, or slack
targetstringEmail address, webhook URL, or Slack channel

Example Request

curl -X PUT https://api.airaproof.com/api/v1/estate/agents/procurement-agent/will \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "successor_slug": "procurement-agent-v2",
    "succession_policy": "transfer_to_successor",
    "data_retention_days": 2555,
    "notify_emails": [
      { "type": "email", "target": "ops@example.com" },
      { "type": "webhook", "target": "https://example.com/hooks/agent-death" }
    ]
  }'

Response (200 OK)

{
  "agent_slug": "procurement-agent",
  "will": {
    "successor_slug": "procurement-agent-v2",
    "succession_policy": "transfer_to_successor",
    "data_retention_days": 2555,
    "notify_emails": [
      { "type": "email", "target": "ops@example.com" },
      { "type": "webhook", "target": "https://example.com/hooks/agent-death" }
    ],
    "updated_at": "2026-03-24T10:00:00.000Z"
  }
}

Error Codes

StatusCodeDescription
400INVALID_POLICYPolicy must be transfer, archive, or destroy
404AGENT_NOT_FOUNDAgent does not exist
404SUCCESSOR_NOT_FOUNDSuccessor agent slug does not exist

Get Agent Will

GET /api/v1/estate/agents/{agent_slug}/will
Authorization: Bearer aira_live_xxxxx

Returns the current will for an agent, or 404 if no will has been set.

Response (200 OK)

{
  "agent_slug": "procurement-agent",
  "will": {
    "successor_slug": "procurement-agent-v2",
    "succession_policy": "transfer_to_successor",
    "data_retention_days": 2555,
    "notify_emails": [
      { "type": "email", "target": "ops@example.com" },
      { "type": "webhook", "target": "https://example.com/hooks/agent-death" }
    ],
    "updated_at": "2026-03-24T10:00:00.000Z"
  }
}

Issue Death Certificate

POST /api/v1/estate/agents/{agent_slug}/death-certificate
Authorization: Bearer aira_live_xxxxx

Issues a death certificate for a decommissioned agent. The agent must already be decommissioned via POST /agents/{slug}/decommission before a death certificate can be issued. If a will exists, succession is triggered automatically.

Request Body

FieldTypeRequiredDescription
causestringYesCause of death (e.g. replaced, deprecated, security_incident, end_of_life)
notesstringNoAdditional context

Example Request

curl -X POST https://api.airaproof.com/api/v1/estate/agents/procurement-agent/death-certificate \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "cause": "replaced",
    "notes": "Replaced by procurement-agent-v2 with EU directive compliance"
  }'

Response (201 Created)

{
  "agent_slug": "procurement-agent",
  "death_certificate": {
    "certificate_id": "dc_01J9G...",
    "cause": "replaced",
    "notes": "Replaced by procurement-agent-v2 with EU directive compliance",
    "issued_at": "2026-03-24T12:30:00.000Z",
    "issued_by": "user_01J9C..."
  },
  "succession": {
    "triggered": true,
    "successor_slug": "procurement-agent-v2",
    "succession_policy": "transfer_to_successor",
    "transfer_receipt_id": "rct_01J9G..."
  }
}

Error Codes

StatusCodeDescription
404AGENT_NOT_FOUNDAgent does not exist
409ALREADY_DECEASEDDeath certificate already issued
422NOT_DECOMMISSIONEDAgent must be decommissioned before a death certificate can be issued

Get Death Certificate

GET /api/v1/estate/agents/{agent_slug}/death-certificate
Authorization: Bearer aira_live_xxxxx

Returns the death certificate for an agent, or 404 if none has been issued.

Response (200 OK)

{
  "agent_slug": "procurement-agent",
  "death_certificate": {
    "certificate_id": "dc_01J9G...",
    "cause": "replaced",
    "notes": "Replaced by procurement-agent-v2 with EU directive compliance",
    "issued_at": "2026-03-24T12:30:00.000Z",
    "issued_by": "user_01J9C..."
  },
  "succession": {
    "triggered": true,
    "successor_slug": "procurement-agent-v2",
    "succession_policy": "transfer_to_successor",
    "transfer_receipt_id": "rct_01J9G..."
  }
}

Create Compliance Snapshot

POST /api/v1/estate/compliance
Authorization: Bearer aira_live_xxxxx

Creates a point-in-time compliance snapshot for an agent against a regulatory framework. Snapshots are immutable once created.

Request Body

FieldTypeRequiredDescription
frameworkstringYesRegulatory framework (e.g. eu_ai_act, sr_11_7, gdpr, iso_42001)
agent_slugstringYesAgent to evaluate
findingsobject[]YesCompliance findings (see below)
overall_statusstringYescompliant, non_compliant, or partial
notesstringNoAuditor notes

Finding Object

FieldTypeDescription
requirementstringSpecific requirement (e.g. Art. 12 — Automatic logging)
statusstringpass, fail, or partial
evidencestringDescription of evidence or action IDs

Example Request

curl -X POST https://api.airaproof.com/api/v1/estate/compliance \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "framework": "eu_ai_act",
    "agent_slug": "procurement-agent",
    "findings": [
      {
        "requirement": "Art. 12 — Automatic logging",
        "status": "pass",
        "evidence": "All actions notarized with cryptographic receipts"
      },
      {
        "requirement": "Art. 14 — Human oversight",
        "status": "pass",
        "evidence": "Human authorization required for transactions > €1,000"
      }
    ],
    "overall_status": "compliant",
    "notes": "Reviewed by external compliance team"
  }'

Response (201 Created)

{
  "snapshot_uuid": "cs_01J9H...",
  "framework": "eu_ai_act",
  "agent_slug": "procurement-agent",
  "overall_status": "compliant",
  "finding_count": 2,
  "pass_count": 2,
  "fail_count": 0,
  "created_at": "2026-03-24T17:00:00.000Z",
  "created_by": "user_01J9C..."
}

Error Codes

StatusCodeDescription
400EMPTY_FINDINGSAt least one finding is required
404AGENT_NOT_FOUNDAgent does not exist

List Compliance Snapshots

GET /api/v1/estate/compliance?page=1&per_page=20
Authorization: Bearer aira_live_xxxxx

Returns a paginated list of compliance snapshots.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 20, max: 100)
frameworkstringFilter by framework
agent_slugstringFilter by agent

Response (200 OK)

{
  "snapshots": [
    {
      "snapshot_uuid": "cs_01J9H...",
      "framework": "eu_ai_act",
      "agent_slug": "procurement-agent",
      "overall_status": "compliant",
      "finding_count": 2,
      "created_at": "2026-03-24T17:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 12
  }
}

On this page