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

prospect-ai-agent

v1.0.3

Published

ProspectAI Desktop Agent — browser automation for campaigns (no Chrome extension)

Readme

ProspectAI Desktop Agent

A lightweight CLI that connects to your ProspectAI workspace and runs LinkedIn automation (connect, message, comment, scrape) through a real headless browser. No Chrome extension needed.

Runs on macOS and Windows. Requires Node.js 18+.

Quick Start

# 1. Install
npm install -g prospect-ai-agent

# 2. Pair with your workspace (get code from Campaigns > Desktop Agent)
prospect-ai-agent pair <CODE> -s https://your-app-url.com

# 3. One-time LinkedIn login (opens a browser window)
prospect-ai-agent login

# 4. Start the agent (runs headless in background)
prospect-ai-agent start

Or run without installing:

npx prospect-ai-agent pair <CODE> -s https://your-app-url.com
npx prospect-ai-agent login
npx prospect-ai-agent start

How It Works

ProspectAI Web App (control plane)     Desktop Agent (execution layer)
┌──────────────────────────────┐       ┌──────────────────────────────┐
│  Campaigns UI                │       │  CLI (commander)             │
│  - Create campaigns          │       │  - pair / login / start      │
│  - Approve AI comments       │       │  - run / status / unpair     │
│  - View connected agents     │       │                              │
│                              │       │  Agent Daemon                │
│  Automation APIs             │ <──── │  - Heartbeat (60s)           │
│  - GET  /next-job            │       │  - Poll for jobs (5 min)     │
│  - POST /report              │       │  - Launch headless browser   │
│  - POST /heartbeat           │       │  - Execute job via Playwright│
│  - GET/POST /cookies         │       │  - Close browser after task  │
└──────────────────────────────┘       └──────────────────────────────┘

The agent polls for pending automation jobs, launches a headless Chromium browser only when there's work, executes the task, and closes the browser. Session cookies are encrypted and synced with the server.

Commands

| Command | Description | |---|---| | pair <CODE> -s <URL> | Pair this device with your ProspectAI workspace | | login | One-time LinkedIn authentication (opens headed browser) | | start | Start background daemon (heartbeat + job polling) | | start --interval 10 | Start with custom poll interval (1–30 minutes, default 5) | | run | Execute one pending job immediately and exit | | status | Show current device configuration | | unpair | Disconnect this device and remove local config |

Supported Job Types

| Type | Description | |---|---| | connect | Send a LinkedIn connection request | | message | Send a LinkedIn direct message | | scrape_connections | Sync your LinkedIn connections list | | scrape_posts | Fetch latest post per prospect (for comment campaigns) | | comment | Post an approved comment on a LinkedIn post |

Setup Steps

1. Pair with workspace

Generate a pairing code from the Campaigns page in ProspectAI (Desktop Agent button), then:

prospect-ai-agent pair ABC123 -s https://your-app-url.com

This saves a JWT token and device info to ~/.bluehans-agent/config.json.

2. Authenticate with LinkedIn

prospect-ai-agent login

A headed browser opens. Log in to LinkedIn normally. Once you reach the feed, the agent captures your session cookies, encrypts them, and closes the browser. This is a one-time step.

3. Start the agent

prospect-ai-agent start

The agent runs continuously:

  • Sends heartbeat every 60 seconds
  • Polls for jobs every 5 minutes (configurable with --interval)
  • Launches headless Chromium per task, closes after completion
  • Reports results back to ProspectAI

Press Ctrl+C to stop.

Local Data

All data stored in ~/.bluehans-agent/:

| Path | Contents | |---|---| | config.json | JWT token, device ID, server URL | | cookies.enc | Encrypted LinkedIn session cookies |

Troubleshooting

"Not paired" — Run pair with a fresh code from the app.

"No cookies available" — Run login to authenticate with LinkedIn.

Heartbeat failing (401) — JWT expired (30-day lifespan). Run unpair then pair again.

Jobs not executing — Ensure campaigns are in Active status. Check with status command.

Security

  • Agent JWT tokens expire after 30 days; re-pair to renew
  • Revoke any device instantly from ProspectAI Settings
  • LinkedIn cookies are encrypted with AES-256-GCM
  • Only structured job types are executed (no arbitrary code)
  • Browser launches headless and closes after each task

License

Private — for use with ProspectAI only.