Home/Docs/API Reference

API Reference

REST API endpoints for integrating AgentSentry into your agent infrastructure.

Authentication

Authorization: Bearer YOUR_API_KEY
POST/api/sentry/check-in

Submit a transaction for validation before execution

Request Body
{
  "agentId": "string",
  "action": "swap" | "transfer" | "stake" | "lp",
  "params": {
    "value": number,
    "destination": "string",
    "token": "string"
  }
}
Response
{
  "verdict": "ALLOW" | "BLOCK" | "ESCALATE",
  "reason": "string",
  "ruleTriggered": "string | null",
  "circuitState": "CLOSED" | "OPEN" | "HALF_OPEN"
}
GET/api/sentry/circuit/:agentId

Get current circuit breaker state for an agent

Response
{
  "state": "CLOSED" | "OPEN" | "HALF_OPEN",
  "failureCount": number,
  "lastFailure": "ISO8601 | null",
  "nextReset": "ISO8601 | null"
}
POST/api/sentry/circuit/:agentId/reset

Manually reset circuit breaker (requires API key)

Response
{
  "success": boolean,
  "newState": "CLOSED"
}

Was this page helpful? /