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

@rabbitai-lab/agent-browser-agent

v1.0.2

Published

Agent Browser Agent for RabbitAI - standalone server that receives browser commands via Socket.IO and executes them

Readme

@rabbitai-lab/agent-browser-agent

Agent Browser Agent for RabbitAI - a standalone Socket.IO server that receives browser commands from the SDK and executes them through pluggable engines.

Installation

npm install @rabbitai-lab/agent-browser-agent

Quick Start

CLI Usage

# Install globally
npm install -g @rabbitai-lab/agent-browser-agent

# Local development mode (no auth)
agent-browser-agent --no-auth --debug

# Remote mode with token authentication
agent-browser-agent --port 3100 --rabbitai-url https://rabbitai.example.com

# Load custom engines
agent-browser-agent --no-auth --engine-dir ./my-engines

# Using environment variables
PORT=3200 RABBITAI_SERVER_URL=https://rabbitai.example.com agent-browser-agent

CLI Options

| Option | Env Variable | Default | Description | |--------|-------------|---------|-------------| | -p, --port <port> | PORT | 3100 | Listen port | | --no-auth | NO_AUTH=true | - | Skip authentication (local dev mode) | | --rabbitai-url <url> | RABBITAI_SERVER_URL | - | RabbitAI server URL for token verification | | --engine-dir <dir> | - | - | Custom engine directory to load | | -d, --debug | - | false | Enable debug logging | | -h, --help | - | - | Show help | | -v, --version | - | - | Show version |

Programmatic Usage

import { AgentBrowserAgent } from '@rabbitai-lab/agent-browser-agent';

const agent = new AgentBrowserAgent({
  port: 3100,
  noAuth: true,       // Local mode - skip auth
  debug: true,
});

// Or with token auth (remote mode)
const agent = new AgentBrowserAgent({
  port: 3100,
  rabbitaiServerUrl: 'https://rabbitai.example.com',
});

await agent.start();

// Graceful shutdown
process.on('SIGINT', async () => {
  await agent.stop();
  process.exit(0);
});

Custom Engines

You can create and register custom engines to handle different command types:

Creating an Engine

// my-engine.js
import { Engine } from '@rabbitai-lab/agent-browser-agent';

class MyCustomEngine {
  name = 'my-engine';

  async execute(command, onStream) {
    onStream('Processing...');
    // Your custom logic here
    return { data: `Result for: ${command}` };
  }

  async close() {
    // Cleanup resources
  }
}

export default MyCustomEngine;

Loading Custom Engines via CLI

agent-browser-agent --no-auth --engine-dir ./engines

All .js and .mjs files in the directory will be loaded automatically. Each file must export an Engine class (default export or named Engine export).

Registering Engines Programmatically

import { AgentBrowserAgent } from '@rabbitai-lab/agent-browser-agent';
import type { Engine } from '@rabbitai-lab/agent-browser-agent';

class MyEngine implements Engine {
  name = 'my-engine';
  async execute(command: string, onStream: (data: string) => void) {
    return { data: 'result' };
  }
  async close() {}
}

const agent = new AgentBrowserAgent({ noAuth: true });
agent.registerEngine(new MyEngine());
await agent.start();

API Reference

AgentBrowserAgent

Constructor

new AgentBrowserAgent(options?: AgentOptions)

registerEngine(engine: Engine): void

Register a custom engine.

start(): Promise<void>

Start the Socket.IO server.

stop(): Promise<void>

Stop the server and close all engines.

isRunning(): boolean

Check if the server is running.

Types

interface AgentOptions {
  port?: number;                // Listen port (default: 3100)
  rabbitaiServerUrl?: string;   // RabbitAI server URL for token verification
  noAuth?: boolean;             // Skip auth (default: false)
  debug?: boolean;              // Enable debug logging
}

interface Engine {
  name: string;
  execute(
    command: string,
    onStream: (data: string) => void,
  ): Promise<{ data: string; error?: string }>;
  close(): Promise<void>;
}

Authentication

Local Mode (--no-auth)

All connections are accepted without authentication. Use this for local development only.

Remote Mode (--rabbitai-url)

Token-based authentication via RabbitAI server. The agent verifies tokens by calling ${rabbitaiServerUrl}/api/auth/profile with the provided Bearer token. Connections with invalid or expired tokens are rejected.

Related Packages

License

MIT