Original article excerpt
Server-side extracted preview paragraphs from the original source.
Today, we’re announcing a new API with Amazon Bedrock Guardrails. With this API, you can apply individual safeguards, also referred to as safety checks, at any point in your agentic AI applications without creating guardrail resources. In this post, we walk through how the InvokeGuardrailChecks API works and how to use it to build safe, multi-turn agentic AI applications.
Today, we’re announcing a new API with Amazon Bedrock Guardrails. With this API, you can apply individual safeguards, also referred to as safety checks, at any point in your agentic AI applications without creating guardrail resources. The new InvokeGuardrailChecks API gives you the flexibility to invoke supported safeguards at any turn in the agentic loop and take the required action in your application logic. The API operates in detect-only mode and returns numeric scores for each safeguard. You can define custom thresholds and actions in your applications to block, bypass, retry, or log results for auditing purposes based on your specific requirements.
Amazon Bedrock Guardrails provides configurable safeguards to help you build safe generative AI applications. With comprehensive safety controls across foundation models, Amazon Bedrock Guardrails helps you detect and filter undesirable content and protect sensitive information in both user inputs and model responses.
The new InvokeGuardrailChecks API extends these capabilities for agentic AI applications with multi-turn workflows. AI agents plan tasks, invoke tools, process outputs, and iterate through loops, often without direct user interaction. Each step in this loop carries a different risk profile and requires different safeguards. With the InvokeGuardrailChecks API, you can apply the checks you need, where you need them, without the operational overhead of provisioning separate guardrail resources for each stage. The API returns a numeric score that helps you define your own threshold and action for your application. In this post, we walk through how the InvokeGuardrailChecks API works and how to use it to build safe, multi-turn agentic AI applications.
Generative AI applications typically follow a familiar pattern: a user sends a prompt, the model responds, and a guardrail evaluates both. You create one guardrail resource, configure your policies, and apply it uniformly.
AI agents work differently. They operate in loops, receiving input, generating a response, and repeating multiple turns in a conversation. A single user session might involve 10, 20, or more turns. Each turn has two stages where safety checks matter: before the content goes to the model (input), and before the model response goes back to the user (output).
Consider a multi-turn customer support agent that handles varied requests across a conversation:
