Documentation Index
Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/v1/guardrails
Create a guardrail rule.
Request Body
| Field | Type | Required | Description |
|---|
key | string | Yes | Unique guardrail key |
name | string | Yes | Guardrail name |
description | string | No | Description of the constraint |
severity | string | No | "hard" (blocks decision, default) or "soft" (warns only) |
expressionAst | object | No | Expression AST defining the guardrail condition |
status | string | No | "active" (default) or "paused" |
Example
curl -X POST https://playground.kaireonai.com/api/v1/guardrails \
-H "Content-Type: application/json" \
-H "X-Tenant-Id: my-tenant" \
-d '{
"key": "max-daily-spend",
"name": "Maximum Daily Spend Guard",
"description": "Prevents decisions that would exceed daily budget allocation",
"severity": "hard",
"status": "active"
}'
Response
{
"id": "gr_abc123",
"key": "max-daily-spend",
"name": "Maximum Daily Spend Guard",
"description": "Prevents decisions that would exceed daily budget allocation",
"severity": "hard",
"expressionAst": {},
"status": "active",
"tenantId": "my-tenant",
"createdAt": "2026-03-17T10:00:00Z",
"updatedAt": "2026-03-17T10:00:00Z"
}
GET /api/v1/guardrails
List all guardrails for the tenant.
Response
Returns an array of guardrail objects.
PUT /api/v1/guardrails
Update a guardrail by key. Supports optimistic concurrency via rowVersion.
Request Body
| Field | Type | Required | Description |
|---|
key | string | Yes | Guardrail key to update |
name | string | No | Updated name |
description | string | No | Updated description |
type | string | No | Guardrail type |
config | object | No | Type-specific configuration |
conditions | any | No | Condition definitions |
priority | integer | No | Evaluation priority (0+) |
severity | string | No | "hard" or "soft" |
expressionAst | object | No | Updated expression AST |
status | string | No | "draft", "active", "paused", or "archived" |
scope | string | No | Guardrail scope |
rowVersion | integer | No | Optimistic concurrency check. If provided and does not match the current version, returns 409 Conflict. |
DELETE /api/v1/guardrails
Soft-delete a guardrail by key.
Query Parameters
| Parameter | Type | Required | Description |
|---|
key | string | Yes | Guardrail key to delete |
Response 200