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

agentops

v0.1.0

Published

TypeScript implementation of the AgentOps SDK

Readme

AgentOps TypeScript SDK

A TypeScript implementation of the AgentOps SDK that exports GenAI conventional OpenTelemetry data to standards-compliant OTel collectors. This SDK provides automatic instrumentation for multiple agent frameworks and AI libraries.

Features

  • 🔌 Plugin Architecture: Dynamic loading and configuration of instrumentors
  • 🤖 GenAI Support: Built-in support for OpenTelemetry GenAI semantic conventions
  • 📊 Standards Compliant: Exports to any OpenTelemetry-compatible collector
  • 🛠️ Framework Agnostic: Instrument multiple agent frameworks simultaneously
  • 🔧 TypeScript First: Full TypeScript support with comprehensive type definitions
  • 💸 LLM Cost Management: Track spend with LLM foundation model providers
  • 🧪 Agent Benchmarking: Test your agents against 1,000+ evals
  • 🔐 Compliance and Security: Detect common prompt injection and data exfiltration exploits

Installation

npm install agentops

Quick Start

1. Set your API key (recommended)

export AGENTOPS_API_KEY=your-api-key

2. Initialize the SDK

import { agentops } from 'agentops';

await agentops.init();

// Your AI agent code here - instrumentation happens automatically!

Alternative: Pass API key explicitly

import { agentops } from 'agentops';

await agentops.init({
  apiKey: 'your-api-key'
});

Building

To build the project from source:

npm install
npm run build

This will compile the TypeScript source code to JavaScript in the dist/ directory.

Running the Example

The repository includes an OpenAI Agents example that demonstrates the SDK in action:

  1. First, create a .env file in the examples/openai-agents-example directory:
cd examples/openai-agents-example
cat > .env << EOF
AGENTOPS_API_KEY=your-agentops-api-key
OPENAI_API_KEY=your-openai-api-key
EOF
  1. Then run the example:
npm install
npm run dev

The example will:

  1. Initialize AgentOps instrumentation
  2. Create a weather assistant agent with tool calling capabilities
  3. Execute a sample query
  4. Export telemetry data to the AgentOps platform

OpenAI Agents Support

AgentOps provides first-class support for the OpenAI Agents SDK, automatically instrumenting:

  • Agent Lifecycle: Track agent creation, execution, and completion
  • LLM Generation: Capture model requests, responses, and token usage
  • Function Calls: Monitor tool usage and function execution
  • Audio Processing: Observe speech-to-text and text-to-speech operations
  • Handoffs: Track agent-to-agent communication and workflow transitions
  • Custom Events: Capture domain-specific agent behaviors

Automatic Instrumentation

Simply initialize AgentOps before using the OpenAI Agents SDK:

import { agentops } from 'agentops';
import { Agent, run } from '@openai/agents';

// Initialize AgentOps first
await agentops.init();

// Create your agent with tools and instructions
const agent = new Agent({
  name: 'My Assistant',
  instructions: 'You are a helpful assistant.',
  tools: [/* your tools */],
});

// Run the agent - instrumentation happens automatically
const result = await run(agent, "Hello, how can you help me?");
console.log(result.finalOutput);

All agent interactions will be automatically captured and exported to your AgentOps dashboard with full OpenTelemetry semantic conventions.

Debug Logging

To see detailed instrumentation and tracing logs:

DEBUG=agentops:* node your-app.js

Why AgentOps? 🤔

Without the right tools, AI agents are slow, expensive, and unreliable. Our mission is to bring your agent from prototype to production. Here's why AgentOps stands out:

  • Comprehensive Observability: Track your AI agents' performance, user interactions, and API usage.
  • Real-Time Monitoring: Get instant insights with session replays, metrics, and live monitoring tools.
  • Cost Control: Monitor and manage your spend on LLM and API calls.
  • Failure Detection: Quickly identify and respond to agent failures and multi-agent interaction issues.
  • Tool Usage Statistics: Understand how your agents utilize external tools with detailed analytics.
  • Session-Wide Metrics: Gain a holistic view of your agents' sessions with comprehensive statistics.

AgentOps is designed to make agent observability, testing, and monitoring easy.

Star History

Check out our growth in the community: