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

@open-gitagent/agent-registry-mongo

v0.2.1

Published

MongoDB-backed agent registry + per-run audit log + AgentTelemetry impl for ComputerAgent. Makes library-mode deployments (e.g. inside a Temporal worker pod) visible in the AgentOS dashboard with no extra orchestration.

Readme

@computeragent/agent-registry-mongo

MongoDB-backed agent registry + per-run audit log + AgentTelemetry implementation for ComputerAgent.

Use this when ComputerAgent runs as a library inside an existing worker (e.g. a Temporal worker pod, a CLI batch job, a serverless function) and you want the AgentOS dashboard to see every run with no extra orchestration. Pass the telemetry instance to the SDK, and the SDK fires lifecycle hooks that upsert to agent_registry and append to agent_logs.

Install

npm install @computeragent/agent-registry-mongo

Use

import { ComputerAgent, LocalSubstrate } from "computeragent";
import { MongoTelemetry } from "@computeragent/agent-registry-mongo";

const telemetry = new MongoTelemetry({
  url: process.env.MONGO_URL!,
  database: "agentos",
  agent: {
    name: "devsupport-agent",
    label: "DevSupport",
    source: "github.com/nord/devsupport-agent",
    harness: "claude-agent-sdk",
    model: "bedrock/anthropic.claude-sonnet-4-20250514-v1:0",
    registeredBy: process.env.HOSTNAME, // pod name, "ci", etc.
  },
});

await using agent = new ComputerAgent({
  source: {type: "git", url: "github.com/nord/devsupport-agent"},
  harness: "claude-agent-sdk",
  runtime: new LocalSubstrate(),
  envs: { CLAUDE_CODE_USE_BEDROCK: "1", AWS_REGION: "us-west-2" },
  telemetry,
});

const result = await agent.chat("hello");

That's it. On construct, an upsert lands in agent_registry. On every chat(), a document lands in agent_logs with usage, durationMs, ok, error, and a truncated reply.

Collections

agent_registry

{
  _id: "devsupport-agent",          // agent name (unique)
  label: "DevSupport",
  harness: "claude-agent-sdk",
  source: "github.com/nord/...",    // IdentitySource JSON
  model: "bedrock/anthropic.claude-sonnet-4-...",
  registeredBy: "worker-abc-123",
  registeredAt: ISODate("..."),
  updatedAt:    ISODate("..."),
  lastSeen:     ISODate("..."),
}

agent_logs

{
  _id: "log_<uuid>",
  ts: ISODate("..."),
  source: "library",                // | "slack" | "web" | "schedule" | ...
  agentName: "devsupport-agent",
  sessionId: "session_...",
  query: "user message text",
  reply: "assistant reply text",
  ok: true,
  durationMs: 12345,
  inputTokens: 1200,
  outputTokens: 350,
  costUsd: 0.012,
}

Lower-level API

If you want CRUD beyond the telemetry hook (e.g. unregistering an agent from a teardown script):

import { AgentRegistry, AgentLogStore } from "@computeragent/agent-registry-mongo";

const reg = new AgentRegistry({url, database: "agentos"});
await reg.register({name: "agent-1", harness: "claude-agent-sdk", source: "..."});
await reg.list();
await reg.unregister("agent-1");
await reg.close();

const logs = new AgentLogStore({url, database: "agentos"});
const recent = await logs.list({agentName: "agent-1", limit: 20});

Connection sharing

If your app already manages a MongoClient, pass it in to avoid a second pool:

const client = new MongoClient(process.env.MONGO_URL!);
await client.connect();
const telemetry = new MongoTelemetry({
  url: process.env.MONGO_URL!,
  database: "agentos",
  agent: {name: "devsupport-agent", harness: "claude-agent-sdk", source: "..."},
  client,                            // shared
});
// telemetry.onClose() won't close `client` — you own its lifecycle.

Error policy

Telemetry calls are fire-and-forget on the SDK side — exceptions thrown here never reach the agent's chat result. For diagnostics, pass an onError callback:

new MongoTelemetry({
  ...,
  onError: (err, op) => myLogger.warn({err, op}, "telemetry write failed"),
});