npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@browseros-ai/agent-sdk

v0.0.7

Published

Browser automation SDK for BrowserOS - navigate, interact, extract data with natural language

Readme

@browseros-ai/agent-sdk

Browser automation SDK for BrowserOS — navigate, interact, extract data, and verify page state using natural language.

Installation

npm install @browseros-ai/agent-sdk
# or
bun add @browseros-ai/agent-sdk

Quick Start

import { Agent } from '@browseros-ai/agent-sdk'
import { z } from 'zod'

const agent = new Agent({
  url: 'http://localhost:3000',
  llm: {
    provider: 'openai',
    apiKey: process.env.OPENAI_API_KEY,
  },
})

// Navigate to a page
await agent.nav('https://example.com')

// Perform actions with natural language
await agent.act('click the login button')

// Extract structured data
const { data } = await agent.extract('get all product names and prices', {
  schema: z.array(z.object({
    name: z.string(),
    price: z.number(),
  })),
})

// Verify page state
const { success, reason } = await agent.verify('user is logged in')

API Reference

new Agent(options)

Create a new agent instance.

const agent = new Agent({
  url: string,           // BrowserOS server URL
  llm?: LLMConfig,       // Optional LLM configuration
  onProgress?: (event) => void,  // Progress callback
})

agent.nav(url, options?)

Navigate to a URL.

const { success } = await agent.nav('https://google.com')

agent.act(instruction, options?)

Perform browser actions using natural language.

// Simple action
await agent.act('click the submit button')

// With context interpolation
await agent.act('search for {{query}}', {
  context: { query: 'browseros' },
})

// Multi-step with limit
await agent.act('fill out the form and submit', {
  maxSteps: 15,
})

agent.extract(instruction, options)

Extract structured data from the page.

import { z } from 'zod'

const { data } = await agent.extract('get the page title', {
  schema: z.object({ title: z.string() }),
})

agent.verify(expectation, options?)

Verify the current page state.

const { success, reason } = await agent.verify('the form was submitted successfully')

LLM Providers

Supported providers:

| Provider | Config | |----------|--------| | OpenAI | { provider: 'openai', apiKey: '...' } | | Anthropic | { provider: 'anthropic', apiKey: '...' } | | Google | { provider: 'google', apiKey: '...' } | | Azure | { provider: 'azure', apiKey: '...', resourceName: '...' } | | OpenRouter | { provider: 'openrouter', apiKey: '...' } | | Ollama | { provider: 'ollama', baseUrl: 'http://localhost:11434' } | | LM Studio | { provider: 'lmstudio', baseUrl: 'http://localhost:1234' } | | AWS Bedrock | { provider: 'bedrock', region: '...', accessKeyId: '...' } | | OpenAI Compatible | { provider: 'openai-compatible', baseUrl: '...', apiKey: '...' } |

Progress Events

Track agent operations:

const agent = new Agent({
  url: 'http://localhost:3000',
  onProgress: (event) => {
    console.log(`[${event.type}] ${event.message}`)
  },
})

Event types: nav, act, extract, verify, error, done

Error Handling

import {
  NavigationError,
  ActionError,
  ExtractionError,
  VerificationError,
  ConnectionError
} from '@browseros-ai/agent-sdk'

try {
  await agent.act('click non-existent button')
} catch (error) {
  if (error instanceof ActionError) {
    console.error('Action failed:', error.message)
  }
}

License

AGPL-3.0-or-later