/** * Unified BrowserTools for Strands SDK * * Provides browser automation tools and session management in one class. * Thin wrapper around PlaywrightBrowser - all logic lives in the Playwright integration. */ import { PlaywrightBrowser } from '../playwright/client.js'; import type { BrowserClientConfig, SessionInfo } from '../../types.js'; import { createNavigateTool } from './navigate-tool.js'; import { createClickTool } from './click-tool.js'; import { createTypeTool } from './type-tool.js'; import { createGetTextTool } from './get-text-tool.js'; import { createGetHtmlTool } from './get-html-tool.js'; import { createScreenshotTool } from './screenshot-tool.js'; import { createEvaluateTool } from './evaluate-tool.js'; /** * BrowserTools - All-in-one browser automation for Strands SDK * * Provides browser automation tools and session management. * All browser logic is in PlaywrightBrowser - this is just a thin wrapper. * * @example * ```typescript * import { BrowserTools } from 'bedrock-agentcore/experimental/browser/strands' * import { Agent, BedrockModel } from '@strands-agents/sdk' * * // Create tools instance * const browser = new BrowserTools({ region: 'us-west-2' }) * * // Start session (optional - automatically started on first use) * await browser.startSession() * * // Create agent with browser tools * const agent = new Agent({ * model: new BedrockModel({ modelId: 'anthropic.claude-sonnet-4-20250514-v1:0' }), * tools: browser.tools, * }) * * // Or use client directly * await browser.getClient().navigate({ url: 'https://example.com' }) * * // Clean up when done * await browser.stopSession() * ``` */ export declare class BrowserTools { private client; /** * Tool for navigating to URLs */ readonly navigate: ReturnType; /** * Tool for clicking elements */ readonly click: ReturnType; /** * Tool for typing text */ readonly type: ReturnType; /** * Tool for getting text content */ readonly getText: ReturnType; /** * Tool for getting HTML */ readonly getHtml: ReturnType; /** * Tool for taking screenshots */ readonly screenshot: ReturnType; /** * Tool for evaluating JavaScript */ readonly evaluate: ReturnType; /** * All tools in an array for easy spreading into agent config * * @example * ```typescript * const agent = new Agent({ * tools: browser.tools, // spreads all browser tools * }) * * // Or combine with other tools * const agent = new Agent({ * tools: [...codeInterpreter.tools, ...browser.tools], * }) * ``` */ readonly tools: Array | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType>; constructor(config?: BrowserClientConfig); /** * Start a browser session * * Sessions are automatically started on first tool use, but you can * call this explicitly to start the session upfront. * * @param sessionName - Optional session name for AWS * @param timeout - Optional session timeout in seconds (default: 3600, max: 28800) * @returns Session information */ startSession(sessionName?: string, timeout?: number): Promise; /** * Stop the current browser session * * Call this when you're done using the tools to clean up resources. */ stopSession(): Promise; /** * Get the underlying PlaywrightBrowser * * Provides direct access to the client for advanced use cases. * * @returns The PlaywrightBrowser instance */ getClient(): PlaywrightBrowser; } //# sourceMappingURL=tools.d.ts.map