generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 463
feat: Add Structured Output as part of the agent loop #943
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
afarntrog
merged 41 commits into
strands-agents:main
from
afarntrog:strucuted_output_891_pr
Oct 22, 2025
Merged
Changes from 6 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
dd86a56
feat: Implement comprehensive structured output system
afarntrog dceb617
Add user instruction message when forcing structured output
afarntrog 75a0ce7
add readme with model provider examples
afarntrog b543cec
rm output file extra
afarntrog 099e70a
rm lock file
afarntrog 882fcd6
update readme
afarntrog 7f2d73e
Refactor structured output from handler to context pattern
afarntrog 4979771
make instance variable
afarntrog b9f9456
Refactor structured output to use cached tool_specs property
afarntrog 36bd507
Refactor: Rename structured_output_type to structured_output_model
afarntrog dba8828
Remove NativeMode and PromptMode output classes
afarntrog fb274ac
cleanup
afarntrog dcc6ac4
cleanup
afarntrog 45dd56b
use model instead of type
afarntrog 7ad09b2
Refactor: Remove OutputSchema abstraction, pass StructuredOutputConte…
afarntrog 9003fdd
Update type hints to use modern union syntax
afarntrog 7b192a1
hatch fmt --formatter
afarntrog 89ea3c6
Refactor structured output handling and improve error reporting
afarntrog 247e9c4
Change structured_output_context default to empty instance
afarntrog eeb97be
cleanup
afarntrog 8f5ffad
cleanup
afarntrog a42171c
Refactor structured_output module and improve type safety
afarntrog cfb39f5
Make structured output context optional and update formatting
afarntrog 32750ec
Add comprehensive test coverage for structured output and core compon…
afarntrog d05379e
feat: implement comprehensive structured output system
afarntrog abb0ee0
Improve deprecation warnings and update mypy config
afarntrog ab915b6
merge main
afarntrog f0a0f4d
feat: add structured output support and improve code formatting
afarntrog 73d8734
refactor: extract shared noop tool to common utility module
afarntrog 1d9a367
typing
afarntrog 9a65ca0
typing
afarntrog f98fc8b
update tests
afarntrog ac42209
update tests
afarntrog 8e295ca
updates tests
afarntrog ceeeda7
updates tests
afarntrog a3f5cf3
updates tests
afarntrog 64697bf
Merge branch 'main' into strucuted_output_891_pr
afarntrog f805590
updates tests
afarntrog 70eb096
updates tests
afarntrog 05d84de
updates tests
afarntrog 13e22e5
updates tests
afarntrog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,22 @@ | ||
| """A framework for building, deploying, and managing AI agents.""" | ||
|
|
||
| from . import agent, models, telemetry, types | ||
| from . import agent, models, output, telemetry, types | ||
| from .agent.agent import Agent | ||
| from .output import NativeMode, OutputSchema, PromptMode, ToolMode | ||
| from .tools.decorator import tool | ||
| from .types.tools import ToolContext | ||
|
|
||
| __all__ = ["Agent", "agent", "models", "tool", "types", "telemetry", "ToolContext"] | ||
| __all__ = [ | ||
| "Agent", | ||
| "agent", | ||
| "models", | ||
| "output", | ||
| "NativeMode", | ||
| "OutputSchema", | ||
| "PromptMode", | ||
| "tool", | ||
| "ToolContext", | ||
| "ToolMode", | ||
| "types", | ||
| "telemetry", | ||
| ] |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.