🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@agent-infra/browser

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agent-infra/browser

agent-infra browser

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
5
Created
Source
简体中文 | English

@agent-infra/browser

@agent-infra/browser is an SDK based on puppeteer specifically designed to provide foundational functionality for browser agents. It provides high-level abstractions for tab management, dialog handling, hotkey support, and more while maintaining simple and intuitive APIs.

Installation

npm install @agent-infra/browser

Quick Start

Here is a simple usage demo. Browser will find the Chrome or Edge browser installed on your computer, launch a controlled browser instance, and then execute some operations through CDP control.

import { Browser } from '@agent-infra/browser';

// Create browser instance
const browser = await Browser.create();

// Set User-Agent (optional)
browser.setUserAgent({
  userAgent:
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
});

// Get current active tab
const activeTab = browser.getActiveTab();

// Navigate to specified webpage
await activeTab.goto('https://example.com');

// Take screenshot
const screenshot = await activeTab.screenshot();

// Close browser
await browser.close();

Complete Documentation

For detailed API documentation and advanced usage examples, please refer to our complete documentation.

License

Apache License 2.0.

Credits

Special thanks to the open source projects that inspired this toolkit:

  • puppeteer - The underlying browser automation library
  • Chrome DevTools Protocol - Chrome DevTools Protocol

FAQs

Package last updated on 10 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts