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

@theclawlab/agent

v1.0.8

Published

Agent runtime and lifecycle management for TheClaw platform.

Downloads

31

Readme

agent

A CLI tool for managing autonomous AI agents in TheClaw — each agent has an inbox thread, an LLM identity, and a routing table that maps incoming messages to conversation threads.

How it works

  • Initialize an agent with agent init <id> — creates the directory structure, config, and inbox thread.
  • Start the agent with agent start <id> — registers an inbox subscription so notifier can trigger agent run on new messages.
  • When a message arrives in the inbox, notifier dispatches agent run <id> — which routes the message to the right thread, calls the LLM via pai chat, and writes the reply back.
  • Outbound replies are delivered by agent deliver — which reads from the thread and calls xgw send (external) or thread push (internal).

Install

From npm

npm install -g @theclawlab/agent

From source

npm run build && npm link

Quick start

# Initialize a new agent
agent init my-agent --kind user

# Start the agent (registers inbox subscription)
agent start my-agent

# Check status
agent status my-agent

# Simulate an incoming message (for testing)
agent send my-agent \
  --source xgw:telegram:user42 \
  --type message \
  --content '{"text":"hello","reply_context":{"channel_type":"external","channel_id":"telegram","peer_id":"user42"}}'

# Interactive debug chat (bypasses inbox/notifier, calls LLM directly)
agent chat my-agent

# Stop the agent
agent stop my-agent

Commands

| Command | Description | |---------|-------------| | agent init <id> | Initialize a new agent directory | | agent start <id> | Register inbox subscription (enable dispatch) | | agent stop <id> | Unregister inbox subscription (pause, keep state) | | agent status [<id>] | Show agent status (or list all agents) | | agent list | List all initialized agents | | agent send <id> | Push a message into the agent's inbox (debug) | | agent chat <id> | Interactive LLM chat, bypasses full pipeline (debug) | | agent run <id> | Process inbox messages — called by notifier, not manually | | agent deliver | Deliver outbound replies — called by thread dispatch, not manually |

Data directory

Default: ~/.theclaw/agents/<id>/ — override root with THECLAW_HOME.

~/.theclaw/agents/<id>/
├── IDENTITY.md       # agent system prompt
├── USAGE.md          # usage notes for the agent itself
├── config.yaml       # LLM provider, routing, outbound config
├── inbox/            # inbox thread (SQLite-backed)
├── sessions/         # pai chat session files (per thread)
├── memory/           # persistent memory files
├── threads/          # per-peer/channel/agent conversation threads
├── workdir/          # scratch space
└── logs/             # agent run logs

Dependencies

Requires the following tools to be installed and on PATH:

  • pai — LLM CLI (pai chat)
  • thread — event queue CLI
  • notifier — task scheduler daemon
  • xgw — communication gateway (for external channel delivery)

Documentation

  • USAGE.md — full CLI reference, config format, and data directory details