Azure / Azure/azure-sdk-for-python

Azure AI Agents: Improve Error Messaging and Setup Guidance for Azure AI Search as a tool in Private Network Agents

Open
#42,527 6 comments 1 reaction 1 assignee Claimed by @sarah-widder View on GitHub
AI AI Agents Client customer-reported needs-team-attention question Service Attention
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

**Is your feature request related to a problem? Please describe.**
Yes. We're trying to set up the Search Knowledge tool in one of the agents within AI Foundry. The Search Resource connection has been added to the project connections without any errors (with Entra ID authentication and appropriate roles). Note that the search resource resides in a private network. Also, search knowledge tool was configured in the agent without any errors as well. When the agent **attempts to query the search tool**, it throws a generic error stating that the search configuration is invalid. The thread run logs on the portal provide no meaningful insight.

Image

However, when running the setup programmatically, a more informative error is returned:
```
Error: invalid_search_request; Invalid configuration for Azure AI Search index. Unable to resolve Connection for Azure AI Search resource. Project has public networking disabled, but the agent setup is not fully configured for private networking. Please use the setup template at https://aka.ms/FoundryAgentVNET to configure the agent for private networking.
```
This lack of clarity in error messaging during portal setup slows down debugging and resolution.

**Describe the solution you'd like**
We’d like the portal to surface clearer and more actionable error messages when a Search Resource is added to a project especially when private networking is involved. Ideally, the portal should:

- Validate the configuration at the time of resource connection.
- Display specific guidance if the setup is incomplete or incompatible.
- Include links to relevant setup templates or documentation (e.g., https://aka.ms/FoundryAgentVNET).

**Describe alternatives you've considered**
Running the setup programmatically to get more detailed error messages.
Manually checking networking configurations and role assignments.
Reviewing logs and documentation to infer the issue.

While these alternatives help, they are time-consuming and not user-friendly for quick troubleshooting.

**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.