Azure / Azure/azure-sdk-for-python
Sample agent_to_agent code does not work
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 3.4k
- Merge medio
- 2g
- PR unite (30g)
- 217
Descrizione
- **Package Name**: azure-ai-projects
- **Package Version**: 2.2.0
- **Operating System**: Windows
- **Python Version**: 3.12
**Describe the bug**
The [agent_to_agent.py code sample](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_to_agent.py) results in the following error:
`openai.APIError: Agent card path must target the same host, project, and agent as the server URL.`
**To Reproduce**
The same error occurs whether you create the A2A agent and connections in the Foundry Portal or using Powershell scripts:
1. In an existing Foundry project, create an A2A agent either in the Foundry Portal or by configuring it [using the doc instructions](https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/enable-agent-to-agent-endpoint?tabs=python%2Cverify-bash%2Cconnection-powershell#enable-incoming-a2a)
2. Create an A2A Tool either in the Foundry Portal or by using the powershell script referenced in the docs.
3. Connect to the project, attach the A2APreviewTool to an agent and run a prompt
**Expected behavior**
The agent should be able to invoke the A2A tool. Instead, the error occurs:
`openai.APIError: Agent card path must target the same host, project, and agent as the server URL.`
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.