Skip to main content
POST
Check Guardrail
Evaluates content or an agent action against the tenant’s configured safety guardrails. The guardrails engine checks the input against all applicable policy rules and returns a deterministic allow/deny decision with detailed violation information. Guardrail checks are designed for inline use within orchestration flows. They execute in under 50ms for most rule sets, enabling real-time safety enforcement without significant latency overhead.

Circuit Breaker

The guardrails system includes a circuit breaker that automatically escalates to deny-all mode when the violation rate exceeds a configurable threshold within a rolling window. The circuit_breaker_status field in the response indicates the current state.

Authentication

string
required
API key with guardrails:check scope. Alternatively, pass a Bearer JWT token in the Authorization header.
string
required
Tenant identifier for multi-tenant isolation.

Request

string
required
MAIP agent identifier requesting the guardrail check.
string
Text content to evaluate against content safety rules. Provide either content or action_type (or both).
string
Action the agent intends to perform (e.g. send_email, modify_record, external_api_call, financial_transaction). Evaluated against action-level policy rules.
object
Additional context for rule evaluation. May include: - orchestration_id (string) — Parent orchestration for audit linkage - step_name (string) — Current workflow step - target_resource (string) — Resource being acted upon - user_id (string) — End user associated with the action - Any custom key-value pairs referenced by policy rules

Response

boolean
Whether the content/action is permitted. true if no violations were found, false if any blocking violation was triggered.
array
Array of rule violations found. Each violation contains: - rule_id (string) — Identifier of the triggered rule - severity (string) — Violation severity: info, warning, error, critical - message (string) — Human-readable description of the violation
string
Current circuit breaker state: closed (normal operation), open (deny-all mode active), or half_open (recovery testing).
integer
Total number of rules evaluated during the check.
number
Time taken to evaluate all rules in milliseconds.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Body

application/json
agent_id
string<uuid>
required

Agent requesting the action

action
string
required

Action being evaluated (e.g. invoke_tool, access_data)

context
object

Contextual information for evaluation

rules
string[]

Specific rule IDs to evaluate (empty = all rules)

Response

Guardrail check result

allowed
boolean
violations
object[]
receipt_id
string<uuid>