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

agentspan

v0.1.5

Published

Embedded self-hosted control plane for local AI agents with one-command onboarding

Readme

AgentSpan  ·  v0.01

Embedded control plane for local AI agents — one-command onboarding, multi-tenant runtime, workspace adapters, and a React UI with room for 2D/3D simulation.


Overview

AgentSpan is a self-hosted web interface that connects to a running OpenClaw Gateway over WebSocket and gives you a real-time operational view of your agent fleet.

Agent Adapters ──► AgentSpan Server (Express + Embedded PGlite)
                           │
               ┌───────────┴───────────┐
           React UI (Vite)         REST + SSE API
                                   /api/agents
                                   /api/tasks
                                   /api/runs
                                   /api/live

Stack: Node 24 · Express 5 · React 19 · Vite 7 · Embedded PGlite · TypeScript

The old root app/ and src/ implementation is now treated as legacy reference code. Active product development happens in apps/* and packages/*.


Quickstart

npx agentspan onboard --yes

Open http://127.0.0.1:3100.

No external Postgres setup is required. AgentSpan creates an embedded local runtime in ~/.agentspan, initializes the database automatically, and starts the control plane.

Daily use after onboarding:

npx agentspan run

Update an existing local install to the newest published package:

npx agentspan update

Manual developer install remains available:

git clone https://github.com/danyanovich/agentspan.git
cd agentspan
npm install
npm run onboard

The simplest setup is local:

  • OpenClaw is already running on the same machine
  • the gateway token is already stored in ~/.openclaw/openclaw.json
  • AgentSpan auto-connects on startup with no browser-side setup

Install via OpenClaw

For end users, the main path should be OpenClaw itself.

Ask OpenClaw:

Install AgentSpan for me! http://127.0.0.1:3010/skill

After installation, OpenClaw should manage these commands:

  • /agentspan — install if needed, start if needed, then open the dashboard
  • /agentspan stop — stop the dashboard
  • /agentspan status — show whether it is installed/running and the local URL

The OpenClaw-first lifecycle is on-demand by default, so AgentSpan only runs when the user asks for it.


Connection Model

AgentSpan is config-only. It does not store dashboard tokens or gateway credentials at runtime.

Gateway connection sources:

  1. CLAWDBOT_API_TOKEN
  2. OPENCLAW_CONFIG_PATH -> gateway.auth.token
  3. ~/.openclaw/openclaw.json -> gateway.auth.token

Host configuration sources:

  • OPS_UI_HOSTS_JSON for explicit multi-host setups
  • otherwise a single host from CLAWDBOT_URL with default ws://127.0.0.1:18789

Multi-Host

For multiple OpenClaw gateways, configure them once via OPS_UI_HOSTS_JSON.

OPS_UI_DEFAULT_HOST_ID=local
OPS_UI_HOSTS_JSON=[{"id":"local","name":"Local OpenClaw","gatewayUrl":"ws://127.0.0.1:18789","gatewayTokenEnv":"CLAWDBOT_API_TOKEN","enabled":true}]

The UI can switch the active host and reconnect, but it does not edit host credentials from the browser.


Remote Access

Remote mode is intended for loopback + reverse proxy.

Run the production bundle and keep OPS_UI_HOST=127.0.0.1, then put Caddy/Nginx/Tailscale/Cloudflare Access in front.

Recommended topology:

  • keep OPS_UI_HOST=127.0.0.1
  • put Caddy/Nginx/Tailscale/Cloudflare Access in front
  • leave OPS_UI_REMOTE_ALLOW_DANGEROUS_ACTIONS=false unless you explicitly want destructive actions

For a full remote deployment example, see docs/DEPLOY_REMOTE.md.


Environment Variables

| Variable | Default | Description | |---|---|---| | OPS_UI_MODE | local | local or remote mode | | OPS_UI_PORT / PORT | 3010 | HTTP server port | | OPS_UI_HOST / HOST | 127.0.0.1 | Bind address | | OPS_UI_TRUST_PROXY | false | Trust reverse proxy headers | | OPS_UI_REMOTE_ALLOW_DANGEROUS_ACTIONS | false | Allow destructive actions in remote mode | | OPS_UI_DEFAULT_HOST_ID | local | Default active OpenClaw host id | | OPS_UI_HOSTS_JSON | — | Multi-host OpenClaw config JSON array | | CLAWDBOT_URL | ws://127.0.0.1:18789 | OpenClaw Gateway WebSocket URL | | CLAWDBOT_API_TOKEN | — | Explicit gateway auth token | | OPENCLAW_CONFIG_PATH | — | Path to OpenClaw config file | | OPS_UI_MAX_QUEUE | 5000 | In-memory event queue cap |


API Reference

Monitor

GET  /api/monitor/sessions
GET  /api/monitor/runs
GET  /api/monitor/runs/:runId/events
GET  /api/monitor/graph?window=3600
GET  /api/monitor/diagnostics
GET  /api/monitor/events
POST /api/monitor/connect
POST /api/monitor/disconnect
POST /api/monitor/refresh-sessions
POST /api/monitor/abort

Hosts

GET  /api/hosts
POST /api/hosts/select
POST /api/hosts/:id/connect
POST /api/hosts/:id/disconnect

Tasks

GET    /api/tasks
POST   /api/tasks
PUT    /api/tasks/:id
DELETE /api/tasks/:id
POST   /api/tasks/:id/status
POST   /api/tasks/:id/approval
PUT    /api/tasks/:id/tags

Schedules

GET    /api/schedules
POST   /api/schedules
DELETE /api/schedules/:id

Analytics

GET /api/analytics?days=30

Production Bundle

To prepare a ready-to-run user build without the full repository:

npm run build
npm run package:release

This creates dist/agentspan/ with:

  • modular server source
  • prebuilt UI assets
  • workspace package sources
  • agentspan-control.sh
  • start-agentspan.sh
  • start-agentspan.bat
  • release.json
  • a short README.txt

For users, the main public path should still be npx agentspan onboard --yes. The release bundle is the portable/offline alternative.

Publishing

The public quickstart is designed around:

npx agentspan onboard --yes

Existing installs should upgrade with:

npx agentspan update

Before publishing a new version:

npm run core:typecheck
npm run core:test
npm run package:release
npm pack --dry-run

Project Structure

agentspan/
├── apps/
├── app/              # legacy Next.js UI (archived)
├── packages/
├── src/              # legacy server runtime (archived)
├── scripts/
└── docs/

License

MIT — see LICENSE