LangChain gives managed AI agents browsers for web tasks and app testing
The remote browsers can retain a user’s signed-in sessions or start fresh for each conversation. A private connection also lets agents test apps without publishing them online.
Listen to this story
The audio brief
Story brief
3 key pointsLangChain added remote browser execution to Managed Deep Agents in LangSmith on October 29, extending agents beyond APIs to web workflows and application testing. Browsers run in a separate LangSmith sandbox, with a human sign-in handoff; thread scope resets cookies by default, while user scope shares browser state across conversations. In 100 live-site WebVoyager tasks, LangChain reports a 90% pass rate for $1.98, versus Browserbase’s MCP server at 89% for nine times the cost; LangChain says more testing details are due next week.
- 01
The browser_run tool can batch navigation, form entry, clicks, and checks in one call, which LangChain says keeps tasks fast and limits page content in the model’s context.
- 02
People authenticate through an interactive browser card in LangSmith Studio, avoiding the need to put passwords in model messages, traces, or model-provider systems.
- 03
A private connection lets the browser test an app running in the agent sandbox through localhost, without making the app publicly accessible.
AI agents running in LangSmith can now click through websites, fill out forms and check an app’s signup flow without developers operating the browser infrastructure. LangChain added browser support to Managed Deep Agents on October 29, pairing remote browsers with control tools and a handoff that lets people sign in before returning control to the agent.
A browser for the gaps between APIs
LangChain identifies two uses: completing web tasks that lack a suitable API—a software interface an agent can call directly—and testing applications by clicking through their pages. Its examples include reservations and checking a changed signup form. The company recommends using an API when one already covers the task.
The browser runs remotely in its own LangSmith sandbox, an execution environment separate from the agent. Nothing runs on the user’s machine. Its control tools build on Stagehand, Browserbase’s open-source browser-agent toolkit. A snapshot tool reads the page’s accessibility tree, a structured description of its elements, and assigns IDs to interactive controls; another tool captures screenshots.
The main action tool, browser_run, accepts code that can open a page, fill a field, click and check the result in one call. LangChain says batching those steps keeps long tasks fast and limits how much page content enters the model’s working context. Developers enable the browser by exporting this configuration from browser.py at the project root:
from managed_deepagents import define_browser
browser = define_browser(
scope="thread",
idle_ttl_seconds=600,
)People sign in; agents resume
Login is a deliberate handoff point. When the agent needs someone to sign in, browser_handoff presents an interactive browser card in LangSmith Studio. The person signs in and selects Hand back; the agent continues in the authenticated browser. LangChain describes this as an alternative to giving the agent a password that would enter model messages, traces and the model provider’s systems.
Handoff comes with every managed browser and also works in Managed Deep Agents channels such as Slack. Whether that login survives into another conversation depends on the session scope developers choose.
Testing without a public app URL
For application testing, a private connection bridges the browser and agent sandboxes. The agent starts the app in its own sandbox, then directs the browser to it through localhost. Here, localhost refers to the agent’s environment, not the browser’s. That lets the browser exercise real user flows without requiring a public URL for the app.
After a successful test, developers can ask the agent to save its steps as a Playwright test file. LangChain says subsequent runs can replay that file without model calls until the page changes. The company already uses browser-based frontend testing in Open SWE, its coding agent.
LangChain’s own benchmark gives an initial performance claim: its tools passed 90% of 100 WebVoyager tasks on live websites for $1.98 total. That was the highest pass rate among seven toolsets it tested. The closest, Browserbase’s MCP server, passed 89% at nine times the cost. LangChain says a deeper account of testing and tuning will follow next week.
Sources
- langchain.comBrowser Use in Managed Deep Agents
Reader comments
Newest comments first. Replies stay oldest first.