Repository navigation
Python: configure startup environment for foundry hosted samples - #9643
Draft
Shiva S (Shivakishore14) wants to merge 2 commits into
Draft
Shiva S (Shivakishore14) wants to merge 2 commits into
Shiva S (Shivakishore14) wants to merge 2 commits into
Conversation
Configure user-site loading before Python starts in deployment files, container images, and local sample instructions. Authored-by: GitHub Copilot CLI v1.0.102 Model: GPT-6.1 Sol (gpt-6.1-sol) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shiva S (Shivakishore14)
deployed
to
github-app-auth
October 23, 2026 10:47 — with
GitHub Actions
Active
Shiva S (Shivakishore14)
deployed
to
github-app-auth
October 23, 2026 10:47 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The proposed sample-wide default still needs maintainer agreement, and managed-runtime behavior has not been validated through a hosted deployment.
No open issues 🎉
What changed in this PR
This PR makes Python startup configuration explicit in Agent Framework’s Foundry hosting samples, covering deployed agents, direct container launches, and local development without changing runtime-library behavior.
Changes:
- Adds
PYTHONNOUSERSITE=1to 18 Dockerfiles, both sets of 18 deployment definitions, and Telegram’s direct-code service. - Documents shell-before-launch setup, dependency installation requirements, redeployment, and the setting’s limited scope.
- Extends the Telegram infrastructure test to check the exact environment-variable value.
Paths below are relative to python/samples/04-hosting/, except the consumer reference under skills/.
| File | Description |
|---|---|
skills/agent-framework-builder-python/references/hosting-and-deployment.md |
Adds consumer-facing startup guidance. |
foundry-hosted-agents/responses/workflows/README.md |
Configures local workflow launches. |
foundry-hosted-agents/responses/workflows/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/workflows/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/workflows/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/tools/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/tools/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/tools/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/steerable_long_running_agent/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/steerable_long_running_agent/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/steerable_long_running_agent/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/resilient_long_running_workflow/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/resilient_long_running_workflow/agent.yaml |
Adds deployment startup environment. |
foundry-hosted-agents/responses/resilient_long_running_workflow/agent.manifest.yaml |
Adds hosted-template startup environment. |
foundry-hosted-agents/responses/observability/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/observability/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/observability/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/monty_codeact/README.md |
Configures local script launches. |
foundry-hosted-agents/responses/monty_codeact/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/monty_codeact/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/monty_codeact/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/mcp/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/mcp/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/mcp/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/foundry_toolbox/README.md |
Configures local azd launches. |
foundry-hosted-agents/responses/foundry_toolbox/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/foundry_toolbox/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/foundry_toolbox/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/foundry_toolbox_mcp_skills/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/foundry_toolbox_mcp_skills/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/foundry_toolbox_mcp_skills/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/foundry_memory/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/foundry_memory/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/foundry_memory/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/files/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/files/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/files/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/declarative_customer_support/Dockerfile |
Sets startup environment in the final Python stage. |
foundry-hosted-agents/responses/declarative_customer_support/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/declarative_customer_support/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/custom_storage/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/custom_storage/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/custom_storage/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/basic/README.md |
Links shell-before-launch guidance. |
foundry-hosted-agents/responses/basic/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/basic/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/basic/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/responses/azure_search_rag/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/responses/azure_search_rag/agent.yaml |
Sets deployment startup environment. |
foundry-hosted-agents/responses/azure_search_rag/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/README.md |
Explains startup setup, scope, dependencies, and redeployment. |
foundry-hosted-agents/invocations/telegram/tests/test_infrastructure.py |
Asserts the exact startup environment entry. |
foundry-hosted-agents/invocations/telegram/azure.yaml |
Configures direct-code service startup. |
foundry-hosted-agents/invocations/break_glass/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/invocations/break_glass/agent.yaml |
Adds deployment startup environment. |
foundry-hosted-agents/invocations/break_glass/agent.manifest.yaml |
Sets hosted-template startup environment. |
foundry-hosted-agents/invocations/basic/README.md |
Configures local workflow launches. |
foundry-hosted-agents/invocations/basic/Dockerfile |
Sets image startup environment. |
foundry-hosted-agents/invocations/basic/agent.yaml |
Adds deployment startup environment. |
foundry-hosted-agents/invocations/basic/agent.manifest.yaml |
Sets hosted-template startup environment. |
container/hyperlight_codeact/README.md |
Adds startup guidance while preserving the hypervisor caveat. |
container/hyperlight_codeact/Dockerfile |
Sets image startup environment. |
container/hyperlight_codeact/agent.yaml |
Sets deployment startup environment. |
container/hyperlight_codeact/agent.manifest.yaml |
Sets hosted-template startup environment. |
Review effort: Balanced
Remove startup-variable shell exports and local command prerequisites. Preserve Dockerfile and deployment environment configuration. Authored-by: GitHub Copilot CLI v1.0.102 Model: GPT-6.1 Sol (gpt-6.1-sol) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shiva S (Shivakishore14)
deployed
to
github-app-auth
October 23, 2026 11:14 — with
GitHub Actions
Active
Shiva S (Shivakishore14)
deployed
to
github-app-auth
October 23, 2026 11:14 — with
GitHub Actions
Active
This branch was successfully deployed
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 & Context
Make Python startup configuration explicit in the Foundry hosted-agent examples before the interpreter starts, through deployment environment configuration and Python Dockerfiles.
Description & Review Guide
PYTHONNOUSERSITEto the string"1"in all 18agent.yamlfiles, all 18 hosted manifest templates, the Telegram direct-code service, and all 18 Python Dockerfiles under the related hosting examples. Update shared deployment-environment guidance and the maintained Python consumer hosting reference. Extend the existing Telegram deployment assertion.pip install --user. Existing deployments need a newly deployed agent version. The Hyperlight example remains unsupported on the default Foundry runtime; its startup configuration does not change its hypervisor requirement. No .NET, runtime-library, dependency-manifest, or CLI minimum-version changes.git diff --check, new documentation links, dependency-installation path checks, and a local Python startup check passed. Verified the final PR adds no Python/uv command prefixes or startup-variable shell exports; deployment configuration remains unchanged by this revision. No cloud deployment was performed.Related Issue
No public issue is linked and no prior maintainer approval is claimed. This is a draft sample-configuration proposal for maintainer review; agreement on the proposed sample startup default is still needed.
AI Assistance
AI assistance details: GitHub Copilot CLI prepared the sample configuration, documentation, small regression assertion, local validation, and this description. This draft remains subject to author and maintainer review.
Contribution Checklist