Skip to content

Feat/async wat refresh sample#1396

Open
guilhermegreco wants to merge 3 commits intoawslabs:mainfrom
guilhermegreco:feat/async-wat-refresh-sample
Open

Feat/async wat refresh sample#1396
guilhermegreco wants to merge 3 commits intoawslabs:mainfrom
guilhermegreco:feat/async-wat-refresh-sample

Conversation

@guilhermegreco
Copy link
Copy Markdown

@guilhermegreco guilhermegreco commented Apr 23, 2026

Amazon Bedrock AgentCore Samples Pull Request

Important

  1. We strictly follow a issue-first approach, please first open an issue relating to this Pull Request.
  2. Once this Pull Request is ready for review please attach review ready label to it. Only PRs with review ready will be reviewed.

Issue number: #1395

Concise description of the PR

Changes to add async WAT refresh sample under 03-AgentCore-identity, because long-running threaded agents lose the WAT after JWT expiration, causing orphaned workload identities. This sample demonstrates a companion library that propagates WAT to threads and coordinates refresh with the client.

User experience

Before: Developers running async agents with JWT inbound auth get orphaned workload identities when the WAT expires mid-task.
After: Developers use @with_wat_refresh decorator and ThreadTaskManager to automatically pause, refresh, and retry — no orphans, user binding preserved.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • Add your name to CONTRIBUTORS.md
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you uploading a dataset?
  • Have you documented Introduction, Architecture Diagram, Prerequisites, Usage, Sample Prompts, and Clean Up steps in your example README?
  • I agree to resolve any issues created for this example in the future.
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@github-actions github-actions Bot added 01-tutorials 01-tutorials 03-AgentCore-identity 01-tutorials/03-AgentCore-identity labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

01-tutorials 01-tutorials 03-AgentCore-identity 01-tutorials/03-AgentCore-identity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant