Skip to content

Commit a2687f0

Browse files
committed
feedback
1 parent d8a0592 commit a2687f0

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ 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-
29-
[!INCLUDE [model-name-portal](../../includes/model-name-portal.md)]
30-
31-
3228
* 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**.
3329

30+
<!--
3431
:::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":::
32+
-->
33+
Save this name to an environment variable named `PLAYWRIGHT_CONNECTION_NAME`.
34+
35+
* [!INCLUDE [model-name-portal](../../includes/model-name-portal.md)]
3536

37+
Save this name to an environment variable named `MODEL_DEPLOYMENT_NAME`.
3638

3739

3840
```python
@@ -42,21 +44,21 @@ from azure.ai.agents import AgentsClient
4244
from azure.ai.agents.models import MessageRole
4345
from azure.ai.projects import AIProjectClient
4446

45-
project_endpoint = "https://<your-ai-services-resource-name>.services.ai.azure.com/api/projects/<your-project-name>"
47+
project_endpoint = os.environ["PROJECT_ENDPOINT"] # Ensure the PROJECT_ENDPOINT environment variable is set
4648

4749
project_client = AIProjectClient(
4850
endpoint=project_endpoint,
4951
credential=DefaultAzureCredential()
5052
)
5153

5254
playwright_connection = project_client.connections.get(
53-
name="connection-1-microsoft-playwright"
55+
name=os.environ["PLAYWRIGHT_CONNECTION_NAME"]
5456
)
5557
print(playwright_connection.id)
5658

5759
with project_client:
5860
agent = project_client.agents.create_agent(
59-
model="gpt-4o",
61+
model=os.environ["MODEL_DEPLOYMENT_NAME"],
6062
name="my-agent",
6163
instructions="use the tool to respond",
6264
tools=[{

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ ms.custom: azure-ai-agents
1414

1515
# Browser automation (preview)
1616

17-
> [!CUATION]
18-
> We strongly recommend using the browser automation Tool on a low privilege virtual machine with no access to sensitive data.
17+
> [!WARNING]
18+
> The browser automation tool comes with significant security risks. Both errors in judgment by the AI and the presence of malicious or confusing instructions on web pages which the AI encounters may cause it to execute commands you or others do not intend, which could compromise the security of your or other users' browsers, computers, and any accounts to which the browser or AI has access, including personal, financial, or enterprise systems. By using the browser automation tool, you are acknowledging that you bear responsibility and liability for any use of it and of any resulting agents you create with it, including with respect to any other users to whom you make Browser Automation Tool functionality available. 
1919
20-
Browser automation tool enables users to perform real-world browser tasks through natural language prompts. Powered by [Microsoft Playwright Workspaces (preview)](/azure/playwright-testing/overview-what-is-microsoft-playwright-testing), it facilitates multi-turn conversations to automate browser-based workflows such as searching, navigating, filling forms, and booking.
20+
Browser automation tool enables users to perform real-world browser tasks through natural language prompts. Powered by [Microsoft Playwright Workspaces](/azure/playwright-testing/overview-what-is-microsoft-playwright-testing), it facilitates multi-turn conversations to automate browser-based workflows such as searching, navigating, filling forms, and booking.
2121

2222
## How it works
2323

@@ -73,5 +73,3 @@ The browser automation tool supports multi-turn conversations, allowing the user
7373
Review the [transparency note](/azure/ai-foundry/responsible-ai/agents/transparency-note#enabling-autonomous-actions-with-or-without-human-input-through-action-tools) when using this tool. The browser automation tool is a tool that can perform real-world browser tasks through natural language prompts, enabling automated browsing activities without human intervention.
7474

7575
Review the [responsible AI considerations](/azure/ai-foundry/responsible-ai/agents/transparency-note#considerations-when-choosing-a-use-case) when using this tool.
76-
77-
The browser automation tool carries substantial security risks and user responsibility: Errors in AI judgment or malicious and misleading instructions on web pages can lead the AI to execute unintended commands, potentially compromising the security of your browser, computer, or any linked accounts, including personal, financial, or enterprise systems. By using the browser automation tool, you accept full responsibility and liability for its use and for any agents you create with it, including any impact on other users who gain access to the tool's functionality through your agents.

0 commit comments

Comments
 (0)