DocumentationReference
Developers

API Reference

Robust, secure, and developer-friendly endpoints for execution memory and side-effect coordination for AI agents.

Authentication

All API requests must include your monitor or project API Key in the X-API-Key header.

Example Curl

curl -H "X-API-Key: YOUR_API_KEY" https://api.your-domain.com/api/v1/...

Guard API Endpoints

POST

/api/guards/effect/begin

Begin a side effect — checks deduplication, writes EXECUTING status. Returns CONFLICT if another agent is already executing the same operation.

Request Body

{
  "executionId": "exec_abc123",
  "fingerprint": "hash_of_operation",
  "type": "STRIPE_OPERATION",
  "target": "stripe-charge",
  "inputHash": "hash_of_inputs",
  "provider": "stripe",
  "workflowId": "wf_order_123",
  "agentId": "agent_order_processor"
}
POST

/api/guards/effect/commit

Commit a side effect — transitions EXECUTING → COMMITTED, stores result and provider-native receipt.

POST

/api/guards/effect/unknown

Mark a side effect UNKNOWN — transitions EXECUTING → UNKNOWN. Called when the SDK operation times out with no confirmed response.

POST

/api/guards/effect/failed

Mark a side effect FAILED — transitions EXECUTING → FAILED. Called when the SDK operation throws an error (non-timeout).

POST

/api/guards/resume/:workflowId

Reconcile and retrieve recovery plan for a workflow. Returns a ContinuationPlan with SKIP, RETRY, and BLOCK actions.

POST

/api/guards/reconcile/:workflowId

Trigger reconciliation of all UNKNOWN side effects for a workflow. Resolves UNKNOWN effects via provider verification without computing a continuation plan.

GET

/api/agents/:agentId/effects

Returns all side effects for a given agent across all executions in the project. Used for agent fleet visibility and execution memory queries.

Monitoring Endpoints

POST

/api/heartbeats

Updates the status of the monitor associated with the API key. Triggers incident recovery if the monitor was previously down.

Request Body (Optional)

{
  "status": "success",
  "metadata": {
    "server": "us-east-1",
    "version": "1.0.4"
  }
}
POST

/api/sentinel/telemetry

High-fidelity endpoint for infrastructure telemetry. Used by the Sentinel CLI to report secure tunnel health, network latency, and cryptographic handshake age.

Request Body

{
  "type": "TUNNEL",
  "metrics": {
    "handshakeAge": 124,  // in seconds
    "latency": 18.5,       // in milliseconds
    "peerCount": 1
  },
  "config": {
    "publicKey": "base64_string...",
    "endpoint": "vpn.example.com"
  }
}
GET

/api/analytics/overview

Returns aggregated health scores, uptime trends, and active failure patterns for all infrastructure sentinels.