Description:
In a scenario to re-run samples against an existing project, azd ai agent invoke failed for not recognize the agent service, though it has already been defined in azure.yaml.

yaml content:
requiredVersions:
extensions:
azure.ai.agents: '>=1.0.0-beta.4'
name: hello-world-python-invocations
services:
ai-project:
host: azure.ai.project
deployments: []
endpoint: https://cog-akuze6i4da7lm.services.ai.azure.com/api/projects/hello-world-python-invocations-d
hello-world-python-invocations:
project: src/hello-world-python-invocations
host: azure.ai.agent
language: python
uses:
- ai-project
codeConfiguration:
entryPoint: main.py
runtime: python_3_13
container:
resources:
cpu: "0.5"
memory: 1Gi
description: Minimal Hello World agent using the Invocations protocol with a bring-your-own approach. Calls a Foundry model via the Responses API and returns the response as a streaming SSE event stream.
displayName: Hello World (Python, Invocations)
environmentVariables:
- name: AZURE_AI_MODEL_DEPLOYMENT_NAME
value: ${AZURE_AI_MODEL_DEPLOYMENT_NAME}
kind: hosted
metadata:
tags:
- AI Agent Hosting
- Invocations Protocol
- Bring Your Own
- Python
name: hello-world-python-invocations
protocols:
- protocol: invocations
version: 2.0.0
infra:
provider: microsoft.foundry
Steps to Reproduce:
- Run
azd ai agent init --manifest "https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/bring-your-own/invocations/hello-world/azure.yaml" --project-id "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<ACCOUNT_NAME>/projects/<PROJECT_NAME>" --model-deployment "<MODEL_DEPLOYMENT_NAME>".
- Run
azd ai agent invoke --protocol invocations '{"message": "hello existing project hosted"}'.
Environment:
- Azd version: azd version azd version 1.27.1-daily.6542240 (commit a76daf4) (daily)
- AI Agent Extension version: 1.0.0-beta.5
- OS: Windows
- Location:
northcentralus.
Expected Behavior:
Remote invoke can succeed.
@JeffreyCA and @RickWinter for notification.
Description:

In a scenario to re-run samples against an existing project,
azd ai agent invokefailed for not recognize the agent service, though it has already been defined inazure.yaml.yaml content:
Steps to Reproduce:
azd ai agent init --manifest "https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/bring-your-own/invocations/hello-world/azure.yaml" --project-id "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<ACCOUNT_NAME>/projects/<PROJECT_NAME>" --model-deployment "<MODEL_DEPLOYMENT_NAME>".azd ai agent invoke --protocol invocations '{"message": "hello existing project hosted"}'.Environment:
northcentralus.Expected Behavior:
Remote invoke can succeed.
@JeffreyCA and @RickWinter for notification.