Agent guardrails

The Guardrails tab lets you configure logging and privacy settings, and assign guardrail artifacts to evaluate user input and agent output at runtime.

Logging and privacy

Daily User Token Rate

Specifies the maximum token limit available to all users within a 24-hour period. Set this to control costs and prevent unexpected token consumption across users of the agent.

Hide log content

When enabled, ensures logs contain metadata only. The input and output content will not be visible in the Agent Trace.

Input guardrails

Evaluate and filter user prompts before they reach the model to prevent malicious injections or off-topic requests.

Use the + Add button to assign one or more guardrail artifacts. At runtime, guardrails are executed in the order they are listed.

If any input guardrail returns a FAIL result, a content filter error is thrown and further processing is stopped. You can review the outcome in Agent Trace.

Output guardrails

Evaluate the model’s generated response to ensure it complies with safety, formatting, or brand guidelines before reaching the user.

Use the + Add button to assign one or more guardrail artifacts. At runtime, guardrails are executed in the order they are listed.

If the agent is configured to stream its results, a failing output guardrail does not retract the stream. The consuming side must handle the content filter error accordingly.

Order your guardrails in increasing complexity. Rules engine guardrails should come first, AI model and script-based guardrails should follow according to how complex they are.

The goal here is to "fail early" in order to avoid heavier computation if it is not absolutely necessary.