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

@theta-lab/obsrv

v0.1.2

Published

theta/obsrv SDK for Node.js — multimodal AI agent tracing.

Readme

@theta-lab/obsrv

TypeScript SDK for theta/obsrv — a multimodal tracing platform for AI agents.

  • Text, image, audio, video, and robotics sensor traces.
  • Per-step token usage, cost, and timing.
  • First-class integrations with OpenAI, Anthropic, and Next.js.
  • Dual ESM + CJS, Node 20+.
  • Fails soft: SDK errors are logged, never thrown into your code.

Install

npm install @theta-lab/obsrv

Quickstart

import { TraceClient } from "@theta-lab/obsrv";

const client = new TraceClient({ apiKey: process.env.THETA_API_KEY! });

await client.trace(
  { name: "checkout", runType: "eval", metadata: { gitSha } },
  async (t) => {
    await t.step({ name: "plan", type: "llm", model: "claude-opus-4.6" }, async (s) => {
      s.logMessage({ role: "user", text: "Buy milk", images: [buf] });
      s.logToolCall({ name: "browser.click", arguments: { selector: "#buy" } });
      s.setTokenUsage({ input: 900, output: 120 });
    });
    await t.attachImage(screenshotBuf);
  },
);

Zero-config

Set only THETA_API_KEY in your environment and use the module-level trace(). The SDK sends traces to https://api.obsrv.tech by default and the server resolves the project from the API key:

import { trace } from "@theta-lab/obsrv";

await trace("my-agent", async (t) => {
  await t.step({ name: "think", type: "llm" }, async (s) => {
    s.logMessage({ role: "user", text: "hi" });
  });
});

OpenAI

import OpenAI from "openai";
import { wrapOpenAI } from "@theta-lab/obsrv/openai";

const openai = wrapOpenAI(new OpenAI());

// Every chat.completions.create call auto-emits an `llm` step.
const res = await openai.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "ping" }],
});

Streaming is transparently instrumented too.

Anthropic

import Anthropic from "@anthropic-ai/sdk";
import { wrapAnthropic } from "@theta-lab/obsrv/anthropic";

const anthropic = wrapAnthropic(new Anthropic());

Next.js

// app/api/checkout/route.ts
import { withTrace } from "@theta-lab/obsrv/next";

export const POST = withTrace(
  async (req: Request) => {
    // ...
    return Response.json({ ok: true });
  },
  { name: "api/checkout" },
);

API

new TraceClient(opts)

| option | default | description | | --- | --- | --- | | apiKey | THETA_API_KEY | Per-project API key; only required config for normal writes. | | flushInterval | 1000 | Background flush interval (ms). | | maxBatch | 20 | Force flush after N queued traces. | | timeout | 30000 | Per-request timeout (ms). | | debug | THETA_DEBUG | Log SDK errors to stderr. |

Trace handle

  • t.step({ name, type, model? }, async (s) => { ... }) — auto-parented nested step.
  • t.attachImage(src) / attachAudio / attachVideo / attachFile — accepts Buffer, Uint8Array, Blob, file path, URL (https:// or gs://), or ReadableStream.
  • t.setTokenUsage({ input, output }), t.setCost(usd).

Step handle

  • s.logMessage({ role, text?, images?, attachments? })
  • s.logToolCall({ name, arguments, result?, error? })
  • s.setTokenUsage(...), s.setCost(...)

Helpers

  • observe(fn, { name, type }) — wrap any async function into a step.
  • withTrace(handler, { name }) — Next.js route helper.
  • client.flush() / client.shutdown() — drain the batch queue.

License

Proprietary. (c) Theta. All rights reserved.