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

@agntz/worker

v0.1.0

Published

Hono server for agent execution — runs YAML-defined agents via the manifest engine

Downloads

71

Readme

@agntz/worker

Hono HTTP worker that executes YAML-defined agents via the manifest engine. User-scoped — every request resolves to a user_id before hitting the store.

Endpoints

| Method | Path | Auth | Description | |---|---|---|---| | GET | /health | none | Liveness probe | | POST | /run | required | Execute an agent, return final output + state | | POST | /run/stream | required | Same, as Server-Sent Events |

Request shape

{
  "userId": "user_abc...",   // only required when using X-Internal-Secret auth
  "agentId": "my-agent",
  "input": { "description": "..." }
}

Use agentId: "system:<name>" (e.g. system:agent-builder) to invoke a system agent bundled with the worker. System agents bypass the user store and run with ephemeral state.

Authentication

Two modes are accepted by the workerAuth middleware in src/middleware/auth.ts:

Internal (app → worker)

X-Internal-Secret: $WORKER_INTERNAL_SECRET

The worker trusts the header and reads userId from the request body. This is what @agntz/app uses when proxying a signed-in user's request.

External (service → worker)

Authorization: Bearer ar_live_<token>

Keys are created in the app's Settings → API Keys UI (they're sha256-hashed in ar_api_keys). The worker calls store.resolveApiKey(rawKey) to map the token to its user.

Any request without one of these is rejected with 401.

Env vars

PORT=4001
HOSTNAME=0.0.0.0
WORKER_INTERNAL_SECRET=...        # required
STORE=postgres                    # or memory (dev only)
DATABASE_URL=postgres://...       # when STORE=postgres
DEFAULT_MODEL_PROVIDER=openai
DEFAULT_MODEL_NAME=gpt-5.4-mini
BUILT_IN_AGENTS_DIR=...           # optional: extra YAMLs to seed per workspace

System agents

Default agents shipped in src/defaults/agents/ (currently agent-builder.yaml) are available as system agents — invoke with agentId: "system:<name>". The worker loads the YAML from disk and runs it with an ephemeral MemoryStore, bypassing the caller's user-scoped store entirely. To change the behavior, edit the YAML and redeploy.

Run locally

pnpm --filter @agntz/worker dev