Skip to content

azd ai agent doctor requires deprecated standalone agent.yaml #9223

Description

@herohua
  • Make sure you've installed the latest version using instructions

Output from azd version

Affected released component: azure.ai.agents extension 1.0.0-beta.6, published on 2026-07-17 (release). The behavior was verified directly in that release tag. This extension release requires azd >=1.27.0.

Describe the bug

azd ai agent doctor still assumes every host: azure.ai.agent service has a standalone <service project>/agent.yaml file.

Current Foundry agent projects keep the agent definition directly on the azure.ai.agent service entry in azure.yaml. The standalone agent.yaml and nested config: shapes are documented as legacy migration formats. The deploy/runtime path supports the new inline shape, but the doctor check does not, so a valid current-format project can deploy successfully while doctor reports a false failure.

The affected check is local.agent-yaml-valid in internal/cmd/doctor/checks_project.go. It unconditionally constructs and reads <projectPath>/<service.RelativePath>/agent.yaml and recommends ensuring that file exists.

To Reproduce

  1. Create an azure.yaml using the current inline agent definition shape, for example:

    services:
      assistant:
        host: azure.ai.agent
        project: ./agents/assistant
        kind: hosted
        name: assistant
        description: A simple assistant
  2. Do not create ./agents/assistant/agent.yaml, because the definition is already inline in azure.yaml.

  3. Run azd ai agent doctor.

  4. Observe that local.agent-yaml-valid fails because agent.yaml cannot be read.

Expected behavior

Doctor should validate the same resolved agent definition as deploy/runtime:

  1. Prefer the unified service-level definition in azure.yaml.
  2. Fall back to the deprecated nested config: shape or standalone agent.yaml/agent.yml during the migration window.
  3. Report a source-neutral check name such as agent definition valid (per service).

The doctor implementation could reuse project.LoadAgentDefinition, which already implements this resolution order, instead of directly opening agent.yaml.

Environment

azure.ai.agents extension 1.0.0-beta.6 (released 2026-07-17; requires azd >=1.27.0). Verified against the published release tag azd-ext-azure-ai-agents_1.0.0-beta.6. The issue also remains present on main at commit 32053d1f4feb7689f922f8cd07edfabc75be7389 as of 2026-07-21.

Additional context

Relevant source in the released 1.0.0-beta.6 tag:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions