Python: added inline yaml sample#2582
Merged
moonbox3 merged 8 commits intomicrosoft:mainfrom Dec 4, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new Python sample demonstrating how to create an agent using an inline YAML definition string, making it easier to understand declarative agent creation without needing external YAML files. It also fixes a parameter naming issue in an existing sample.
- Added a new
inline_yaml.pysample showing inline YAML agent definition - Fixed the
get_weather_agent.pysample by explicitly naming thechat_clientparameter - Updated documentation to include the new sample
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
python/samples/getting_started/declarative/inline_yaml.py |
New sample demonstrating inline YAML agent creation with Azure AI Foundry credentials |
python/samples/getting_started/declarative/get_weather_agent.py |
Fixed parameter naming by explicitly using chat_client= keyword argument |
python/samples/getting_started/declarative/README.md |
Updated documentation to include the new inline YAML sample with description and usage instructions |
python/uv.lock |
Updated dependency lock file with newer versions of fastapi and modified platform markers |
python/.vscode/settings.json |
Added personal VS Code environment configuration settings |
dmytrostruk
approved these changes
Dec 2, 2025
addde48 to
02fd22c
Compare
Member
02fd22c to
ae8f729
Compare
TaoChenOSU
approved these changes
Dec 3, 2025
TaoChenOSU
approved these changes
Dec 3, 2025
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
* added inline yaml sample * fixed some typos and added intro comment * added description params and pass through to client * add azure assistants * fix tests * observabiltiy mypy fix * for some reason mypy doesn't accept a subclass --------- Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
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
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.
Motivation and Context
Added a sample using a inline yaml definition to simplify explaining this, and made a fix in one other sample.
Also added
descriptionfields to Foundry clients and Assistants clients and updated_update_namemethod toupdate_name_and_descriptionto propagate from Agent to ChatClient, when ChatClient values are not set.Closes: #2570
Description
Contribution Checklist