Skip to content

[Agents Extension] Remove prompt agent handling - #8040

Merged
trangevi merged 4 commits into
mainfrom
trangevi/remove-prompt-agents
May 5, 2026
Merged

[Agents Extension] Remove prompt agent handling#8040
trangevi merged 4 commits into
mainfrom
trangevi/remove-prompt-agents

Conversation

@trangevi

@trangevi trangevi commented May 4, 2026

Copy link
Copy Markdown
Member

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.

trangevi added 2 commits May 4, 2026 16:29
Signed-off-by: trangevi <trangevi@microsoft.com>
Signed-off-by: trangevi <trangevi@microsoft.com>

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.

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_api package) that primarily existed to materialize prompt-agent manifests.
  • Refactored manifest-parameter prompting and placeholder injection into agent_yaml and 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.

Comment thread cli/azd/extensions/azure.ai.agents/internal/cmd/init.go
Signed-off-by: trangevi <trangevi@microsoft.com>

@wbreza wbreza 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.

✅ 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)

  1. 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.

  2. 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 jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 JeffreyCA added the ext-agents azure.ai.agents extension label May 5, 2026

@JeffreyCA JeffreyCA 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.

A couple of cleanup misses after the prompt-agent removal:

  1. cli/azd/extensions/azure.ai.agents/internal/cmd/init_test.go:1162 still has the "azureml registry URL is manifest" case for azureml://registries/myReg/agentmanifests/myManifest. Since the registry URL download path was removed and downloadAgentYaml() now only accepts local files or GitHub URLs, this test case looks stale and should probably be removed.

  2. cli/azd/extensions/azure.ai.agents/internal/pkg/agents/agent_yaml/yaml.go:186 still 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>
@trangevi
trangevi enabled auto-merge (squash) May 5, 2026 18:03

@therealjohn therealjohn 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.

We'll be able to better support prompt agents or similar declarative approaches built on the changes in #7962 #7975 #8049 etc. Approving so we can revisit on a better foundation.

@trangevi trangevi linked an issue May 5, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown

📋 Prioritization Note

Thanks for the contribution! The linked issue isn't in the current milestone yet.
Review may take a bit longer — reach out to @rajeshkamal5050 or @kristenwomack if you'd like to discuss prioritization.

@trangevi

trangevi commented May 5, 2026

Copy link
Copy Markdown
Member Author

/check-enforcer override

@trangevi
trangevi merged commit 02c9713 into main May 5, 2026
21 of 25 checks passed
@trangevi
trangevi deleted the trangevi/remove-prompt-agents branch May 5, 2026 21:04
Copilot AI pushed a commit that referenced this pull request May 21, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Agent Extension] Remove Prompt Agent handling

6 participants