Skip to content

feat: integrate Bedrock AgentCore Runtime with JWT authentication#6

Merged
IanLiYi1996 merged 3 commits into
mainfrom
dev
Feb 6, 2026
Merged

feat: integrate Bedrock AgentCore Runtime with JWT authentication#6
IanLiYi1996 merged 3 commits into
mainfrom
dev

Conversation

@IanLiYi1996
Copy link
Copy Markdown
Owner

Summary

  • Add AWS Bedrock AgentCore Runtime integration for AI agent processing
  • Implement Cognito JWT token auto-refresh mechanism (refreshes 60 seconds before expiry)
  • Add two-phase CDK deployment support for AgentCore (infrastructure first, then runtime)
  • Update documentation to reflect current architecture

Changes

Backend (AgentCore)

  • FastAPI backend with Claude Agent SDK integration
  • AgentCore Runtime deployed via CDK Custom Resource
  • ARM64 container support for Bedrock AgentCore

Frontend

  • JWT token refresh using OIDC discovery
  • AgentCoreAuthError handling with 401 response support
  • SSE streaming for agent chat responses

Infrastructure

  • skipRuntimeCreation flag for two-phase deployment
  • Runtime name validation fix (underscores instead of hyphens)
  • Updated IAM permissions for bedrock-agentcore-control APIs

Test plan

  • CDK deployment successful
  • AgentCore Runtime status: READY
  • ECS Fargate service: ACTIVE (1/1 running)
  • Static assets uploaded to S3
  • CloudFront cache invalidated

🤖 Generated with Claude Code

ianleely and others added 3 commits February 5, 2026 08:31
Backend (new):
- FastAPI server with Claude Agent SDK integration
- Session management with slide detection
- Unified /invocations endpoint for AgentCore routing
- Permission callback system for tool execution

Deployment (new):
- Dockerfile for ARM64 AgentCore container
- Shell scripts for ECR build/push and AgentCore deployment
- Config template for AWS environment variables

Frontend updates:
- AgentCoreClient with JWT token authentication
- Expose Cognito tokens (accessToken/idToken) in NextAuth session
- Route agent chat through AgentCore when configured

Infrastructure (new CDK constructs):
- AgentCoreConstruct for runtime deployment
- FargateNextJsService for frontend (simplified)
- Updated main stack with AgentCore integration

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add Cognito JWT token auto-refresh mechanism (60s before expiry)
- Add AgentCoreAuthError handling for 401 responses in chat API
- Fix AgentCore construct for two-phase deployment (skipRuntimeCreation)
- Fix runtime name validation (use underscores instead of hyphens)
- Update .gitignore with Python cache and CDK output patterns
- Update README documentation to reflect current architecture

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Automatically creates GitHub releases when tags matching 'v*' are pushed.
Includes changelog generation from commits since previous tag.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@IanLiYi1996 IanLiYi1996 merged commit 21f99ac into main Feb 6, 2026
4 of 6 checks passed
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.

1 participant