generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 508
feat(steering): add experimental steering for modular prompting #1280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dbschmigelski
merged 4 commits into
strands-agents:main
from
dbschmigelski:feat/steering
Dec 3, 2025
Merged
feat(steering): add experimental steering for modular prompting #1280
dbschmigelski
merged 4 commits into
strands-agents:main
from
dbschmigelski:feat/steering
Dec 3, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
zastrowm
added a commit
to zastrowm/docs
that referenced
this pull request
Dec 3, 2025
Includes documentation for: - The TypeScript SDK (https://github.com/strands-agents/sdk-typescript) - Bidirectional Streaming Agent (strands-agents/sdk-python#1276) - Evaluations (https://github.com/strands-agents/evals) - Steering (strands-agents/sdk-python#1280) ---- Co-authored-by: Aaron Farntrog <afarn@amazon.com> Co-authored-by: afarntrog <47332252+afarntrog@users.noreply.github.com> Co-authored-by: Arron Bailiss <arron@amazon.com> Co-authored-by: Chay Nabors <github@chaynabors.com> Co-authored-by: Dean Schmigelski <dbschmigelski+github@gmail.com> Co-authored-by: Jack Yuan <94985218+JackYPCOnline@users.noreply.github.com> Co-authored-by: Jack Yuan <jackypc@amazon.com> Co-authored-by: Jonathan Buck <jonabuck@amazon.com> Co-authored-by: Jonathan Segev <jsegev01@gmail.com> Co-authored-by: Mackenzie Zastrow <zastrowm@users.noreply.github.com> Co-authored-by: mehtarac <mehtarac@amazon.com> Co-authored-by: Murat Kaan Meral <muratkaanmeral@gmail.com> Co-authored-by: Murat Kaan Meral <murmeral@amazon.nl> Co-authored-by: Nicholas Clegg <ncclegg@amazon.com> Co-authored-by: Nick Clegg <nac542@gmail.com> Co-authored-by: Patrick Gray <pgrayy@amazon.com> Co-authored-by: poshinchen <pschen@amazon.com> Co-authored-by: Strands Agent <217235299+strands-agent@users.noreply.github.com>
Merged
6 tasks
mkmeral
approved these changes
Dec 3, 2025
JackYPCOnline
approved these changes
Dec 3, 2025
pgrayy
approved these changes
Dec 3, 2025
pgrayy
reviewed
Dec 3, 2025
zastrowm
approved these changes
Dec 3, 2025
7 tasks
zastrowm
added a commit
to strands-agents/docs
that referenced
this pull request
Dec 3, 2025
…eering (#355) Includes documentation for: - The TypeScript SDK (https://github.com/strands-agents/sdk-typescript) - Bidirectional Streaming Agent (strands-agents/sdk-python#1276) - Evaluations (https://github.com/strands-agents/evals) - Steering (strands-agents/sdk-python#1280) ---- Co-authored-by: Aaron Farntrog <afarn@amazon.com> Co-authored-by: afarntrog <47332252+afarntrog@users.noreply.github.com> Co-authored-by: Arron Bailiss <arron@amazon.com> Co-authored-by: Chay Nabors <github@chaynabors.com> Co-authored-by: Dean Schmigelski <dbschmigelski+github@gmail.com> Co-authored-by: Jack Yuan <94985218+JackYPCOnline@users.noreply.github.com> Co-authored-by: Jack Yuan <jackypc@amazon.com> Co-authored-by: Jonathan Buck <jonabuck@amazon.com> Co-authored-by: Jonathan Segev <jsegev01@gmail.com> Co-authored-by: Mackenzie Zastrow <zastrowm@users.noreply.github.com> Co-authored-by: mehtarac <mehtarac@amazon.com> Co-authored-by: Murat Kaan Meral <muratkaanmeral@gmail.com> Co-authored-by: Murat Kaan Meral <murmeral@amazon.nl> Co-authored-by: Nicholas Clegg <ncclegg@amazon.com> Co-authored-by: Nick Clegg <nac542@gmail.com> Co-authored-by: Patrick Gray <pgrayy@amazon.com> Co-authored-by: poshinchen <pschen@amazon.com> 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces Strands Steering, an experimental feature that solves the prompt bloat problem in complex multi-step agent tasks through modular prompting with progressive disclosure.
Traditional agent prompting requires front-loading all instructions into monolithic prompts. For complex workflows with 30+ steps, this leads to prompt bloat where agents ignore instructions, hallucinated behaviors, failed adherence to intended procedures.
Existing solutions like workflow frameworks improve predictability but sacrifice the adaptive reasoning that makes AI valuable.
Solution
Steering provides context-aware guidance that appears when relevant, rather than upfront. Key components:
SteeringHandler Base Class: Abstract base for implementing custom steering logic with
steer()method that returns SteeringActionsLLMSteeringHandler: Concrete implementation using natural language guidance via system prompts
Context Provider Architecture:
SteeringContextCallbackprotocol for event-specific context updatesSteeringContextProviderprotocol for multi-event context managementLedgerProvidertracks comprehensive tool call history and timingSteeringActions: Proceed, Guide (cancel + feedback), or Interrupt (human input)
Decision
We are leveraging Hooks as the extension mechanism for this feature. This architectural choice allows Steering to integrate seamlessly with the existing agent lifecycle by intercepting tool calls through the BeforeToolCallEvent, enabling context-aware guidance without modifying core agent behavior.
We focus on tool calls because they represent the only decision points where we can intervene and continue the agent loop - the agent loop is tool-focused, and when the LLM returns anything other than a tool call request, it becomes terminal.
Usage
Documentation PR
TODO
Type of Change
New feature
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.