Skip to content

.NET: Add Container Apps Dynamic Sessions sample - #9009

Draft
Naveen Chatlapalli (1aifanatic) wants to merge 3 commits into
microsoft:mainfrom
1aifanatic:contrib/6863-container-apps-sessions
Draft

Naveen Chatlapalli (1aifanatic) wants to merge 3 commits into
microsoft:mainfrom
1aifanatic:contrib/6863-container-apps-sessions

Conversation

@1aifanatic

@1aifanatic Naveen Chatlapalli (1aifanatic) commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Motivation & Context

Agent Framework needs a .NET example of agent-generated Python running in an Azure Container Apps Dynamic Sessions pool.

Description & Review Guide

  • What are the major changes? Add a function-tool sample using the existing HTTP, Azure identity, and Foundry libraries, with setup guidance and solution/sample-index entries.
  • What is the impact of these changes? The application owns the endpoint and per-run session ID. Calls obtain fresh tokens, bound execution time and output, disable redirects, and surface HTTP errors.
  • What do you want reviewers to focus on? The .NET sample previously built with zero warnings/errors; its files are unchanged by this language split. Review the REST contract, session ownership, and setup requirements. Live Azure pool/model execution was not run.

Related Issue

Addresses the .NET portion of #6863. The Python implementation is tracked separately in #9114, following the maintainer's request to keep each PR to one language.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 05:18
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python .NET Usage: [Issues, PRs], Target: .Net labels Oct 3, 2026
@github-actions github-actions Bot changed the title Add Container Apps Dynamic Sessions samples Python: Add Container Apps Dynamic Sessions samples Oct 3, 2026
@github-actions github-actions Bot changed the title Python: Add Container Apps Dynamic Sessions samples .NET: Add Container Apps Dynamic Sessions samples Oct 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

External REST compatibility remains unconfirmed, and Python endpoint validation needs correction.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds .NET and Python examples of running agent-generated Python in Azure Container Apps Dynamic Sessions, addressing #6863.

Changes:

  • Exposes remote code execution through function tools with per-run session ownership.
  • Documents authentication, setup, execution limits, and lifecycle.
  • Registers samples in indexes and the .NET solution.
File Description
python/​samples/​02-agents/​tools/​README.md Links the Python sample.
python/​samples/​02-agents/​tools/​container_apps_dynamic_sessions.py Implements the Python function-tool example.
dotnet/​samples/​02-agents/​Agents/​README.md Links the .NET sample.
dotnet/​samples/​02-agents/​Agents/​Agent_ContainerAppsDynamicSessions/​README.md Documents setup and session ownership.
dotnet/​samples/​02-agents/​Agents/​Agent_ContainerAppsDynamicSessions/​Program.cs Implements the .NET function-tool example.
dotnet/​samples/​02-agents/​Agents/​Agent_ContainerAppsDynamicSessions/​Agent_ContainerAppsDynamicSessions.csproj Defines the sample project and dependencies.
dotnet/​agent-framework-dotnet.slnx Registers the .NET sample project.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@eavanvalkenburg

Copy link
Copy Markdown
Member

Naveen Chatlapalli (@1aifanatic) Thanks for the contribution. This PR currently mixes .NET and Python changes. Please either update this PR so it contains only one language and handle the other language separately if still desired, or close this PR and open separate .NET and Python PRs.

@1aifanatic Naveen Chatlapalli (1aifanatic) changed the title .NET: Add Container Apps Dynamic Sessions samples .NET: Add Container Apps Dynamic Sessions sample Oct 6, 2026
@1aifanatic

Copy link
Copy Markdown
Contributor Author

Updated in ff7facf: this PR now contains only the .NET Dynamic Sessions sample, solution entry, and sample index. The Python sample is in #9114. Both descriptions link the counterpart, and I verified the changed-file list contains only dotnet paths. The Python companion passes Ruff, Pyright, and the HTTP/session/error mock checks; the .NET sample is unchanged from its successful build.

This branch was previously deployed

2 inactive deployments
github-app-auth — ff7facff Deployed Oct 6, 2026 by 1aifanatic via add_label #24531
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants