Custom tools can now spawn isolated browser pages within a shared session context.
New properties on ToolExecutionContext:
browserContext— direct access to Playwright BrowserContextcreatePage()— creates pages with anti-detection scripts applied
Pages inherit session state (cookies, localStorage, proxy config) and are tracked for automatic cleanup on errors.
async call(params, ctx?: ToolExecutionContext) {
const page = await ctx.createPage();
try {
await page.goto(url);
// ... operations without affecting main page
return { output: 'Success' };
} finally {
await page.close();
}
}This enables:
- Email activation links without losing form state
- Cross-domain data lookups mid-workflow
- Parallel page operations
- Sub-agent delegation to isolated pages
For the complete architectural analysis, implementation patterns, and diagrams:
Multi-Context Browser Control for Agentic Systems →