Aira

Agents

Register, version, and manage autonomous agent identities — Phase 2 of the Aira accountability stack.

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

Register Agent

POST /api/v1/agents
Authorization: Bearer aira_live_xxxxx

Registers a new agent identity. The agent_slug becomes the permanent identifier and cannot be changed after creation.

Request Body

FieldTypeRequiredDescription
agent_slugstringYesUnique slug (lowercase alphanumeric and hyphens only, e.g. claims-processor)
namestringYesHuman-readable name
descriptionstringNoWhat this agent does
capabilitiesstring[]NoList of declared capabilities (e.g. ["tool_call", "transaction", "communication"])
metadataobjectNoArbitrary key-value metadata

Example Request

curl -X POST https://api.airaproof.com/api/v1/agents \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_slug": "procurement-agent",
    "name": "Procurement Agent",
    "description": "Handles vendor selection and purchase order approval",
    "capabilities": ["tool_call", "transaction", "decision"],
    "metadata": {
      "team": "operations",
      "environment": "production"
    }
  }'

Response (201 Created)

{
  "agent_slug": "procurement-agent",
  "name": "Procurement Agent",
  "description": "Handles vendor selection and purchase order approval",
  "capabilities": ["tool_call", "transaction", "decision"],
  "status": "active",
  "owner_id": "org_01J9A...",
  "created_at": "2026-03-24T10:00:00.000Z",
  "request_id": "req_01J9A..."
}

Error Codes

StatusCodeDescription
400INVALID_SLUGSlug must be lowercase alphanumeric with hyphens, 3-64 chars
409SLUG_TAKENAn agent with this slug already exists

List Agents

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

Returns a paginated list of agents owned by your organization.

Response (200 OK)

{
  "agents": [
    {
      "agent_slug": "procurement-agent",
      "name": "Procurement Agent",
      "status": "active",
      "current_version": "1.2.0",
      "action_count": 1847,
      "created_at": "2026-03-24T10:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 5
  }
}

Get Agent

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

Returns full agent detail including version history.

Response (200 OK)

{
  "agent_slug": "procurement-agent",
  "name": "Procurement Agent",
  "description": "Handles vendor selection and purchase order approval",
  "capabilities": ["tool_call", "transaction", "decision"],
  "status": "active",
  "owner_id": "org_01J9A...",
  "current_version": "1.2.0",
  "versions": [
    {
      "version": "1.2.0",
      "instruction_hash": "sha256:a1b2c3d4...",
      "published_at": "2026-03-20T08:00:00.000Z",
      "changelog": "Added multi-currency support"
    },
    {
      "version": "1.1.0",
      "instruction_hash": "sha256:e5f6g7h8...",
      "published_at": "2026-03-10T12:00:00.000Z",
      "changelog": "Improved vendor scoring"
    }
  ],
  "metadata": {
    "team": "operations",
    "environment": "production"
  },
  "created_at": "2026-03-24T10:00:00.000Z"
}

Update Agent

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

Updates mutable agent fields. The slug cannot be changed.

Request Body

FieldTypeRequiredDescription
namestringNoUpdated name
descriptionstringNoUpdated description
capabilitiesstring[]NoUpdated capabilities
metadataobjectNoUpdated metadata (replaces existing)

Response (200 OK)

Returns the updated agent object.


Publish Version

POST /api/v1/agents/{agent_slug}/versions
Authorization: Bearer aira_live_xxxxx

Publishes a new version of the agent. Each version captures the instruction hash so actions can be traced back to the exact instruction set.

Request Body

FieldTypeRequiredDescription
versionstringYesSemantic version (e.g. 1.3.0)
instruction_hashstringYesSHA-256 hash of the agent's instruction set
changelogstringNoWhat changed in this version

Example Request

curl -X POST https://api.airaproof.com/api/v1/agents/procurement-agent/versions \
  -H "Authorization: Bearer aira_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "version": "1.3.0",
    "instruction_hash": "sha256:b9c8d7e6f5...",
    "changelog": "Added compliance checks for EU procurement directives"
  }'

Response (201 Created)

{
  "agent_slug": "procurement-agent",
  "version": "1.3.0",
  "instruction_hash": "sha256:b9c8d7e6f5...",
  "changelog": "Added compliance checks for EU procurement directives",
  "published_at": "2026-03-24T11:00:00.000Z"
}

Error Codes

StatusCodeDescription
409VERSION_EXISTSThis version number has already been published
422AGENT_DECOMMISSIONEDCannot publish versions for a decommissioned agent

List Versions

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

Returns all published versions for the agent, ordered by publish date descending.


Decommission Agent

POST /api/v1/agents/{agent_slug}/decommission
Authorization: Bearer aira_live_xxxxx

Permanently decommissions an agent. This blocks all future action notarization for this agent. Existing records are preserved. This action is irreversible.

Request Body

FieldTypeRequiredDescription
reasonstringYesReason for decommissioning

Response (200 OK)

{
  "agent_slug": "procurement-agent",
  "status": "decommissioned",
  "decommissioned_at": "2026-03-24T12:00:00.000Z",
  "reason": "Replaced by procurement-agent-v2"
}

Transfer Ownership

POST /api/v1/agents/{agent_slug}/transfer
Authorization: Bearer aira_live_xxxxx

Transfers agent ownership to another organization. The transfer is cryptographically signed and recorded in the agent's audit trail.

Request Body

FieldTypeRequiredDescription
target_org_idstringYesOrganization ID to transfer to
signaturestringYesCryptographic signature authorizing the transfer

Response (200 OK)

{
  "agent_slug": "procurement-agent",
  "previous_owner": "org_01J9A...",
  "new_owner": "org_01J9B...",
  "transferred_at": "2026-03-24T13:00:00.000Z",
  "transfer_receipt_id": "rct_01J9C..."
}

Error Codes

StatusCodeDescription
400INVALID_SIGNATURETransfer signature verification failed
404TARGET_ORG_NOT_FOUNDTarget organization does not exist

Agent Actions

GET /api/v1/agents/{agent_slug}/actions?page=1&per_page=20
Authorization: Bearer aira_live_xxxxx

Returns a paginated list of all actions notarized by this agent.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 20, max: 100)
action_typestringFilter by action type
statusstringFilter by status

Public Agent Identity (Public)

GET /api/v1/agents/public/{agent_slug}

Public endpoint — no authentication required. Returns the agent's public identity page for external verification.

Response (200 OK)

{
  "agent_slug": "procurement-agent",
  "name": "Procurement Agent",
  "description": "Handles vendor selection and purchase order approval",
  "capabilities": ["tool_call", "transaction", "decision"],
  "status": "active",
  "current_version": "1.3.0",
  "owner_verified": true,
  "action_count": 1847,
  "created_at": "2026-03-24T10:00:00.000Z"
}

On this page