Skip to content

feat(agents): add microsoft.foundry azure.yaml schema#8603

Merged
therealjohn merged 6 commits into
huimiu/foundry-azure-yamlfrom
huimiu/foundry-schema-scaffold
Jun 12, 2026
Merged

feat(agents): add microsoft.foundry azure.yaml schema#8603
therealjohn merged 6 commits into
huimiu/foundry-azure-yamlfrom
huimiu/foundry-schema-scaffold

Conversation

@huimiu

@huimiu huimiu commented Jun 11, 2026

Copy link
Copy Markdown
Member

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

  • Added microsoft.foundry to the host examples list.
  • Added a service-level conditional after azure.ai.agent, composing microsoft.foundry.json via allOf -> $ref and disabling project/runtime/docker/image/config.

Extension schemas (cli/azd/extensions/azure.ai.agents/schemas/) ported from therealjohn/foundry-azd-config-preview:
microsoft.foundry.json, Agent.json, Skill.json, Routine.json, Connection.json, Toolbox.json, Deployment.json, FileRef.json.

Transformations: $id rewritten to the azure-dev path; relative $refs preserved.

Deliberate deviations from preview

  • microsoft.foundry.json: top-level additionalProperties: true, per the PM brief and design spec §2.3, so future Foundry resource types do not break the schema.
  • Agent.json: PromptAgent accepts either instructions or skill, so a skill-backed prompt agent does not need duplicate instructions.
  • Agent.json: HostedAgent requires project when docker or runtime is set, matching its property description.
  • Routine.json: trigger now enforces cron for schedule and filter for webhook/event, matching its property descriptions.

Validation

  • All JSON files parse.
  • simple and complex samples validate end-to-end with ajv against the core schema plus composed sub-schemas.
  • Targeted negative checks confirm missing routine cron/filter and missing hosted-agent project are rejected.
  • cspell (misc + cli configs): 0 issues.

Fixes #8611

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

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 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.foundry to the host examples list in both schemas/v1.0/azure.yaml.json and schemas/alpha/azure.yaml.json.
  • Added a new services.* conditional for host: microsoft.foundry that composes the Foundry schema via $ref and 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.

Comment thread cli/azd/extensions/azure.ai.agents/schemas/Routine.json
Comment thread cli/azd/extensions/azure.ai.agents/schemas/Agent.json
@github-actions github-actions Bot added the ext-agents azure.ai.{agents,connections,inspector,projects,routines,skills,toolboxes} extensions label Jun 11, 2026
huimiu added 3 commits June 11, 2026 13:22
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.
@github-actions

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.

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

Minor/informational notes (none blocking):

  1. Cross-draft mix (core 2019-09, sub-schemas draft-07) matches the pre-existing azure.ai.agent.json pattern — fine.
  2. Cosmetic $id URL-form inconsistency across new schemas vs core vs existing (no-$id) agent schema.
  3. Schema only resolves post-merge (core $ref points at main raw URL) — same as existing behavior.
  4. "runtime": false is a real selective guard given additionalProperties:true, not dead.

@glharper

Copy link
Copy Markdown
Member

/check-enforcer override

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

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.

@huimiu huimiu changed the base branch from main to huimiu/foundry-azure-yaml June 12, 2026 05:21
@huimiu

huimiu commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

@therealjohn good catch, and agreed the intent wasn''t clear from the PR description.

Current plan:

We have an integration branch huimiu/foundry-azure-yaml that acts as the prototype staging area. This PR (#8603) already targets that branch, not main. All Foundry prototype PRs (schema, $ref file includes, config binding, service target implementation, etc.) will land there first.

Only when we have a working end-to-end prototype that can be tested (azd up with a host: microsoft.foundry azure.yaml) will we open a PR from huimiu/foundry-azure-yaml to main.

I''ll also retarget PR #8627 ($ref file includes) to huimiu/foundry-azure-yaml so it''s part of the same prototype stack.

Please let me know if you have any other thoughts

@huimiu

huimiu commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

Thanks for the thorough review and the helpful notes, @glharper!

  1. Good to know on the cross-draft mix. We're keeping it consistent with the existing azure.ai.agent.json pattern, so that feels right.
  2. Totally agree on the $id URL form. I'll clean that up when this eventually moves to main.
  3. Yep, same behavior as what's already there, so happy to keep it as is.
  4. Great catch on "runtime": false being a real guard. That's intentional given additionalProperties: true on the parent.

@therealjohn therealjohn merged commit a4d4c11 into huimiu/foundry-azure-yaml Jun 12, 2026
20 checks passed
@huimiu huimiu deleted the huimiu/foundry-schema-scaffold branch June 12, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.{agents,connections,inspector,projects,routines,skills,toolboxes} extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ext-agents] add microsoft.foundry azure.yaml schema

4 participants