Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
azure-ai-projects Python SDK (2.6.0 or later).
For information on optimizing tool usage, see best practices.
Prerequisites
Before you begin, ensure you have:- An active Microsoft Foundry project with a deployed model.
- Access to Web IQ. Web IQ is available in limited access to select Azure customers. If you don’t have access, request access.
- A Web IQ project connection in your Foundry project. See Create a Web IQ project connection.
-
The
azure-ai-projectsPython package, version 2.6.0 or later, and theazure-identityPython package: -
The Azure CLI, signed in to the subscription that hosts your Foundry project:
Create a Web IQ project connection
After your access is approved, get your API key from Web IQ Profile Management. For more information about using the key, see the Web IQ Quick Start. Create a project connection that stores the key and supplies it to the Web IQ MCP endpoint:- In the Foundry portal, open your project, and then select Tools.
- Select Connect tool, and then select Catalog.
- Search for and select Web IQ.
- Enter a connection name and your Web IQ API key.
- Create the connection and copy its fully qualified resource ID. Use this value for
WEB_IQ_PROJECT_CONNECTION_IDin the samples.
RemoteTool connection with CustomKeys authentication. Use https://api.microsoft.ai/v3/mcp as the target and x-apikey as the credential name.
For general guidance about storing shared credentials in a project connection, see Key-based MCP authentication.
Set the following environment variables before running the samples:
FOUNDRY_PROJECT_ENDPOINT— your project endpoint, found on the Overview page of your Foundry project.WEB_IQ_PROJECT_CONNECTION_ID— the fully qualified resource ID of your Web IQ project connection.
Add Web IQ to a prompt agent
UseWebIQPreviewTool to add Web IQ directly to a server-side prompt agent. Set allow_preview=True on AIProjectClient because WebIQPreviewTool is a preview feature.
Parameter reference
The following parameters apply toWebIQPreviewTool.
Approval behavior
Therequire_approval setting controls whether the agent pauses for human approval before it executes a Web IQ action.
The default is
"always". Web IQ actions don’t run automatically unless you explicitly set require_approval="never". To allow fully automatic operation, pass require_approval="never" when you construct the tool: