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

@overseex/sdk

v1.0.0

Published

JavaScript/TypeScript SDK for OverseeX - AI Agent Testing & Monitoring

Readme

OverseeX JavaScript/TypeScript SDK

Official JavaScript/TypeScript SDK for OverseeX - AI Agent Testing & Monitoring Platform.

Installation

npm install @overseex/sdk
# or
yarn add @overseex/sdk

Quick Start

import { OverseeX } from '@overseex/sdk';

// Initialize the SDK
const overseeX = new OverseeX({
  apiKey: 'your-api-key',
  agentId: 'your-agent-id',
});

// Start a trace
overseeX.startTrace({ query: 'What is the weather?' });

// Record tool calls
overseeX.recordToolCall('weather_api', { location: 'San Francisco' }, { temp: 72 });

// End the trace
await overseeX.endTrace({ response: 'The weather is 72°F' });

Features

  • 🔍 Automatic Trace Capture - Record agent executions automatically
  • 🛠️ Tool Call Tracking - Monitor all external API calls
  • 🧪 Test Generation - Generate pytest code from traces
  • 📊 Agent Insights - Get behavioral analysis and recommendations
  • 🚨 Error Monitoring - Track failures and performance issues

Usage

Basic Tracing

const agentGuard = new AgentGuard({
  apiKey: process.env.AGENTGUARD_API_KEY!,
  agentId: 'agent-123',
});

// Manual tracing
agentGuard.startTrace({ input: 'User query' });
// ... your agent logic ...
await agentGuard.endTrace({ output: 'Agent response' });

Automatic Function Tracing

async function myAgentFunction(query: string) {
  // Your agent logic
  return result;
}

// Wrap function for automatic tracing
const tracedFunction = agentGuard.traceFunction(myAgentFunction);

// Use as normal - traces automatically captured
const result = await tracedFunction('query');

Recording Tool Calls

agentGuard.startTrace({ query: 'Send email' });

// Record tool usage
agentGuard.recordToolCall(
  'sendgrid_send_email',
  { to: '[email protected]', subject: 'Hello' },
  { message_id: 'msg_123', status: 'sent' }
);

await agentGuard.endTrace({ status: 'success' });

OpenAI Integration

import OpenAI from 'openai';
import { AgentGuard, traceOpenAI } from '@agentguard/sdk';

const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const agentGuard = new AgentGuard({ apiKey: process.env.AGENTGUARD_API_KEY, agentId: 'agent-123' });

// Wrap OpenAI for automatic tracing
const tracedOpenAI = traceOpenAI(agentGuard, openai);

// Use as normal - calls are automatically traced
const completion = await tracedOpenAI.chat.completions.create({
  model: 'gpt-4',
  messages: [{ role: 'user', content: 'Hello!' }],
});

Test Generation

// Generate test from a trace
const { generated_code } = await agentGuard.generateTestFromTrace('trace-id');
console.log(generated_code); // pytest code

// Generate full test suite from recent traces
const { generated_code: suite } = await agentGuard.generateTestSuite();
// Save to test_agent.py

Insights & Monitoring

// Get behavioral insights
const insights = await agentGuard.getInsights();
insights.forEach(insight => {
  console.log(`${insight.type}: ${insight.message}`);
});

// Get traces
const traces = await agentGuard.getTraces(limit: 50);
console.log(`Total traces: ${traces.length}`);

Configuration

interface AgentGuardConfig {
  apiKey: string;          // Required: Your AgentGuard API key
  agentId?: string;        // Optional: Default agent ID
  baseURL?: string;        // Optional: Custom API endpoint
  autoCapture?: boolean;   // Optional: Auto-capture mode (default: true)
}

API Reference

AgentGuard

Main SDK class for interacting with AgentGuard.

Methods

  • startTrace(input, metadata?) - Start a new trace
  • endTrace(output, status?) - End current trace and send to AgentGuard
  • recordToolCall(toolName, input, output?, error?) - Record a tool call
  • recordStep(type, data) - Record an execution step
  • sendTrace(traceData) - Send a complete trace
  • traceFunction(fn, name?) - Wrap function for automatic tracing
  • getTraces(limit?, skip?) - Get all traces
  • getTrace(traceId) - Get specific trace
  • getAgent(agentId?) - Get agent information
  • generateTestFromTrace(traceId, testName?) - Generate test from trace
  • generateTestSuite(agentId?, limit?) - Generate test suite
  • getInsights() - Get agent insights

Examples

See the examples directory for complete usage examples:

  • Basic agent tracing
  • OpenAI integration
  • LangChain integration
  • Test generation
  • Error handling

Development

# Install dependencies
npm install

# Build
npm run build

# Test
npm test

License

MIT

Support

  • Documentation: https://docs.agentguard.dev
  • GitHub: https://github.com/agentguard/sdk-javascript
  • Email: [email protected]