@ejazullah/smart-browser-automation
Version:
A smart AI-driven browser automation library and REST API server using MCP (Model Context Protocol) and LangChain for multi-step task execution. Includes both programmatic library usage and HTTP API server for remote automation.
24 lines (18 loc) • 895 B
text/typescript
// Example usage with TypeScript to demonstrate proper type support
import { SmartBrowserAutomation, HuggingFaceConfig, type TaskExecutionOptions } from '@ejazullah/smart-browser-automation';
async function exampleUsage() {
// This should work with proper TypeScript support
const config = new HuggingFaceConfig('your-api-key');
const automation = new SmartBrowserAutomation({ maxSteps: 10 });
const options: TaskExecutionOptions = {
verbose: true,
onProgress: (update) => {
console.log(`Progress: ${update.message}`);
}
};
// This would work in a real scenario with proper MCP server
// await automation.initialize(config, 'http://localhost:3000', 'ws://localhost:9222');
// const result = await automation.executeTask('Navigate to Google and search for "AI"', options);
console.log('TypeScript example completed successfully');
}
exampleUsage();