[Agents Extension] Remove prompt agent handling - #8040
Conversation
Signed-off-by: trangevi <trangevi@microsoft.com>
There was a problem hiding this comment.
Pull request overview
This PR removes the (now-deprioritized) prompt-agent pathway from the azure.ai.agents extension, simplifying manifest parsing/mapping and deployment flows to focus on hosted/container-based agents.
Changes:
- Removed prompt-agent kind/type handling across agent YAML parsing, request mapping, and service deployment.
- Removed registry-manifest download support (and the
registry_apipackage) that primarily existed to materialize prompt-agent manifests. - Refactored manifest-parameter prompting and placeholder injection into
agent_yamland updated tests/fixtures accordingly.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/extensions/azure.ai.agents/tests/samples/githubMcpAgent/agent.yaml | Removed prompt-agent sample manifest. |
| cli/azd/extensions/azure.ai.agents/tests/samples/declarativeNoTools/agent.yaml | Removed prompt-agent sample manifest. |
| cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent.go | Removed prompt-agent deploy branch and prompt-specific display output. |
| cli/azd/extensions/azure.ai.agents/internal/project/service_target_agent_test.go | Renamed artifact protocol test to remove prompt-agent terminology. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/registry_api/operations.go | Deleted registry manifest client implementation. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/registry_api/models.go | Deleted registry manifest models. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/registry_api/helpers.go | Deleted registry manifest processing + parameter prompting/injection helpers. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/registry_api/helpers_test.go | Deleted tests covering registry helper behaviors. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/yaml.go | Removed prompt agent kind and PromptAgent schema type. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/testdata/prompt-agent-minimal.yaml | Removed prompt-agent fixture. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/testdata/prompt-agent-full.yaml | Removed prompt-agent fixture. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/testdata/mcp-tools-agent.yaml | Removed prompt-agent fixture that exercised MCP tools. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/testdata/invalid-no-model.yaml | Removed prompt-agent invalid fixture. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/testdata_test.go | Removed prompt-agent fixture validation tests. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parse.go | Removed prompt-agent extraction/validation paths and tool-connection prompting. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/parameters.go | Added manifest-parameter prompting + placeholder injection utilities in agent_yaml. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/map.go | Removed prompt-agent API request mapping path and narrowed supported-kind error text. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/map_test.go | Updated mapping tests to remove prompt-agent cases and references. |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/models.go | Removed prompt-agent-related API model types/constants (and related agent kinds). |
| cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_api/models_test.go | Updated round-trip tests to match the reduced agent model surface. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/init.go | Switched parameter prompting to agent_yaml, removed registry URL handling, removed prompt-agent tool-connection processing. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/init_test.go | Removed prompt-agent specific init tests. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/init_models.go | Removed prompt-agent model-deployment path and moved parameter injection types to agent_yaml. |
Signed-off-by: trangevi <trangevi@microsoft.com>
wbreza
left a comment
There was a problem hiding this comment.
✅ Approve — Clean, well-scoped removal
This PR successfully removes the deprioritized prompt-agent code path from the \�zure.ai.agents\ extension. Verified:
- \PromptAgent\ struct, \AgentKindPrompt\ constant, and \ValidAgentKinds()\ — all correctly updated
- \CreatePromptAgentAPIRequest()\ and prompt mapping branch — removed from \map.go\
egistry_api\ package — entirely deleted (models, helpers, operations, tests)- Service target deploy path simplified to hosted-only with updated error messages
- Init command — registry URL handling removed, parameter prompting migrated to \�gent_yaml\
- All prompt agent test fixtures and sample YAML files cleaned up
- No orphaned imports, no broken control flow, no dead code
Minor observations (P2 — non-blocking)
-
Non-relocated helper functions: 11 helper functions from
egistry_api/helpers.go\ were deleted rather than relocated (e.g., \ConvertAgentDefinition, \ValidateParameterValue, \MergeManifestIntoAgentDefinition). These appear to be prompt-agent-specific since they lived in the registry manifest package — worth a quick confirmation that none are needed for hosted agent flows. -
Test coverage proportional to removal: Test lines went from 863 → 85, but the reduction tracks the deleted functionality. The relocated \injectParameterValues\ logic has solid test coverage (8 test cases covering brace formats, spacing, multi-param, empty templates, and round-trip).
Overall: clean PR, good scoping. 👍
jongio
left a comment
There was a problem hiding this comment.
Clean removal - the parameter logic migration to agent_yaml is well-structured and uses the correct YAML library (go.yaml.in/yaml/v3). Tests cover the injection logic thoroughly.
A few notes:
-
The Copilot bot comments about YAML library mismatch and missing tests are both inaccurate - the new code already uses the right lib and includes tests in parameters_test.go. The ContainerAppAgentDefinition comment is also wrong since that type IS removed in this diff.
-
The bot's comment about documenting the registry URL removal is valid though - dropping azureml:// support is user-facing and worth a line in the PR description or changelog.
-
Minor: listen.go:131 has a stale comment ("Only hosted agents get platform-created per-agent identities; prompt agents do not.") that references a concept that no longer exists. Not blocking, but worth cleaning up.
JeffreyCA
left a comment
There was a problem hiding this comment.
A couple of cleanup misses after the prompt-agent removal:
-
cli/azd/extensions/azure.ai.agents/internal/cmd/init_test.go:1162still has the"azureml registry URL is manifest"case forazureml://registries/myReg/agentmanifests/myManifest. Since the registry URL download path was removed anddownloadAgentYaml()now only accepts local files or GitHub URLs, this test case looks stale and should probably be removed. -
cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/yaml.go:186still says variables are projected into a “prompt agent”. With prompt agents removed, this comment is stale; something like “used to configure the agent dynamically” would avoid implying prompt-agent support still exists.
Signed-off-by: trangevi <trangevi@microsoft.com>
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
|
/check-enforcer override |
* Initial changes to remove prompt agents Signed-off-by: trangevi <trangevi@microsoft.com> * cleanup Signed-off-by: trangevi <trangevi@microsoft.com> * PR comments Signed-off-by: trangevi <trangevi@microsoft.com> * PR comments Signed-off-by: trangevi <trangevi@microsoft.com> --------- Signed-off-by: trangevi <trangevi@microsoft.com> Co-authored-by: therealjohn <1501196+therealjohn@users.noreply.github.com>
Prompt agents have been deprioritized, and so much of our recent work has ignored them completely. Having the additional branches just muddies the code and makes it harder to make well scoped changes. When/if prompt agents are added back, we can do it in a way that fits will all of our existing features. This PR removes all of the previous prompt agent code and registry (azureml://) support.