On October 19, 2026 Microsoft announced that the Browser automation tool in Microsoft Foundry is generally available. In plain terms, an AI agent built in Foundry can now be handed a managed cloud browser and told, in natural language, to open a website, read what is on the page, fill in a form and carry on through a multistep workflow. That matters because a surprising amount of real business work still happens in web interfaces that have no clean API: vendor portals, internal admin consoles, legacy systems and dashboards.
This guide is for developers and platform teams who already know the basics of building an agent and want to wire in browser control the way Microsoft intends it to be wired: through Playwright Workspaces for the browser infrastructure, and through a Foundry toolbox that exposes the tool to your agents over an MCP-compatible endpoint. It explains the moving parts, the order in which to set them up, a Python example adapted from Microsoft's announcement, and the safety controls you should switch on before an agent ever clicks a real button.
What the tool does and how it thinks
The Browser automation tool gives an agent a managed browser. Microsoft describes the agent as working through an observe-and-act loop: it inspects the current page, selects an appropriate browser operation, performs the action, and then verifies the resulting state before continuing. That last step is what separates this approach from a brittle script. A recorded script clicks the third button because the third button used to be the right one. An agent that checks the page after each action can notice that a dialog appeared, that the page re-rendered, or that the application flow changed, and adapt.
The tool works across the ways developers build agents in Foundry. Prompt agents are the fastest route: you configure instructions, a model and tools, and you have a browser-enabled agent. Hosted agents let you combine browser automation with custom orchestration, for example built with Microsoft Agent Framework or another framework. Microsoft also notes support for the GitHub Copilot harness, aimed at builders who want a managed way to create complex, long-running agents. Which of these you choose depends mostly on how much control over orchestration you need, and the same toolbox can serve all of them.
There is no need to install browser binaries or operate browser infrastructure inside the agent's own environment. Playwright Workspaces provisions and manages isolated cloud browser sessions on demand. One detail from the announcement is easy to miss and costs people an afternoon: Playwright Workspaces is provisioned separately as an Azure resource. It is not created automatically when you enable the tool, so plan for that step, and for whoever in your organization is allowed to create Azure resources.
Requirements and what to prepare
Before you start, line up four things. You need a Microsoft Foundry project with an agent, or the intent to create one. You need a Playwright Workspace created as an Azure resource. You need Azure credentials that your code can use, and the example below uses the Azure CLI credential, so signing in with the Azure CLI on your development machine is enough to run it locally. And you need a clear decision about what the agent is allowed to do, because that decision drives the controls you configure later.
If any of the sites your agent must reach live behind a virtual network, think about this now rather than later. Microsoft states that private network connectivity must be added while you provision the Playwright Workspace. The announcement says the Browser automation tool can interact with both public websites and private applications protected behind an Azure virtual network, so an agent can move across public and internal systems as one workflow while keeping the organization's network boundaries. If you provision the workspace without that connection, plan on creating a new one rather than assuming you can retrofit it, and check Microsoft's Playwright Workspaces documentation for current guidance.
For identity, Microsoft recommends Microsoft Entra identities and Azure role-based access control so that agents get only the access each workload needs. That is worth taking seriously. A browser agent that signs in as a powerful user can do whatever that user can do, and the model will not reliably know where the line is. Create a dedicated identity or account with the narrowest permissions that let the workflow complete.
Setup overview in the order that works
The announcement's own summary of getting started is short: create or select a Playwright Workspace, connect the Browser automation tool to a toolbox in Microsoft Foundry, and add the toolbox to your agent. Expanding that into a working order helps.
Create or select a Playwright Workspace in Azure. If you need the agent to reach private applications, include the private network connection at creation time. Note the connection you will use from Foundry.
In your Foundry project, create a connection to the browser automation resource. In Microsoft's sample code this appears as a project connection ID that you pass to the tool. Use the connection ID shown in your project rather than a placeholder.
Add the Browser automation tool to a toolbox. A toolbox is Microsoft's reusable way to curate, govern and share tools across agents. You add the tool, publish the toolbox, and the toolbox exposes an MCP-compatible endpoint.
Connect the toolbox to a Prompt agent or a Hosted agent through that endpoint. For a hosted agent you attach it as an MCP tool in code, as shown below.
Start with read-only behavior. Microsoft's advice is to begin with navigation and page-inspection tools, and to enable state-changing capabilities such as clicking, typing, form filling or file upload only when the scenario requires them.
Turn on approvals and watch the first runs in Live View before you let anything run unattended.
A Python example, adapted from Microsoft's announcement
The sample below follows the structure Microsoft published: create a toolbox containing the Browser automation tool, derive the toolbox's MCP URL, attach it to an agent built with Microsoft Agent Framework, and ask it to read information from a website. Placeholders such as the project endpoint and the connection ID must be replaced with your own values, and you should check Microsoft's current samples for exact package versions, since SDK surfaces change quickly after a general availability announcement.
PythonCopy import asyncio
from agent_framework import Agent
from agent_framework.foundry import FoundryChatClient, FoundryToolbox
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import (
BrowserAutomationToolboxTool,
BrowserAutomationToolParameters,
BrowserAutomationToolConnectionParameters,
)
from azure.identity import AzureCliCredential
PROJECT_ENDPOINT = "https://.services.ai.azure.com/api/projects/"
BROWSER_CONNECTION_ID = "your-browser-automation-connection-id"
async def main() -> None:
credential = AzureCliCredential()
# 1. Add the Browser automation tool to a toolbox. project = AIProjectClient(endpoint=PROJECT_ENDPOINT, credential=credential) tool = BrowserAutomationToolboxTool( browser_automation=BrowserAutomationToolParameters( connection=BrowserAutomationToolConnectionParameters( project_connection_id=BROWSER_CONNECTION_ID, ) ) ) toolbox = project.toolboxes.create_version( name="browser-automation-toolbox", description="Toolbox with the Browser Automation tool", tools=[tool], ) # 2. The toolbox exposes an MCP-compatible endpoint. TOOLBOX_MCP_URL = ( f"{PROJECT_ENDPOINT}/toolboxes/{toolbox.name}" f"/versions/{toolbox.version}/mcp?api-version=v1" ) # 3. Attach the toolbox to the agent as an MCP tool. toolbox_tool = FoundryToolbox(credential, url=TOOLBOX_MCP_URL) agent = Agent( client=FoundryChatClient(credential=credential), instructions=( "You help with browser automation tasks. Use the Browser Automation tool " "to navigate and read information from websites." ), tools=[toolbox_tool], ) result = await agent.run( "Go to finance.yahoo.com, search for MSFT, click 'YTD' on the price chart, " "and report the year-to-date percent change." ) print(f"Agent: {result.text}") if name == "main":
asyncio.run(main())
It is worth reading this sample as a pattern rather than a template to paste. The first block defines the tool and gives it the connection to your browser resource. The second turns that into a toolbox version, which is why the MCP URL includes both the toolbox name and its version. The third gives the agent a toolbox handle instead of hard-wiring individual tools. The advantage Microsoft highlights is that you curate tools once and reuse the toolbox across agents, with centralized identity and connection management, tool allow lists, approval controls, and tracing and observability in Foundry.
The prompt in the example is a deliberately harmless, read-only task: go to a public site, search, click one chart control and report a number. That is a good first test for your own setup. If your agent can complete a task like that, your connection, toolbox and credentials work, and you can move to a task on your own application.
Writing instructions that make a browser agent reliable
The agent's instructions matter as much as the plumbing. A browser agent given a vague goal will wander, so write instructions the way you would brief a careful temp worker on their first day. State the goal, the starting address, what counts as done, what to report back, and what it must never do. If the task has a confirmation step, say whether the agent should stop and ask before pressing the final button. Keep these policies in the system instructions rather than inside the task prompt, because Microsoft's guidance is to keep system policies separate from page content.
That guidance exists because web content is untrusted input. A page can contain text that looks like an instruction, whether through malice or by accident, and a model reading the page may treat it as one. Microsoft says developers should always treat web content as untrusted, keep system policies separate from page content, validate sensitive destinations and require human approval for consequential actions. Practically, that means an allow list of domains in your instructions and your network configuration, no standing credentials for anything you cannot afford to lose, and approvals for payments, deletions, sends and permission changes.
Prefer tasks that can be verified. Ask the agent to report the exact value it read and the page it read it from, so that a person can check. Ask it to stop and report when something unexpected appears, such as a login wall, a CAPTCHA or an unfamiliar dialog, rather than to improvise. Agents that are allowed to improvise around obstacles are the ones that produce surprising incidents.
Watching and steering: Live View and Take control
Two features keep a human connected to the workflow. Live View lets developers and operators observe an active browser session in real time, so you can see where the agent navigates, understand why a workflow is blocked, and investigate issues without reproducing the whole run. Take control lets a person temporarily interact with the browser directly, resolving an unexpected page state, completing a supervised step or steering the workflow before handing control back to the agent.
Use these deliberately during rollout. In the first runs of any new workflow, keep Live View open and compare what the agent does with what you expected. When the agent gets stuck on something that needs human judgment, such as a multi-factor prompt or an ambiguous choice between two similar records, Take control is the designed escape hatch, and it is better than loosening the agent's permissions to get past the obstacle.
Governance, approvals and least privilege
Browser actions can affect real systems, so Microsoft built in controls to keep workflows bounded and reviewable. Organizations can require approval before sensitive or state-changing operations, limit agents to the browser tools needed for a task, use isolated browser sessions for individual workflows, review browser activity through Live View and steer with Take control, and apply least-privilege access with managed identities and Azure role-based access control.
A sensible policy for a first deployment looks like this in prose rather than a checklist. Begin with a read-only agent that can navigate and inspect pages and nothing else. Add typing and form filling only for a workflow that needs it, and require approval on the final submit. Give the agent a dedicated identity with a role limited to the systems involved. Keep sessions isolated per workflow so that state, cookies and tabs from one task do not leak into another. Review traces from the first weeks of operation before widening scope.
Traces deserve a specific warning. Microsoft notes that Foundry traces can contain sensitive information, including prompts, model responses, system instructions, and tool-call arguments or results. For a browser agent, tool-call results can include text from pages that your agent visited, which may be personal or confidential. Microsoft points to guidance on restricting access to sensitive content in Foundry traces, which describes routing sensitive generative AI content to a dedicated AppGenAIContent table, protecting it with a deny-by-default access model and granting access only to authorized identities through Azure RBAC. Microsoft says this protection workflow is currently documented as a preview capability, so review its requirements before using it in production.
Good first use cases, and ones to avoid
Microsoft lists scenarios the tool unlocks: processing information across internal and external business portals, automating employee onboarding and IT administration workflows, retrieving data from vendor sites and entering it into private applications, investigating customer issues across public experiences and internal support tools, and automating legacy systems that do not provide modern APIs. What these have in common is that a person currently does them by clicking through screens, they are repetitive, and the correct outcome can be checked.
Good first candidates are read-heavy: collecting a status from a vendor portal, extracting a table from an internal dashboard, or checking whether a record exists in two systems. Candidates to postpone are anything irreversible or financially consequential: paying invoices, deleting records, changing access rights or sending messages to customers. Those are exactly the actions where Microsoft's approval controls should stay on, and where a human should stay in the loop until you have weeks of reliable traces.
If a system offers a real API, use the API. Browser automation is for the gaps. An agent clicking through a screen will always be slower, more expensive and less deterministic than a direct call, and a redesign of the page can change its behavior. The tool earns its place when the API does not exist, does not cover the needed function, or is blocked by organizational reality.
Troubleshooting
If the agent cannot start a browser session, first confirm that the Playwright Workspace exists as an Azure resource and that your Foundry project connection points to it, since Microsoft states it must be provisioned separately. If the agent cannot reach an internal site, check whether the private network connection was added when the workspace was provisioned, because Microsoft says that choice is made at provisioning time, and check the virtual network's routing and DNS from the workspace's point of view.
If your code fails creating the toolbox, verify the project endpoint, confirm that the Azure CLI is signed in with an identity that has permission on the project, and check that the connection ID is the real one from your project. If the model picks wrong actions, tighten the instructions, give the page address explicitly and break a long task into smaller ones. If it stalls on a login or an unexpected dialog, open Live View to see the state, and use Take control to resolve it.
If a workflow works in a test and fails in production, compare the pages the agent sees: an authentication step, a cookie banner, a regional variant or a feature flag can change what is on the page. Review the trace and the Live View recording where available, and update the instructions to describe the variation.
Frequently Asked Questions
Do I need to install a browser or Playwright locally?
No. Microsoft says there is no need to install browser binaries or operate browser infrastructure inside the agent environment, because Playwright Workspaces provisions and manages isolated cloud browser sessions on demand. You do need to provision a Playwright Workspace as an Azure resource.
Can the agent use internal websites?
Yes, with the right setup. Microsoft says the tool can interact with public websites and private applications protected behind an Azure virtual network, and that the private network connection should be added while provisioning the Playwright Workspace.
What is a toolbox and why use one?
A toolbox in Microsoft Foundry is a reusable way to curate, govern and share tools across agents. You add the Browser automation tool to a toolbox, publish it and connect it to Prompt agents or Hosted agents through its MCP-compatible endpoint, which gives you shared configuration, allow lists, approvals and tracing.
Which agents can use the tool?
Microsoft says it works across Prompt agents, Hosted agents built with Microsoft Agent Framework or another framework, and with GitHub Copilot harness support for complex, long-running agents.
How do I keep a browser agent from doing something harmful?
Start with read-only navigation and inspection, enable state-changing actions only when a scenario needs them, require approval for sensitive operations, use least-privilege identities, treat web content as untrusted input, and watch early runs with Live View and Take control.
Is the trace-protection feature production-ready?
Microsoft describes the protection workflow for sensitive trace content as currently documented as a preview capability, so review its requirements before relying on it in production.
Images: Microsoft (official image from the Microsoft Foundry blog announcement).
Originally published on Mango Developer.