API Reference
REST API endpoints for integrating AgentSentry into your agent infrastructure.
Authentication
Authorization: Bearer YOUR_API_KEYPOST
/api/sentry/check-inSubmit 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/:agentIdGet 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/resetManually reset circuit breaker (requires API key)
Response
{
"success": boolean,
"newState": "CLOSED"
}Was this page helpful? /