Skip to content

Add Code Interpreter Samples#47820

Open
kaylieee wants to merge 45 commits intomainfrom
kaylieee/sample/add-agents-samples
Open

Add Code Interpreter Samples#47820
kaylieee wants to merge 45 commits intomainfrom
kaylieee/sample/add-agents-samples

Conversation

@kaylieee
Copy link
Member

Issue #47763

This pull request adds sample files demonstrating tool use with Azure AI Agents.

@kaylieee kaylieee changed the title Add code interpreter sample Add Agents Samples Jan 27, 2026
@github-actions github-actions bot added the AI label Jan 27, 2026
Copy link
Member

@jpalvarezl jpalvarezl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@kaylieee kaylieee marked this pull request as ready for review February 4, 2026 02:20
@kaylieee kaylieee requested review from a team, dargilco and trrwilson as code owners February 4, 2026 02:20
Copy link
Member

@jpalvarezl jpalvarezl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a few fundamental changes we need to make to this sample. It's mostly good, but I think we can simplify it a bit. Let's talk in our standup about it :)

@kaylieee kaylieee changed the title Add Agents Samples Add Code Interpreter Samples Feb 20, 2026

AgentVersionDetails agent = null;

try {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you probably don't need this try as you are not catching anything. You can also get rid of the finally.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used try-finally for guaranteed cleanup (eg. if an exception occurs after agent creation), but I can simplify it if that's preferred for readability.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's good, in that case you should then add a catch block for printing the error. Generally try are used with a catch block so, it's okay to use as long as we are catching something. In my experience, just using try/finally is not so common, you'd generally use all 3 blocks.

jpalvarezl
jpalvarezl previously approved these changes Feb 23, 2026
Base automatically changed from jpalvarezl/feature/update-agents to main February 24, 2026 19:34
@jpalvarezl jpalvarezl dismissed their stale review February 24, 2026 19:34

The base branch was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants