Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt

Use this file to discover all available pages before exploring further.

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

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

Request

agent_id
string
required
MAIP agent identifier requesting the guardrail check.
content
string
Text content to evaluate against content safety rules. Provide either content or action_type (or both).
action_type
string
Action the agent intends to perform (e.g. send_email, modify_record, external_api_call, financial_transaction). Evaluated against action-level policy rules.
context
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

allowed
boolean
Whether the content/action is permitted. true if no violations were found, false if any blocking violation was triggered.
violations
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
circuit_breaker_status
string
Current circuit breaker state: closed (normal operation), open (deny-all mode active), or half_open (recovery testing).
evaluated_rules
integer
Total number of rules evaluated during the check.
evaluation_ms
number
Time taken to evaluate all rules in milliseconds.