TypeScript SDK
AgentOps provides TypeScript/JavaScript support through two SDK options:Modern TypeScript SDK (Recommended)
The modern TypeScript SDK is built on OpenTelemetry standards and provides comprehensive instrumentation for AI agents.Installation
Quick Start
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
OpenAI Agents Integration
The SDK provides first-class support for the OpenAI Agents SDK:- 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
Debug Logging
Enable detailed instrumentation logs:Legacy TypeScript SDK (Alpha)
The legacy TypeScript SDK has limited functionality compared to the Python SDK. The modern TypeScript SDK above is recommended for new projects.