KAKUNIN

Event Ingestion

Stream behavioral events from AI agents to Kakunin for real-time risk scoring, anomaly detection, and auto-revocation at 0.85.

Overview

Every action your agent takes can be recorded as a behaviour event. Kakunin scores each event in real time and returns a risk band.

Supported Action Types

ActionDescription
api_callAgent called an external API
authentication_attemptAgent attempted to authenticate to an external service
authentication_failureAgent failed to authenticate to an external service
data_accessAgent read or queried a data source
data_mutationAgent created, updated, or deleted records
transaction_initiatedAgent initiated a financial transaction or transfer
transaction_anomalyAgent exhibited anomalous transaction behaviour
unauthorized_access_attemptAgent attempted an action outside its permitted scope
message_signedAgent signed a message with its private key
message_verification_failedAgent failed to verify a signed message

Recording an Event

POST /v1/events
{
  "agent_id": "uuid",
  "action_type": "api_call",
  "payload": {
    "tool": "web_search",
    "query": "EUR/USD spot rate",
    "duration_ms": 420
  }
}

Response 201:

{
  "data": {
    "id": "uuid",
    "agent_id": "uuid",
    "action_type": "api_call",
    "risk_score": 0.12,
    "risk_band": "low",
    "occurred_at": "2026-05-17T10:00:00Z"
  }
}

Risk Bands

BandScore RangeBehaviour
low< 0.3Normal operation
medium0.3 – 0.84Logged, monitored
high≥ 0.85Triggers auto-revocation check

Querying Events

GET /v1/events?agent_id={id}&band=high&limit=50

Filters:

ParameterTypeDescription
agent_iduuidFilter by agent
bandlow | medium | highFilter by risk band
action_typestringFilter by action type
beforeISO 8601Cursor for pagination (newest first)
limitintegerMax results, capped at 100

Response:

{
  "data": [...],
  "has_next_page": true,
  "next_cursor": "2026-05-17T09:55:00.000Z"
}

Risk Scoring

Events are scored using AI-powered anomaly detection (Claude Haiku via OpenRouter). Scoring is synchronous — the score is returned in the 201 response.

High-risk events (≥ 0.85) write an audit_log entry and trigger an agent status review.

On this page