The action AgentOS should take based on this evaluation
Optional reasonHuman-readable reason for the action. May be shown to end users or logged for audit.
Optional reasonMachine-readable code identifying the policy or rule triggered. Useful for analytics and automated handling.
Optional metadataAdditional metadata for analytics, audit, or debugging. Persisted in response chunk metadata.
Optional detailsDetailed information about the evaluation (e.g., moderation scores, stack traces, matched patterns). Not shown to users.
Optional modifiedReplacement text when action is GuardrailAction.SANITIZE. For input evaluation: replaces textInput before orchestration. For output evaluation: replaces textDelta (streaming) or finalResponseText (final).
Result returned by a guardrail evaluation.
Contains the action to take and optional context about why. This result is attached to response chunk metadata for observability.
Example