{"id":1102,"date":"2025-08-06T08:00:56","date_gmt":"2025-08-06T15:00:56","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/foundry\/?p=1102"},"modified":"2025-08-25T14:10:45","modified_gmt":"2025-08-25T21:10:45","slug":"announcing-the-browser-automation-tool-preview-in-azure-ai-foundry-agent-service","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/foundry\/announcing-the-browser-automation-tool-preview-in-azure-ai-foundry-agent-service\/","title":{"rendered":"Announcing the Browser Automation Tool (Preview) in Azure AI Foundry Agent Service"},"content":{"rendered":"<h2 aria-level=\"2\"><span data-contrast=\"none\">Overview<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><span class=\"TextRun SCXW77468507 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW77468507 BCX8\">Today, we are excited to announce the <\/span><\/span><strong><span class=\"TextRun SCXW77468507 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW77468507 BCX8\">Browser Automation Tool<\/span><\/span><\/strong><span class=\"TextRun SCXW77468507 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW77468507 BCX8\"><strong> (Preview)<\/strong> as the newest <\/span><span class=\"NormalTextRun CommentStart CommentHighlightPipeRest CommentHighlightRest SCXW77468507 BCX8\">action tool in Azure AI Foundry Agent Service<\/span><span class=\"NormalTextRun CommentHighlightPipeRest SCXW77468507 BCX8\"> through API and SDK<\/span><span class=\"NormalTextRun SCXW77468507 BCX8\">. This tool enables developers to build agents capable of performing real-world browser tasks\u2014such as searching, navigating, filling forms, booking appointments, and more\u2014through natural language prompts. <\/span><span class=\"NormalTextRun SCXW77468507 BCX8\">Powered by <\/span><\/span><a class=\"Hyperlink SCXW77468507 BCX8\" href=\"https:\/\/aka.ms\/pww\/docs\/overview\" target=\"_blank\" rel=\"noreferrer noopener\"><span class=\"TextRun Underlined SCXW77468507 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW77468507 BCX8\" data-ccp-charstyle=\"Hyperlink\">Playwright Workspaces<\/span><\/span><\/a><span class=\"TextRun SCXW77468507 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW77468507 BCX8\">, Browser Automation Tool brings isolated, cloud-hosted browser automation to your AI agents, supporting multi-turn interactions that mimic a real user\u2019s browsing experience.<\/span><\/span><span class=\"EOP SCXW77468507 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1102-1\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2025\/08\/Foundry-Agent-Browser-Use-Tool.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2025\/08\/Foundry-Agent-Browser-Use-Tool.mp4\">https:\/\/devblogs.microsoft.com\/foundry\/wp-content\/uploads\/sites\/89\/2025\/08\/Foundry-Agent-Browser-Use-Tool.mp4<\/a><\/video><\/div><\/p>\n<h2 aria-level=\"2\"><span data-contrast=\"none\">Key Benefits<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Natural Language to Automation:<\/span><\/b><span data-contrast=\"auto\"> Allow users to accomplish browser-based workflows simply by describing their goals in plain language.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Realistic Web Interactions:<\/span><\/b><span data-contrast=\"auto\"> Automate complex web UIs, including form fills, filters, reservations, and multi-step processes, just as a human user would.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Isolated Execution:<\/span><\/b><span data-contrast=\"auto\"> Each session runs in a sandboxed browser hosted within your own Azure subscription using Playwright Workspaces\u2014no need to manage VMs or browsers manually.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Multi-turn Conversations:<\/span><\/b><span data-contrast=\"auto\"> Supports iterative, conversational automation. Users can refine or correct their request in real time.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"5\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Modern, Reliable Automation:<\/span><\/b><span data-contrast=\"auto\"> Leveraging \u201cdown-parsing,\u201d the tool reads the page structure (DOM\/accessibility tree), allowing the agent to reason about web elements by their roles and labels\u2014not just pixels.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"6\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Flexible Use Cases:<\/span><\/b><span data-contrast=\"auto\"> Automate bookings, product research, form submissions, customer support tasks, and more.<\/span><\/li>\n<\/ul>\n<h2 aria-level=\"2\"><span data-contrast=\"none\">Example Use Cases<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Booking &amp; Reservations:<\/span><\/b><span data-contrast=\"auto\"> Automate class sign-ups, table bookings, or appointment scheduling by navigating complex forms.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Product Discovery:<\/span><\/b><span data-contrast=\"auto\"> Search and summarize ecommerce listings or reviews based on user criteria.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Web Form Interactions:<\/span><\/b><span data-contrast=\"auto\"> Submit documents, or update profile information automatically.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Customer Support Tasks:<\/span><\/b><span data-contrast=\"auto\"> Retrieve ticket updates, check account status, or navigate to specific customer information across web apps.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<h2 aria-level=\"2\"><span data-contrast=\"none\">How It Works<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<ol>\n<li><b><span data-contrast=\"auto\">User Query:<\/span><\/b><span data-contrast=\"auto\"> The user sends a natural language request to an agent (e.g., \u201cShow me all available yoga classes this week from url xxxx\u201d).<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Session Provisioning:<\/span><\/b><span data-contrast=\"auto\"> When an agent receives a request to perform browser automation, Azure AI Foundry Agent Service connects to your Playwright Workspaces (which you have already provisioned in your Azure subscription). The Playwright Workspaces service then launches an isolated, sandboxed browser session to execute the requested actions. All browser automation runs within your Azure boundary, managed by Playwright Workspaces<\/span><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Agent Reasoning:<\/span><\/b><span data-contrast=\"auto\"> The model analyzes the web page by parsing its DOM structure, not just images, and determines the actions needed (such as clicks, form fills, navigation).<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Action Execution:<\/span><\/b><span data-contrast=\"auto\"> The Browser Automation Tool performs each action inside the sandboxed session, capturing the updated state after every step.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Multi-turn Loop:<\/span><\/b><span data-contrast=\"auto\"> The agent receives feedback and iterates\u2014continuing to execute actions and update the user until the workflow is complete or the user stops the session.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ol>\n<p><span data-contrast=\"auto\">This approach combines the power of LLMs with reliable browser automation, offering much higher resilience and intelligence than pixel-based \u201cmouse click\u201d bots.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Security &amp; Responsible Use<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">WARNING:<\/span><\/b><\/p>\n<p><span data-contrast=\"auto\">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\u2019 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, including through resulting agents.\u202f<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">We strongly recommend using the Browser Automation Tool on low-privilege virtual machines with no access to sensitive data or critical resources.<\/span><\/b><span data-contrast=\"auto\">\u00a0<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">See the <\/span><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/ai-foundry\/responsible-ai\/agents\/transparency-note#enabling-autonomous-actions-with-or-without-human-input-through-action-tools\"><span data-contrast=\"none\">Transparency Note<\/span><\/a><span data-contrast=\"auto\"> for more guidance.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h3 aria-level=\"2\"><span data-contrast=\"none\">Code Samples\u00a0<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h3>\n<pre class=\"prettyprint language-py\"><code class=\"language-py\">import os\u00a0\r\n\r\nfrom azure.identity import DefaultAzureCredential\u00a0\r\n\r\nfrom azure.ai.agents import AgentsClient\u00a0\r\n\r\nfrom azure.ai.agents.models import MessageRole\u00a0\r\n\r\nfrom azure.ai.projects import AIProjectClient\u00a0\r\n\r\n\u00a0\r\n\r\n# Create a project client from a project endpoint, copied from your AI Foundry project.\u00a0\r\n\r\n# Example: project_endpoint = \"https:\/\/&lt;your-ai-services-resource-name&gt;.services.ai.azure.com\/api\/projects\/&lt;your-project-name&gt;\"\u00a0\r\n\r\n\r\nproject_endpoint = \u201cYOUT_PROJECT_ENDPOINT\u201d\u00a0\r\n\r\n\r\nproject_client = AIProjectClient(\u00a0\r\n\r\n\u00a0\u00a0\u00a0 endpoint=project_endpoint,\u00a0\r\n\r\n\u00a0\u00a0\u00a0 credential=DefaultAzureCredential()\u00a0\r\n\r\n)\u00a0\r\n\r\n\r\nplaywright_connection = project_client.connections.get(\u00a0\r\n\r\n\u00a0\u00a0\u00a0 name=\"YOUR_PLAYWRIGHT_CONNECTION_NAME\"\u00a0\r\n\r\n)\u00a0\r\n\r\nprint(playwright_connection.id)\u00a0\r\n\r\n\r\nwith project_client:\u00a0\r\n\r\n\u00a0\u00a0\u00a0 agent = project_client.agents.create_agent(\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 model=\"YOUR_MODEL_NAME\",\u00a0\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=\"my-agent\",\u00a0\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 instructions=\"use the tool to respond\",\u00a0\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 tools=[{\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"type\": \"browser_automation\",\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"browser_automation\": {\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"connection\": {\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"id\": playwright_connection.id,\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }],\u00a0\r\n\r\n\u00a0\u00a0\u00a0 )\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0 print(f\"Created agent, ID: {agent.id}\")\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0 thread = project_client.agents.threads.create()\u00a0\r\n\r\n\u00a0\u00a0\u00a0 print(f\"Created thread and run, ID: {thread.id}\")\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0 # Create message to thread\u00a0\r\n\r\n\u00a0\u00a0\u00a0 message = project_client.agents.messages.create(\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 thread_id=thread.id,\u00a0\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 role=\"user\",\u00a0\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 content=\"YOUR_QUERY_TO_THE_AGENT\")\u00a0\r\n\r\n\u00a0\u00a0\u00a0 print(f\"Created message: {message['id']}\")\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0 # Create and process an Agent run in thread with tools\u00a0\r\n\r\n\u00a0\u00a0\u00a0 run = project_client.agents.runs.create_and_process(\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 thread_id=thread.id,\u00a0\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 agent_id=agent.id,\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 )\u00a0\r\n\r\n\u00a0\u00a0\u00a0 print(f\"Run created, ID: {run.id}\")\u00a0\r\n\r\n\u00a0\u00a0\u00a0 print(f\"Run finished with status: {run.status}\")\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0 if run.status == \"failed\":\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(f\"Run failed: {run.last_error}\")\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0 run_steps = project_client.agents.run_steps.list(thread_id=thread.id, run_id=run.id)\u00a0\r\n\r\n\u00a0\u00a0\u00a0 for step in run_steps:\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(step)\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(f\"Step {step['id']} status: {step['status']}\")\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Check if there are tool calls in the step details\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 step_details = step.get(\"step_details\", {})\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 tool_calls = step_details.get(\"tool_calls\", [])\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if tool_calls:\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(\"\u00a0 Tool calls:\")\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for call in tool_calls:\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(f\"\u00a0\u00a0\u00a0 Tool Call ID: {call.get('id')}\")\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(f\"\u00a0\u00a0\u00a0 Type: {call.get('type')}\")\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 function_details = call.get(\"function\", {})\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if function_details:\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(f\"\u00a0\u00a0\u00a0 Function name: {function_details.get('name')}\")\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print()\u00a0 # add an extra newline between steps\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0 # Delete the Agent when done\u00a0\r\n\r\n\u00a0\u00a0\u00a0 project_client.agents.delete_agent(agent.id)\u00a0\r\n\r\n\u00a0\u00a0\u00a0 print(\"Deleted agent\")\u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0 # Fetch and log all messages\u00a0\r\n\r\n\u00a0\u00a0\u00a0 response_message = project_client.agents.messages.get_last_message_by_role(thread_id=thread.id, role=MessageRole.AGENT)\u00a0\r\n\r\n\u00a0\u00a0\u00a0 if response_message:\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for text_message in response_message.text_messages:\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(f\"Agent response: {text_message.text.value}\")\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for annotation in response_message.url_citation_annotations:\u00a0\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(f\"URL Citation: [{annotation.url_citation.title}]({annotation.url_citation.url})\")\u00a0\r\n\r\n# &lt;\/create run&gt; <\/code><\/pre>\n<h2 aria-level=\"2\"><span data-contrast=\"none\">Getting Started<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><b><span data-contrast=\"auto\">Prerequisites<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"5\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Azure subscription with permissions to create Playwright Workspaces and Azure AI Foundry resources<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"5\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Python 3.8+ (or use your preferred SDK)<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><b><span data-contrast=\"auto\">Step-by-Step Setup<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<ol>\n<li><b><span data-contrast=\"auto\">Provision a Playwright Workspace<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span>\n<ol>\n<li><a href=\"https:\/\/aka.ms\/pww\/docs\/manage-workspaces\"><span data-contrast=\"none\">Create a Playwright Workspace Resource<\/span><\/a><\/li>\n<li><a href=\"https:\/\/aka.ms\/pww\/docs\/manage-access-tokens\"><span data-contrast=\"none\">Generate an Access Token<\/span><\/a><\/li>\n<li><span data-contrast=\"auto\">Note your Workspace Region Endpoint<\/span><\/li>\n<\/ol>\n<\/li>\n<li><b><span data-contrast=\"auto\">Configure Permissions<\/span><\/b>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\">Assign your Project Identity the &#8220;Contributor&#8221; role on the Playwright Workspace, or set a custom role.<\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><a href=\"https:\/\/aka.ms\/pww\/docs\/manage-workspace-access\"><span data-contrast=\"none\">Role Assignment Guide<\/span><\/a><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Connect Playwright Workspace to Foundry<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span>\n<ol>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">In the Azure AI Foundry portal, open your AI Project.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Go to <\/span><i><span data-contrast=\"auto\">Management Center<\/span><\/i><span data-contrast=\"auto\"> \u2192 <\/span><i><span data-contrast=\"auto\">Connected Resources<\/span><\/i><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Create a new connection:<\/span><span data-ccp-props=\"{}\">\u00a0<\/span>\n<ol>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Type: <\/span><i><span data-contrast=\"auto\">Serverless Model<\/span><\/i><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Target URI: Playwright Workspace Region Endpoint (e.g., wss:\/\/&lt;region&gt;.api.playwright.microsoft.com\/playwrightworkspaces\/&lt;workspaceId&gt;\/browsers)<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Key: Playwright Access Token<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Create Your Agent<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span>\n<ol>\n<li aria-setsize=\"-1\" data-leveltext=\"%1.\" data-font=\"\" data-listid=\"6\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,0],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1.&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Use the connection ID from the previous step when configuring your Browser Automation Tool in the agent code.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"2\"><span data-contrast=\"none\">Learn More &amp; Get Started<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"9\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Get started with\u202f<\/span><a href=\"https:\/\/ai.azure.com\/\"><span data-contrast=\"none\">Azure AI Foundry\u202f<\/span><\/a><span data-contrast=\"auto\">and jump directly into\u202f<\/span><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=TeamsDevApp.vscode-ai-foundry\"><span data-contrast=\"none\">Visual Studio Code\u202f<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"9\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Download the\u202f<\/span><a href=\"https:\/\/aka.ms\/aifoundrysdk\"><span data-contrast=\"none\">Azure AI Foundry SDK\u202f<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"9\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"auto\">Read the\u202f<a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/ai-foundry\/agents\/how-to\/tools\/browser-automation\">documentation<\/a>\u202fto learn more about the feature.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"9\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"4\" data-aria-level=\"1\"><span data-contrast=\"auto\">Take the\u202f<\/span><a href=\"https:\/\/aka.ms\/CreateAgenticAISolutions\"><span data-contrast=\"none\">Azure AI Foundry Learn courses\u202f<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"9\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"5\" data-aria-level=\"1\"><span data-contrast=\"auto\">Keep the conversation going in\u202f<\/span><a href=\"https:\/\/aka.ms\/azureaifoundry\/forum\"><span data-contrast=\"none\">GitHub\u202f<\/span><\/a><span data-contrast=\"auto\">and\u202f<\/span><a href=\"https:\/\/aka.ms\/azureaifoundry\/discord\"><span data-contrast=\"none\">Discord\u202f<\/span><\/a><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">We look forward to seeing the innovative automation experiences you build!<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview\u00a0 Today, we are excited to announce the Browser Automation Tool (Preview) as the newest action tool in Azure AI Foundry Agent Service through API and SDK. This tool enables developers to build agents capable of performing real-world browser tasks\u2014such as searching, navigating, filling forms, booking appointments, and more\u2014through natural language prompts. Powered by Playwright [&hellip;]<\/p>\n","protected":false},"author":166509,"featured_media":1563,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[49,1],"tags":[],"class_list":["post-1102","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aiagent","category-microsoft-foundry"],"acf":[],"blog_post_summary":"<p>Overview\u00a0 Today, we are excited to announce the Browser Automation Tool (Preview) as the newest action tool in Azure AI Foundry Agent Service through API and SDK. This tool enables developers to build agents capable of performing real-world browser tasks\u2014such as searching, navigating, filling forms, booking appointments, and more\u2014through natural language prompts. Powered by Playwright [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts\/1102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/users\/166509"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/comments?post=1102"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/posts\/1102\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/media\/1563"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/media?parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/categories?post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/foundry\/wp-json\/wp\/v2\/tags?post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}