feat(agents): add microsoft.foundry azure.yaml schema#8603
Conversation
Schema-only scaffolding for unifying Microsoft Foundry agent config in azure.yaml (design spec PR #8590, section 2.3). - Add the host: microsoft.foundry conditional to schemas/v1.0 and schemas/alpha azure.yaml.json, composing the extension schema at the service level via allOf and turning off project/runtime/docker/image/config. - Add microsoft.foundry to the host examples list. - Publish the Foundry extension schemas under cli/azd/extensions/azure.ai.agents/schemas/: microsoft.foundry.json plus per-resource files (Agent, Skill, Routine, Connection, Toolbox, Deployment, FileRef), ported from the PM preview repo with $id rewritten to the azure-dev path and relative $refs preserved. - microsoft.foundry.json uses additionalProperties: true at the project level (deliberate deviation from the preview's false) so future Foundry resource types do not break the schema, per the brief and design spec section 2.3. Authoring-only: no service-target wiring, provider registration, or alpha-feature gating (those are later PRs).
There was a problem hiding this comment.
Pull request overview
This PR adds Microsoft Foundry authoring support to azure.yaml by extending the core azure.yaml JSON Schemas to recognize host: microsoft.foundry and composing in a new set of Foundry-specific schemas owned by the azure.ai.agents extension.
Changes:
- Added
microsoft.foundryto thehostexamples list in bothschemas/v1.0/azure.yaml.jsonandschemas/alpha/azure.yaml.json. - Added a new
services.*conditional forhost: microsoft.foundrythat composes the Foundry schema via$refand disables service-level properties that should not appear at the Foundry service entry level. - Added 8 new JSON Schema files under
cli/azd/extensions/azure.ai.agents/schemas/to model Foundry project/service configuration and per-resource shapes.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| schemas/v1.0/azure.yaml.json | Adds microsoft.foundry host example and service-level schema composition via $ref. |
| schemas/alpha/azure.yaml.json | Mirrors the v1.0 Foundry host example and conditional composition. |
| cli/azd/extensions/azure.ai.agents/schemas/microsoft.foundry.json | New composed Foundry project schema (service entry shape) with additionalProperties: true. |
| cli/azd/extensions/azure.ai.agents/schemas/Agent.json | New Foundry agent schema (hosted/prompt/file-ref variants). |
| cli/azd/extensions/azure.ai.agents/schemas/Skill.json | New Foundry skill schema (inline or file ref). |
| cli/azd/extensions/azure.ai.agents/schemas/Routine.json | New Foundry routine schema (inline or file ref). |
| cli/azd/extensions/azure.ai.agents/schemas/Connection.json | New Foundry connection schema (inline or file ref). |
| cli/azd/extensions/azure.ai.agents/schemas/Toolbox.json | New Foundry toolbox schema (inline or file ref). |
| cli/azd/extensions/azure.ai.agents/schemas/Deployment.json | New Foundry model deployment schema (inline or file ref). |
| cli/azd/extensions/azure.ai.agents/schemas/FileRef.json | New shared file-reference schema used by the other Foundry schemas. |
PromptAgent now requires name + kind plus at least one of instructions or skill (anyOf), instead of always requiring instructions. A prompt agent backed by a skill (which supplies the instructions) no longer fails schema validation. This fixes the complex sample's summarizer-agent validation failure.
Require project when hosted agents define docker or runtime settings, and enforce routine trigger-specific required fields for schedule, webhook, and event triggers.
Use conditional schema constraints for hosted-agent project requirements and routine trigger-specific fields.
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
glharper
left a comment
There was a problem hiding this comment.
Minor/informational notes (none blocking):
- Cross-draft mix (core 2019-09, sub-schemas draft-07) matches the pre-existing azure.ai.agent.json pattern — fine.
- Cosmetic $id URL-form inconsistency across new schemas vs core vs existing (no-$id) agent schema.
- Schema only resolves post-merge (core $ref points at main raw URL) — same as existing behavior.
- "runtime": false is a real selective guard given additionalProperties:true, not dead.
|
/check-enforcer override |
therealjohn
left a comment
There was a problem hiding this comment.
This isnt ready to be merged yet - its pending more prototyping from #8590.
Can you build out the prototype in a branch so we can test it before it gets merged and released in main by accident.
|
@therealjohn good catch, and agreed the intent wasn''t clear from the PR description. Current plan: We have an integration branch Only when we have a working end-to-end prototype that can be tested ( I''ll also retarget PR #8627 ( Please let me know if you have any other thoughts |
|
Thanks for the thorough review and the helpful notes, @glharper!
|
Schema-only scaffolding for unifying Foundry agent config in
azure.yaml. Implements design spec #8590 §2.3.Changes
Core schema (
schemas/v1.0/azure.yaml.json+schemas/alpha/azure.yaml.json):microsoft.foundryto thehostexamples list.azure.ai.agent, composingmicrosoft.foundry.jsonviaallOf->$refand disablingproject/runtime/docker/image/config.Extension schemas (
cli/azd/extensions/azure.ai.agents/schemas/) ported fromtherealjohn/foundry-azd-config-preview:microsoft.foundry.json,Agent.json,Skill.json,Routine.json,Connection.json,Toolbox.json,Deployment.json,FileRef.json.Transformations:
$idrewritten to the azure-dev path; relative$refs preserved.Deliberate deviations from preview
microsoft.foundry.json: top-leveladditionalProperties: true, per the PM brief and design spec §2.3, so future Foundry resource types do not break the schema.Agent.json:PromptAgentaccepts eitherinstructionsorskill, so a skill-backed prompt agent does not need duplicate instructions.Agent.json:HostedAgentrequiresprojectwhendockerorruntimeis set, matching its property description.Routine.json:triggernow enforcescronforscheduleandfilterforwebhook/event, matching its property descriptions.Validation
simpleandcomplexsamples validate end-to-end with ajv against the core schema plus composed sub-schemas.cron/filterand missing hosted-agentprojectare rejected.Fixes #8611