Unispec Docs
ApiAgents

Add a rule

`escalation` rules short-circuit the LLM and return the fallback message. `forbidden`/`required` rules are injected as prompt constraints.

POST
/v1/agents/{name}/rules

escalation rules short-circuit the LLM and return the fallback message. forbidden/required rules are injected as prompt constraints.

Authorization

TokenAuth
Authorization<token>

Project API key as Token lb-sk_...

In: header

Path Parameters

name*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/agents/string/rules" \  -H "Content-Type: application/json" \  -d '{    "type": "escalation",    "condition": "chargeback,dispute"  }'
{  "id": "string",  "rule_type": "escalation",  "condition": "string",  "action": "string",  "priority": 0}