You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running azd ai agent init -m <path-to-agent.yaml>, the command panics during YAML parsing with an interface conversion error. This happens before any Azure resources are accessed, immediately after reading the agent.yaml file.
Install the azure.ai.agents extension: azd ext install azure.ai.agents
Create an agent.yaml file (see below)
Run: azd ai agent init -m "path/to/agent.yaml" --no-prompt
agent.yaml content
# yaml-language-server: $schema=https://raw.githubusercontent.com/microsoft/AgentSchema/refs/heads/main/schemas/v1.0/ContainerAgent.yamlkind: hostedname: lego-social-media-agentdescription: | An AI-powered social media content generator for LEGO products.metadata:
authors:
- LEGO Social Media Teamexample:
- content: Generate a Twitter post about Star Wars LEGO setsrole: usertags:
- Social Media
- Content Generationprotocols:
- protocol: responsesversion: v1environment_variables:
- name: POSTGRES_SERVERvalue: ${POSTGRES_SERVER}
- name: POSTGRES_DATABASEvalue: ${POSTGRES_DATABASE}
Description
When running
azd ai agent init -m <path-to-agent.yaml>, the command panics during YAML parsing with an interface conversion error. This happens before any Azure resources are accessed, immediately after reading the agent.yaml file.Environment
Steps to Reproduce
azd ext install azure.ai.agentsagent.yamlfile (see below)azd ai agent init -m "path/to/agent.yaml" --no-promptagent.yaml content
Error Output
Additional Notes
agent.yamlfrom thecopilot-hosted-agentsample and received the same errorparse.go:50duringExtractAgentDefinition, suggesting the YAML parser expects a specific structure that isn't being foundazd ai agent init- panic when initializing agent #6050 which panicked later in the flow (after model SKU selection)Expected Behavior
The command should either:
Impact
This bug completely blocks the
azd ai agentworkflow for deploying hosted agents to Azure AI Foundry.