Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Deploy, evaluate, and manage AI agents end-to-end on Microsoft Azure AI Foundry
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
foundry-agent/agent-optimizer/references/azd-setup.md
1# azd Setup23Use this before running Agent Optimizer operations. This skill targets agent code repos that use azd and hosted agents.45## Verify prerequisites67Run from the selected agent repo:89```bash10azd version11az login12azd ai agent --help13azd ai agent optimize --help14```1516If `azd ai agent` is unavailable, install or update the `azure.ai.agents` azd extension using the official extension source. If the needed version is private preview only, ask the user for their approved extension source; do not embed private registry commands.1718## Resolve hosted-agent context1920Use [Common Project Context Resolution](../../../SKILL.md#agent-common-project-context-resolution). Prefer azd context from `azure.yaml` and `azd env get-values`.2122Confirm:2324- selected service uses `host: azure.ai.agent`25- selected root contains Python agent code26- agent kind is `hosted`27- project endpoint/project ID and deployed agent name/version are known2829If `agent.yaml` is missing, ask before initializing:3031```bash32azd ai agent init --project-id <project-id>33```3435Use the project ID from azd context when available; otherwise ask the user. After init, stop for review of generated `agent.yaml`.36