Skip to content

Commit 6f204b5

Browse files
Merge pull request #6494 from MicrosoftDocs/main
Auto Publish – main to live - 2025-08-08 22:04 UTC
2 parents 7cbfab7 + 68506b1 commit 6f204b5

File tree

45 files changed

+459
-473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+459
-473
lines changed

articles/ai-foundry/agents/how-to/tools/bing-code-samples.md

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ print("Deleted agent")
162162
::: zone-end
163163

164164
::: zone pivot="csharp"
165+
165166
## Create a project client
166167

167168
Create a client object, which will contain the project endpoint for connecting to your AI project and other resources.
@@ -170,19 +171,10 @@ Create a client object, which will contain the project endpoint for connecting t
170171
using Azure;
171172
using Azure.AI.Agents.Persistent;
172173
using Azure.Identity;
173-
using Microsoft.Extensions.Configuration;
174-
using System;
175-
using System.Threading;
176-
177-
// Get Connection information from app configuration
178-
IConfigurationRoot configuration = new ConfigurationBuilder()
179-
.SetBasePath(AppContext.BaseDirectory)
180-
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
181-
.Build();
182174

183-
var projectEndpoint = configuration["ProjectEndpoint"];
184-
var modelDeploymentName = configuration["ModelDeploymentName"];
185-
var bingConnectionId = configuration["BingConnectionId"];
175+
var projectEndpoint = System.Environment.GetEnvironmentVariable("ProjectEndpoint");
176+
var projectEndpoint = System.Environment.GetEnvironmentVariable("ModelDeploymentName");
177+
var projectEndpoint = System.Environment.GetEnvironmentVariable("BingConnectionId");
186178

187179
// Create the Agent Client
188180
PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential());
@@ -193,18 +185,10 @@ PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCreden
193185
To make the Grounding with Bing search tool available to your agent, use a connection to initialize the tool and attach it to the agent. You can find your connection in the **connected resources** section of your project in the [Azure AI Foundry portal](https://ai.azure.com/?cid=learnDocs).
194186

195187
```csharp
196-
BingGroundingSearchConfiguration searchConfig = new BingGroundingSearchConfiguration(bingConnectionId)
197-
{
198-
Count = 5,
199-
Freshness = "Week"
200-
};
201-
202-
// Create the BingGroundingToolDefinition object used when creating the agent
203-
BingGroundingToolDefinition bingGroundingTool = new BingGroundingToolDefinition(
188+
189+
BingGroundingToolDefinition bingGroundingTool = new(
204190
new BingGroundingSearchToolParameters(
205-
[
206-
searchConfig
207-
]
191+
[new BingGroundingSearchConfiguration(bingConnectionId)]
208192
)
209193
);
210194

@@ -335,7 +319,6 @@ Clean up the resources from this sample.
335319
agentClient.Threads.DeleteThread(threadId: thread.Id);
336320
agentClient.Administration.DeleteAgent(agentId: agent.Id);
337321
```
338-
339322
::: zone-end
340323

341324
::: zone pivot="javascript"

articles/ai-foundry/agents/how-to/tools/browser-automation-samples.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: azure-ai-agent-service
66
manager: nitinme
77
ms.service: azure-ai-agent-service
88
ms.topic: how-to
9-
ms.date: 07/29/2025
9+
ms.date: 08/08/2025
1010
author: aahill
1111
ms.author: aahi
1212
ms.custom: azure-ai-agents
@@ -25,7 +25,15 @@ Use this article to find step-by-step instructions and code samples for using th
2525

2626
Save this endpoint to an environment variable named `PROJECT_ENDPOINT`.
2727

28-
* Your playwright connection ID. You can find it in the Azure AI Foundry portal by selecting **Management center** from the left navigation menu. Then select **Connected resources**.
28+
* The following packages:
29+
30+
```console
31+
pip install --pre azure-ai-projects
32+
pip install azure-ai-agents==1.2.0b1
33+
pip install azure-identity
34+
```
35+
* The **contributor** role assigned to your AI Foundry project from within your Playwright workplace.
36+
* Your playwright connection ID. You can find it in the Azure AI Foundry portal by selecting **Management center** from the left navigation menu. Then select **Connected resources**. The URL should start with `https://` instead of `wss://` if presented.
2937
3038
<!--
3139
:::image type="content" source="../../media/tools/deep-research/bing-resource-name.png" alt-text="A screenshot showing the Playwright connection. " lightbox="../../media/tools/deep-research/bing-resource-name.png":::

0 commit comments

Comments
 (0)