Skip to content

docs(bedrock): add guardrail_latest_message parameter documentation#562

Merged
Unshure merged 3 commits intomainfrom
agent-tasks/554
Feb 18, 2026
Merged

docs(bedrock): add guardrail_latest_message parameter documentation#562
Unshure merged 3 commits intomainfrom
agent-tasks/554

Conversation

@Unshure
Copy link
Copy Markdown
Member

@Unshure Unshure commented Feb 18, 2026

Summary

Adds documentation for the guardrail_latest_message parameter added in SDK commit 08bf563.

Changes

  • Added guardrail_latest_message=True to the Guardrails code example in amazon-bedrock.md
  • Added admonition note explaining when and why to use this parameter (performance optimization, cost reduction, multi-turn conversations)

Technical Details

When guardrail_latest_message=True:

  • Only the last user message is evaluated by guardrails instead of the entire conversation
  • Useful for performance optimization and reducing costs in multi-turn conversations

Note

PR #340 also addresses this documentation gap. This PR follows the exact implementation requirements from issue #554 (using True in the example and admonition note formatting).

Resolves #554

Add documentation for the new guardrail_latest_message parameter that
allows evaluating only the latest user message instead of the entire
conversation when using Amazon Bedrock guardrails.

- Add parameter to code example with descriptive comment
- Add note explaining use cases for performance optimization and cost reduction

Resolves #554
@Unshure
Copy link
Copy Markdown
Member Author

Unshure commented Feb 18, 2026

/strands delete the unnecessary build logs

@strands-agent
Copy link
Copy Markdown
Contributor

Documentation Deployment Complete

Your documentation preview has been successfully deployed!

Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-562/

@Unshure Unshure marked this pull request as draft February 18, 2026 20:24
@Unshure Unshure marked this pull request as ready for review February 18, 2026 20:24
@Unshure Unshure merged commit e77f9a8 into main Feb 18, 2026
5 checks passed
daniel-was-taken pushed a commit to daniel-was-taken/docs-strands that referenced this pull request Mar 6, 2026
…trands-agents#562)

Co-authored-by: Strands Agent <217235299+strands-agent@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NEW CONTENT] Bedrock guardrail_latest_message

3 participants