Skip to content

feat: Add sagemaker-rft subpackage for multi-turn RFT customer integr…#5603

Open
xiaoxshe wants to merge 1 commit intoaws:masterfrom
xiaoxshe:feature/aws-rft-sdk-integration
Open

feat: Add sagemaker-rft subpackage for multi-turn RFT customer integr…#5603
xiaoxshe wants to merge 1 commit intoaws:masterfrom
xiaoxshe:feature/aws-rft-sdk-integration

Conversation

@xiaoxshe
Copy link
Collaborator

@xiaoxshe xiaoxshe commented Mar 6, 2026

…ation

Add new sagemaker-rft namespace subpackage providing SDK utilities for integrating customer agents with the multi-turn reinforcement fine-tuning (RFT) training platform.

Components:

  • RolloutRequest/RolloutMetadata/InferenceParams: Pydantic contract models
  • RolloutFeedbackClient: Reports rollout completion and rewards to trainer
  • make_inference_headers/get_inference_headers: X-Metadata header utilities
  • set_rollout_context/clear_rollout_context: Thread-safe context management
  • @rft_handler: Decorator for AgentCore Runtime entrypoints
  • Strands adapter (wrap_model): Auto-injects headers into Strands models
  • LangChain adapter (create_http_clients): httpx clients with header injection

Supports three integration patterns:

  1. Strands + AgentCore (decorator-based, minimal changes)
  2. Strands Standalone (context-based, manual reporting)
  3. Custom Integration (direct header injection, any framework)

Issue #, if available:

Description of changes:

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

…ation

Add new sagemaker-rft namespace subpackage providing SDK utilities for
integrating customer agents with the multi-turn reinforcement fine-tuning
(RFT) training platform.

Components:
- RolloutRequest/RolloutMetadata/InferenceParams: Pydantic contract models
- RolloutFeedbackClient: Reports rollout completion and rewards to trainer
- make_inference_headers/get_inference_headers: X-Metadata header utilities
- set_rollout_context/clear_rollout_context: Thread-safe context management
- @rft_handler: Decorator for AgentCore Runtime entrypoints
- Strands adapter (wrap_model): Auto-injects headers into Strands models
- LangChain adapter (create_http_clients): httpx clients with header injection

Supports three integration patterns:
1. Strands + AgentCore (decorator-based, minimal changes)
2. Strands Standalone (context-based, manual reporting)
3. Custom Integration (direct header injection, any framework)
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