Python: Test - #5344
Closed
Tao Chen (TaoChenOSU) wants to merge 11 commits into
Closed
Conversation
* Experiment * Update dependency and add non streaming * Add more samples * Rename samples * Add invocations * Comments 1 * Comments 2 * Comments 3 * Improve README * Add local shell sample * WIP: Add eval and memory samples * Update user agent prefix * Update user agent prefix doc
* Add tests * fix tests and sample * Fix formatting * Remove function approval contents
* Refine samples and upgrade pacakges * Upgrade to a new package that fixes a bug * Update model env var
* Upgrade agentserver packages * Fix new types
* Add special handling for workflows * Address comments
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
|||||||||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Python package for hosting Agent Framework agents/workflows on Foundry Agent Server (Responses + Invocations APIs), updates telemetry to allow hosting layers to prepend a user-agent prefix, and replaces older “hosted_agents” end-to-end samples with a new set of Foundry-hosted-agent samples.
Changes:
- Add
agent-framework-foundry-hostingpackage (ResponsesHostServer,InvocationsHostServer) plus HTTP round-trip tests for Responses. - Add new
python/samples/04-hosting/foundry-hosted-agents/**sample set (Responses + Invocations). - Remove older
python/samples/05-end-to-end/hosted_agents/**sample set and update workspace/lock/cspell accordingly.
Reviewed changes
Copilot reviewed 67 out of 71 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| python/uv.lock | Adds the new workspace package and its pinned dependencies to the lockfile. |
| python/pyproject.toml | Registers agent-framework-foundry-hosting as a workspace dependency. |
| python/.cspell.json | Adds “agentserver” to the spellchecker dictionary. |
| python/packages/core/agent_framework/_telemetry.py | Adds support for prepending user-agent prefixes (used by hosting layers). |
| python/packages/foundry_hosting/pyproject.toml | New package definition for agent-framework-foundry-hosting. |
| python/packages/foundry_hosting/agent_framework_foundry_hosting/init.py | Exposes hosting servers from the new package. |
| python/packages/foundry_hosting/agent_framework_foundry_hosting/_responses.py | Implements Responses API hosting adapter for agents/workflows. |
| python/packages/foundry_hosting/agent_framework_foundry_hosting/_invocations.py | Implements Invocations API hosting adapter for agents. |
| python/packages/foundry_hosting/tests/test_responses.py | Adds HTTP round-trip tests for ResponsesHostServer. |
| python/packages/foundry_hosting/README.md | Placeholder README for the new hosting package. |
| python/packages/foundry_hosting/LICENSE | Adds MIT license for the new package. |
| python/samples/04-hosting/foundry-hosted-agents/responses/README.md | New top-level Responses hosting sample docs and index. |
| python/samples/04-hosting/foundry-hosted-agents/responses/using_deployed_agent.py | New client-side example for talking to a deployed agent. |
| python/samples/04-hosting/foundry-hosted-agents/responses/01_basic/requirements.txt | New basic Responses hosting sample dependencies. |
| python/samples/04-hosting/foundry-hosted-agents/responses/01_basic/main.py | New basic Responses hosting sample server. |
| python/samples/04-hosting/foundry-hosted-agents/responses/01_basic/agent.yaml | New basic sample agent config. |
| python/samples/04-hosting/foundry-hosted-agents/responses/01_basic/agent.manifest.yaml | New basic sample manifest for deployment. |
| python/samples/04-hosting/foundry-hosted-agents/responses/01_basic/README.md | New basic sample documentation. |
| python/samples/04-hosting/foundry-hosted-agents/responses/01_basic/Dockerfile | Container recipe for the basic sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/01_basic/.env.example | Example env file for the basic sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/01_basic/.dockerignore | Docker ignore for the basic sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/requirements.txt | Local tools sample dependencies. |
| python/samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/main.py | Local tools Responses hosting sample server. |
| python/samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/agent.yaml | Local tools agent config. |
| python/samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/agent.manifest.yaml | Local tools deployment manifest. |
| python/samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/README.md | Local tools sample docs. |
| python/samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/Dockerfile | Container recipe for local tools sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/.env.example | Env example for local tools sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/02_local_tools/.dockerignore | Docker ignore for local tools sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/03_remote_mcp/requirements.txt | Remote MCP sample dependencies. |
| python/samples/04-hosting/foundry-hosted-agents/responses/03_remote_mcp/main.py | Remote MCP Responses hosting sample server. |
| python/samples/04-hosting/foundry-hosted-agents/responses/03_remote_mcp/agent.yaml | Remote MCP agent config. |
| python/samples/04-hosting/foundry-hosted-agents/responses/03_remote_mcp/agent.manifest.yaml | Remote MCP deployment manifest. |
| python/samples/04-hosting/foundry-hosted-agents/responses/03_remote_mcp/README.md | Remote MCP sample docs. |
| python/samples/04-hosting/foundry-hosted-agents/responses/03_remote_mcp/Dockerfile | Container recipe for remote MCP sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/03_remote_mcp/.env.example | Env example for remote MCP sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/03_remote_mcp/.dockerignore | Docker ignore for remote MCP sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/04_workflows/requirements.txt | Workflow sample dependencies. |
| python/samples/04-hosting/foundry-hosted-agents/responses/04_workflows/main.py | Workflow Responses hosting sample server. |
| python/samples/04-hosting/foundry-hosted-agents/responses/04_workflows/agent.yaml | Workflow agent config. |
| python/samples/04-hosting/foundry-hosted-agents/responses/04_workflows/agent.manifest.yaml | Workflow deployment manifest. |
| python/samples/04-hosting/foundry-hosted-agents/responses/04_workflows/README.md | Workflow sample docs. |
| python/samples/04-hosting/foundry-hosted-agents/responses/04_workflows/Dockerfile | Container recipe for workflow sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/04_workflows/.env.example | Env example for workflow sample. |
| python/samples/04-hosting/foundry-hosted-agents/responses/04_workflows/.dockerignore | Docker ignore for workflow sample. |
| python/samples/04-hosting/foundry-hosted-agents/invocations/01-basic/requirements.txt | Invocations basic sample dependencies. |
| python/samples/04-hosting/foundry-hosted-agents/invocations/01-basic/main.py | Invocations basic sample server. |
| python/samples/04-hosting/foundry-hosted-agents/invocations/01-basic/README.md | Invocations basic sample docs. |
| python/samples/05-end-to-end/hosted_agents/README.md | Removes legacy hosted agent samples index. |
| python/samples/05-end-to-end/hosted_agents/agent_with_hosted_mcp/requirements.txt | Removes legacy sample dependencies file. |
| python/samples/05-end-to-end/hosted_agents/agent_with_hosted_mcp/main.py | Removes legacy sample implementation. |
| python/samples/05-end-to-end/hosted_agents/agent_with_hosted_mcp/agent.yaml | Removes legacy sample agent config. |
| python/samples/05-end-to-end/hosted_agents/agent_with_text_search_rag/requirements.txt | Removes legacy sample dependencies file. |
| python/samples/05-end-to-end/hosted_agents/agent_with_text_search_rag/main.py | Removes legacy sample implementation. |
| python/samples/05-end-to-end/hosted_agents/agent_with_text_search_rag/agent.yaml | Removes legacy sample agent config. |
| python/samples/05-end-to-end/hosted_agents/agents_in_workflow/requirements.txt | Removes legacy sample dependencies file. |
| python/samples/05-end-to-end/hosted_agents/agents_in_workflow/main.py | Removes legacy sample implementation. |
| python/samples/05-end-to-end/hosted_agents/agents_in_workflow/agent.yaml | Removes legacy sample agent config. |
| python/samples/05-end-to-end/hosted_agents/agent_with_local_tools/requirements.txt | Removes legacy sample dependencies file. |
| python/samples/05-end-to-end/hosted_agents/agent_with_local_tools/main.py | Removes legacy sample implementation. |
| python/samples/05-end-to-end/hosted_agents/agent_with_local_tools/agent.yaml | Removes legacy sample agent config. |
| python/samples/05-end-to-end/hosted_agents/agent_with_local_tools/README.md | Removes legacy sample documentation. |
| python/samples/05-end-to-end/hosted_agents/agent_with_local_tools/.env.sample | Removes legacy env sample. |
| python/samples/05-end-to-end/hosted_agents/agent_with_local_tools/.dockerignore | Removes legacy docker ignore. |
| python/samples/05-end-to-end/hosted_agents/writer_reviewer_agents_in_workflow/requirements.txt | Removes legacy sample dependencies file. |
| python/samples/05-end-to-end/hosted_agents/writer_reviewer_agents_in_workflow/main.py | Removes legacy sample implementation. |
| python/samples/05-end-to-end/hosted_agents/writer_reviewer_agents_in_workflow/agent.yaml | Removes legacy sample agent config. |
| python/samples/05-end-to-end/hosted_agents/writer_reviewer_agents_in_workflow/README.md | Removes legacy sample documentation. |
| python/samples/05-end-to-end/hosted_agents/writer_reviewer_agents_in_workflow/Dockerfile | Removes legacy Dockerfile. |
| python/samples/05-end-to-end/hosted_agents/writer_reviewer_agents_in_workflow/.env.sample | Removes legacy env sample. |
| python/samples/05-end-to-end/hosted_agents/writer_reviewer_agents_in_workflow/.dockerignore | Removes legacy docker ignore. |
Tao Chen (TaoChenOSU)
marked this pull request as ready for review
April 17, 2026 22:45
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
Description
Contribution Checklist