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

hollow-sdk

v0.2.0

Published

TypeScript SDK for Hollow — serverless web perception for AI agents

Downloads

30

Readme

hollow-sdk

TypeScript SDK for Hollow — serverless web perception for AI agents.

Gives any Node.js application a browser that runs without a machine: no Chromium, no BaaS, no GPU.

Install

npm install hollow-sdk

Usage

Single page

import { HollowClient } from 'hollow-sdk';

const hollow = new HollowClient();
const page = await hollow.perceive('https://news.ycombinator.com');
console.log(page.gdgMap);
// → [TEXT: news.ycombinator.com]
//   [Stories:]
//     [1] "Ask HN: Who is hiring? (March 2026)"  comments:834
//     ...
console.log(page.tier);       // 'text'
console.log(page.confidence); // 0.95

Agent task

import { HollowClient, runAgent } from 'hollow-sdk';

const hollow = new HollowClient();

// Default — Anthropic (reads ANTHROPIC_API_KEY)
const result = await runAgent(hollow, {
  task: 'What are the top 3 stories on Hacker News right now?',
  onStep: (step) => console.log(`Step ${step.step}: ${step.tier} (${step.confidence})`),
});

console.log(result);

Works with any model

The agent loop is model-agnostic. Pass any adapter — or implement ModelAdapter yourself.

Anthropic (default)

import { AnthropicAdapter } from 'hollow-sdk';

const result = await runAgent(hollow, {
  task: '...',
  model: new AnthropicAdapter({ model: 'claude-opus-4-6' }),
});

OpenAI

npm install openai   # optional peer dependency
import { OpenAIAdapter } from 'hollow-sdk';

const result = await runAgent(hollow, {
  task: '...',
  model: new OpenAIAdapter({ model: 'gpt-4o' }),
});

Any OpenAI-compatible API (Groq, Together, Ollama…)

import { OpenAIAdapter } from 'hollow-sdk';

// Groq
const result = await runAgent(hollow, {
  task: '...',
  model: new OpenAIAdapter({
    apiKey: process.env.GROQ_API_KEY,
    baseURL: 'https://api.groq.com/openai/v1',
    model: 'llama-3.3-70b-versatile',
  }),
});

// Local Ollama
const result = await runAgent(hollow, {
  task: '...',
  model: new OpenAIAdapter({
    apiKey: 'ollama',
    baseURL: 'http://localhost:11434/v1',
    model: 'llama3.2',
  }),
});

Bring your own model

Implement ModelAdapter — one method:

import type { ModelAdapter } from 'hollow-sdk';

const myAdapter: ModelAdapter = {
  async complete(messages) {
    // messages: { role: 'system'|'user'|'assistant', content: string }[]
    return myModel.chat(messages);
  },
};

const result = await runAgent(hollow, {
  task: '...',
  model: myAdapter,
});

Custom endpoint

const hollow = new HollowClient({
  endpoint: 'https://my-hollow-instance.vercel.app',
});

Or set HOLLOW_ENDPOINT in your environment — the client reads it automatically.

API

HollowClient

const hollow = new HollowClient(options?)

| Option | Type | Default | |--------|------|---------| | endpoint | string | https://hollow-tan-omega.vercel.app |

hollow.perceive(url, sessionId?, stateId?)

Load a URL. Returns a PerceiveResult with sessionId, gdgMap, confidence, tier, and jsErrors.

hollow.act(sessionId, action, intervention?)

Interact with the current page. action.elementId values come from the gdgMap.

await hollow.act(page.sessionId, { type: 'click', elementId: 3 });
await hollow.act(page.sessionId, { type: 'fill', elementId: 4, value: 'search query' });
await hollow.act(page.sessionId, { type: 'scroll', direction: 'down' });

hollow.getSession(sessionId)

Get the latest state of a session without taking any action.

hollow.closeSession(sessionId)

Free a session's Redis state when done. Idempotent.

runAgent(client, options)

Run a multi-step AI agent.

| Option | Type | Default | |--------|------|---------| | task | string | required | | model | ModelAdapter | new AnthropicAdapter() | | maxSteps | number | 15 | | startUrl | string | https://www.startpage.com | | onStep | (step: AgentStep) => void | — |

AnthropicAdapter

| Option | Type | Default | |--------|------|---------| | apiKey | string | ANTHROPIC_API_KEY env var | | model | string | claude-opus-4-6 |

OpenAIAdapter

Requires npm install openai.

| Option | Type | Default | |--------|------|---------| | apiKey | string | OPENAI_API_KEY env var | | model | string | gpt-4o | | baseURL | string | OpenAI default |

Types

type Tier = 'hollow' | 'vdom' | 'text' | 'cache' | 'mobile' | 'partial';

interface Message {
  role: 'system' | 'user' | 'assistant';
  content: string;
}

interface ModelAdapter {
  complete(messages: Message[]): Promise<string>;
}

interface PerceiveResult {
  sessionId: string;
  gdgMap: string;
  confidence: number;
  tier: Tier;
  jsErrors: string[];
}

interface AgentStep {
  step: number;
  gdgMap: string;
  action: Action | null;
  confidence: number;
  tier: Tier;
  reasoning?: string;
}

Deploy your own Hollow

This SDK points at the public demo by default (10 req/min rate limit per IP). For production use, deploy your own instance:

git clone https://github.com/Badgerion/hollow
cd hollow && npm install && vercel deploy

Then point the SDK at it:

const hollow = new HollowClient({ endpoint: 'https://your-instance.vercel.app' });

License

Apache 2.0