[compare]fix optimize for managed agent - #9954
Open
Jessie Li (YoYoJa) wants to merge 28 commits into
Open
Conversation
* refactor: support telemetry in ai agent related extensions * refactor: support telemetry in ai agent related extensions * refactor: support telemetry in ai agent related extensions * fix: satisfy extension cspell check * fix: use released azd telemetry SDK
* Expose live cache fallback warnings Persist successful template cache fallback warnings outside the interactive PTY and replay them from the always-run pipeline step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 153e03c1-54b4-4a0f-860e-9fe1e574a0fd * Preserve cache marker cleanup failures Keep stale refresh markers from being masked by non-blocking warning file initialization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 153e03c1-54b4-4a0f-860e-9fe1e574a0fd --------- Co-authored-by: Jian Wu <wujia@microsoft.com> Copilot-Session: 153e03c1-54b4-4a0f-860e-9fe1e574a0fd
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Add a container that can download and run all the protobuff compilers we need, for Go, Python and JS. Kick it off with 'go tool mage generateProtos'
* fix repeatly optimization * update change log * address comments * address comments * address comments * address comments * address comments * address comments * address comments * address comment
Fixes Azure#9908 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix repeatly optimization * update change log * address comments * address comments * address comments * address comments * address comments * address comments * address comments * address comment * fix optimize test * fix test * address comment
* feat(ai): add orthogonal Responses primitives * refactor(ai): remove Responses replay cursors * refactor(ai): drop legacy Response state * refactor(ai): report Response identity once * refactor(ai): consolidate Responses implementation * refactor(ai): isolate Responses invoke logic * refactor(ai): align Responses command organization * test(ai): exercise Responses lifecycle HTTP contracts * feat(ai): unify invocation commands and long-running option * docs(ai): clarify protocol inference and long-running guarantees * fix(ai): simplify follow guidance and explain unavailable streams * refactor(ai): restore existing Responses code locations * refactor(ai): consolidate Responses helpers and tests * refactor(ai): trim lifecycle flags and document new helpers * fix(ai): preserve protocol resolution and spelling fixes after rebase * fix(ai): keep agent and protocol explicit in follow guidance * test(ai): add offline invocation command scenarios * fix(ai): preserve safe recovery guidance and defer scenario mapping
* feat(ai-agents): agent.yaml model and Foundry service clients (1/4) (Azure#9754) * feat(ai-agents): agent.yaml model and Foundry service clients First of four stacked changes adding managed harness agent support. This one is the data model and the HTTP clients; it adds no commands and performs no deployment, so it can be read on its own. agent_yaml gains the prompt agent manifest: the harness block and its skills, environment and built-in tool controls, the memory block, tool declarations, and the feature gate that decides which manifest features a given harness accepts. Blocks azd interprets reject unknown keys, so a typo such as builtin_tool for builtin_tools fails the parse instead of deploying an agent with capabilities the author believed were off. Tools stay untyped and pass through, so a tool newer than this build still deploys. agent_api gains the managed agent contract and its operations. pkg/azure gains the Foundry data plane clients for files, projects, connections and RAI policies; the toolsets client is removed because the service replaced it with the connections control plane. New spelling terms stay in the extension cspell config rather than the shared core one, which this branch does not touch. * fix(ai-agents): preserve inline RAI policy fields * refactor(ai-agents): reuse unified prompt agent client * refactor(ai-agents): reference supported sibling resources --------- Co-authored-by: hund030 <zhihuan@microsoft.com> * feat(ai-agents): provision and deploy prompt agents (2/4) (Azure#9755) * feat(ai-agents): agent.yaml model and Foundry service clients First of four stacked changes adding managed harness agent support. This one is the data model and the HTTP clients; it adds no commands and performs no deployment, so it can be read on its own. agent_yaml gains the prompt agent manifest: the harness block and its skills, environment and built-in tool controls, the memory block, tool declarations, and the feature gate that decides which manifest features a given harness accepts. Blocks azd interprets reject unknown keys, so a typo such as builtin_tool for builtin_tools fails the parse instead of deploying an agent with capabilities the author believed were off. Tools stay untyped and pass through, so a tool newer than this build still deploys. agent_api gains the managed agent contract and its operations. pkg/azure gains the Foundry data plane clients for files, projects, connections and RAI policies; the toolsets client is removed because the service replaced it with the connections control plane. New spelling terms stay in the extension cspell config rather than the shared core one, which this branch does not touch. * feat(ai-agents): provision and deploy prompt agents Second of four stacked changes. Builds on the model and clients from the previous change and adds the service target that turns a prompt agent manifest into deployed Foundry resources. Deployment is graph driven. The manifest is resolved into nodes for the agent and for every resource it depends on -- memory store, connections, skills, RAI policy -- and the graph decides creation order and reports per node progress. Sibling resources are reconciled rather than recreated, so a redeploy that changes nothing makes no writes. This package is submitted whole rather than split further. The graph types are shared by every node implementation and the nodes are mutually referential, so any smaller cut does not compile without a refactor that would itself need review. * fix(ai-agents): preserve inline RAI policy fields * refactor(ai-agents): reuse unified prompt agent client * refactor(ai-agents): reference supported sibling resources * refactor(ai-agents): align prompt deployment dependencies * fix(ai-agents): constrain prompt deployment to Foundry * fix(ai-agents): scope prompt deployment state * fix(ai-agents): bypass tagged lookup for prompt agents * fix(ai-agents): align prompt schema and policy contract * fix(ai-agents): remove unshipped prompt config fallback --------- Co-authored-by: hund030 <zhihuan@microsoft.com> * feat(ai-agents): CLI surface for managed harness agents (3/4) (Azure#9756) * feat(ai-agents): agent.yaml model and Foundry service clients First of four stacked changes adding managed harness agent support. This one is the data model and the HTTP clients; it adds no commands and performs no deployment, so it can be read on its own. agent_yaml gains the prompt agent manifest: the harness block and its skills, environment and built-in tool controls, the memory block, tool declarations, and the feature gate that decides which manifest features a given harness accepts. Blocks azd interprets reject unknown keys, so a typo such as builtin_tool for builtin_tools fails the parse instead of deploying an agent with capabilities the author believed were off. Tools stay untyped and pass through, so a tool newer than this build still deploys. agent_api gains the managed agent contract and its operations. pkg/azure gains the Foundry data plane clients for files, projects, connections and RAI policies; the toolsets client is removed because the service replaced it with the connections control plane. New spelling terms stay in the extension cspell config rather than the shared core one, which this branch does not touch. * feat(ai-agents): provision and deploy prompt agents Second of four stacked changes. Builds on the model and clients from the previous change and adds the service target that turns a prompt agent manifest into deployed Foundry resources. Deployment is graph driven. The manifest is resolved into nodes for the agent and for every resource it depends on -- memory store, connections, skills, RAI policy -- and the graph decides creation order and reports per node progress. Sibling resources are reconciled rather than recreated, so a redeploy that changes nothing makes no writes. This package is submitted whole rather than split further. The graph types are shared by every node implementation and the nodes are mutually referential, so any smaller cut does not compile without a refactor that would itself need review. * feat(ai-agents): CLI surface for managed harness agents Third of four stacked changes. Adds the commands that sit on top of the model and the deployment engine from the previous two. azd ai agent init gains a kind and harness selection and writes the matching manifest, including discovery of an existing Responsible AI policy with a warn and fall back path when none can be read. list, show, delete and invoke gain managed agent handling, with invoke supporting streamed responses. Infrastructure synthesis learns the project endpoint so a generated module resolves it from the environment. Also carries the extension CHANGELOG for all four changes in this stack, since the entries describe features that only exist once the stack is complete. * fix(ai-agents): preserve inline RAI policy fields * refactor(ai-agents): reuse unified prompt agent client * refactor(ai-agents): reference supported sibling resources * refactor(ai-agents): align prompt deployment dependencies * fix(ai-agents): constrain prompt deployment to Foundry * fix(ai-agents): scope prompt deployment state * fix(ai-agents): align prompt CLI with Foundry * fix(ai-agents): enforce managed prompt CLI contract * fix(ai-agents): unify prompt project context * fix(ai-agents): bypass tagged lookup for prompt agents * fix(ai-agents): complete managed prompt invocation * fix(ai-agents): finalize prompt init contract * fix(ai-agents): finalize prompt agent lifecycle --------- Co-authored-by: hund030 <zhihuan@microsoft.com> * fix(ai-agents): harden prompt agent lifecycle * fix(ai-agents): defer harness capability validation * fix(ai-agents): use published connections dependency * fix(ai-agents): publish versioned prompt skill references * fix(ai-agents): route prompt manifest adoption correctly * fix(ai-agents): reuse existing models for prompt adoption * feat(ai-agents): support greenfield prompt agent init * refactor(ai-agents): remove prompt agent list command * refactor(ai-agents): simplify prompt agent contracts * refactor(ai-agents): remove temporary prompt overrides * fix(ai-agents): align Copilot harness tool configuration * fix(ai-agents): align prompt authoring with service contract * fix(ai-agents): preserve prompt lifecycle errors * fix(ai-agents): resolve prompt connection service names * fix(ai-agents): hide managed harness init entrypoints * feat(ai-agents): report resolved agent telemetry context * fix(ai-agents): skip standalone deploy telemetry * fix(ai-agents): harden prompt agent lifecycle * fix(ai-agents): expand prompt tool environment values * fix(ai-agents): clear prompt conversation state * docs(telemetry): document agent context event * Validate Responsible AI policy name in prompt features Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix(ai-agents): harden prompt resolution paths * fix(ai-agents): align skill and telemetry identities * chore: limit managed agent PR scope --------- Co-authored-by: Kshitij Chawla <166698309+kshitij-microsoft@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Summary
Fixes prompt-agent optimization behavior for both job submission and candidate application.
Prompt agents use the definition already deployed to the Foundry service, so
azd ai agent optimizeno longer requires local copies of the agent model, instructions, tools, or skills. Applying a candidate now persists its supported mutations to the inline prompt-agent definition inazure.yaml.Hosted and voice-agent behavior remains unchanged.
Changes
Optimize job submission
For
kind: promptagents:agentkind.Kindresolver.optimization_config:modelsystem_promptskillstoolsmodel_search_space.Dataset, evaluator, evaluation-model, and optimization-model handling is unchanged.
Apply an optimization candidate
For prompt agents,
azd ai agent optimize applynow:azure.yaml.Supported mappings:
azure.yamlsystem_prompt,systemPrompt, orinstructionsinstructionsmodelmodeltoolstoolsMutation metadata is used only to determine which fields changed because its values may have different response shapes. Final values come from the candidate configuration endpoint.
Hosted agents do not enter this new inline-definition update path.
Tests
Added regression coverage for:
Validation
go test ./internal/cmdgo build ./...