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

@roelven/openclaw-event-stream

v1.0.1

Published

OpenClaw plugin that emits real-time JSON events over Unix socket for monitoring and tooling

Downloads

149

Readme

event-stream

An OpenClaw plugin that emits real-time JSON events over a Unix domain socket. Useful for building dashboards, log aggregators, or custom monitoring tools on top of OpenClaw.

What it does

When enabled, this plugin opens a Unix domain socket and streams one JSON object per line for every significant event in the agent lifecycle:

  • tool.call — Emitted when a tool is about to be called. Includes the tool name and timestamp.
  • tool.result — Emitted after a tool call completes. Includes the tool name, timestamp, and whether an error occurred.
  • session.end — Emitted when an agent session finishes. Includes session ID, session key, duration, message count, and success status.

Events are newline-delimited JSON (NDJSON), making them easy to consume with standard Unix tools, jq, or any streaming JSON parser.

The plugin is disabled by default and creates zero overhead when disabled — no socket is opened, no hooks fire, no resources are used.

Why use it

  • Build a real-time dashboard showing what your agents are doing
  • Pipe events into a log aggregator (Datadog, Loki, ELK) for centralized monitoring
  • Debug agent behavior by watching tool calls as they happen
  • Measure tool call frequency and error rates
  • Zero performance impact when disabled

Compatibility

  • OpenClaw version: Requires OpenClaw main branch (post-February 2026) with the plugin hook system wired.
  • Hooks used: before_tool_call, after_tool_call, agent_end, gateway_stop. All are part of the standard plugin API.
  • No external dependencies.

Installation

openclaw plugins install @roelven/openclaw-event-stream

Then register it in your ~/.openclaw/openclaw.json:

{
  "plugins": {
    "allow": ["event-stream"],
    "entries": {
      "event-stream": {
        "enabled": true
      }
    }
  }
}

Restart the gateway:

openclaw gateway stop && openclaw gateway start

Setup

This plugin requires explicit opt-in. After installing, you must set enabled: true in the plugin config (shown above). Without it, the plugin registers but does nothing.

Listening to events

Connect to the Unix socket to receive events:

# Using socat
socat - UNIX-CONNECT:/tmp/openclaw/events.sock

# Using ncat
ncat -U /tmp/openclaw/events.sock

Each line is a JSON object:

{"type":"tool.call","timestamp":"2026-02-16T10:30:00.000Z","toolName":"exec"}
{"type":"tool.result","timestamp":"2026-02-16T10:30:01.200Z","toolName":"exec","hasError":false}
{"type":"session.end","timestamp":"2026-02-16T10:31:00.000Z","sessionId":"abc-123","sessionKey":"main","success":true,"durationMs":60000,"messageCount":8}

Custom socket path

By default the socket is created at /tmp/openclaw/events.sock. You can change this in the plugin config:

{
  "event-stream": {
    "enabled": true,
    "socketPath": "/var/run/openclaw/events.sock"
  }
}

Example: live tool call monitor

socat - UNIX-CONNECT:/tmp/openclaw/events.sock | jq -r 'select(.type == "tool.call") | "\(.timestamp) → \(.toolName)"'

Example: pipe to a file for later analysis

socat - UNIX-CONNECT:/tmp/openclaw/events.sock >> ~/openclaw-events.ndjson &

License

MIT