Skip to content

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI

Update documentation to mention TypeScript SDK in alpha (#1053)

devin-ai-integration[bot]8fec2302169a
diff --git a/README.md b/README.md
index 734a2ee3..40a8e16b 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,9 @@
<img src="https://img.shields.io/github/commit-activity/m/agentops-ai/agentops" alt="git commit activity">
</a>
<img src="https://img.shields.io/pypi/v/agentops?&color=3670A0" alt="PyPI - Version">
+ <a href="https://github.com/AgentOps-AI/agentops-ts">
+ <img src="https://img.shields.io/badge/TypeScript%20SDK-Available-blue?&color=3670A0" alt="TypeScript SDK">
+ </a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-yellow.svg?&color=3670A0" alt="License: MIT">
</a>
@@ -777,7 +780,7 @@ from swarmzero import Agent, Swarm
| ---------------------------------------------------------------------------- | ------------------------------------------ | -------------------------------------- |
| ✅ Python SDK | ✅ Multi-session and Cross-session metrics | ✅ Custom eval metrics |
| 🚧 Evaluation builder API | ✅ Custom event tag tracking | 🔜 Agent scorecards |
-| ✅ [Javascript/Typescript SDK](https://github.com/AgentOps-AI/agentops-node) | ✅ Session replays | 🔜 Evaluation playground + leaderboard |
+| 🚧 [Javascript/Typescript SDK (Alpha)](https://github.com/AgentOps-AI/agentops-node) | ✅ Session replays | 🔜 Evaluation playground + leaderboard |
## Debugging Roadmap 🧭
diff --git a/docs/mint.json b/docs/mint.json
index 00fec4ad..7f02bbec 100644
--- a/docs/mint.json
+++ b/docs/mint.json
@@ -186,6 +186,7 @@
"pages": [
"v2/usage/dashboard-info",
"v2/usage/sdk-reference",
+ "v2/usage/typescript-sdk",
"v2/usage/advanced-configuration",
"v2/usage/context-managers",
"v2/usage/tracking-llm-calls",
diff --git a/docs/v1/introduction.mdx b/docs/v1/introduction.mdx
index 38f563c0..9cfb70aa 100644
--- a/docs/v1/introduction.mdx
+++ b/docs/v1/introduction.mdx
@@ -26,6 +26,10 @@ Observability and monitoring for your AI agents and LLM apps. And we do it all i
</CodeGroup>
... that logs everything back to your AgentOps Dashboard.
+<Note>
+AgentOps is also available for TypeScript/JavaScript applications. Check out our [TypeScript SDK guide](/v2/usage/typescript-sdk) for Node.js projects.
+</Note>
+
## The AgentOps Dashboard
<Check>[Give us a star](https://github.com/AgentOps-AI/agentops) to bookmark on GitHub, save for later 🖇️)</Check>
diff --git a/docs/v2/introduction.mdx b/docs/v2/introduction.mdx
index 9e0d1a90..833e66cf 100644
--- a/docs/v2/introduction.mdx
+++ b/docs/v2/introduction.mdx
@@ -36,6 +36,10 @@ Observability and monitoring for your AI agents and LLM apps. And we do it all i
</CodeGroup>
... that logs everything back to your AgentOps Dashboard.
+<Note>
+AgentOps is also available for TypeScript/JavaScript applications. Check out our [TypeScript SDK guide](/v2/usage/typescript-sdk) for Node.js projects.
+</Note>
+
That's it! AgentOps will automatically instrument your code and start tracking traces.
Need more control? You can create custom traces using the `@trace` decorator (recommended) or manage traces manually for advanced use cases:
diff --git a/docs/v2/usage/sdk-reference.mdx b/docs/v2/usage/sdk-reference.mdx
index de29cd30..bfb1d65f 100644
--- a/docs/v2/usage/sdk-reference.mdx
+++ b/docs/v2/usage/sdk-reference.mdx
@@ -5,7 +5,11 @@ description: "All functions and classes exposed in the top layer of the SDK"
# SDK Reference
-This reference documents the functions and classes available with `import agentops`. The AgentOps SDK is designed for easy integration with your agent applications, offering both simple auto-instrumentation and more detailed manual tracing capabilities.
+This reference documents the functions and classes available with `import agentops` for the Python SDK. The AgentOps SDK is designed for easy integration with your agent applications, offering both simple auto-instrumentation and more detailed manual tracing capabilities.
+
+<Note>
+This documentation covers the Python SDK. A TypeScript/JavaScript SDK is also available - see our [TypeScript SDK guide](/v2/usage/typescript-sdk) for details.
+</Note>
## Core Functions
diff --git a/docs/v2/usage/typescript-sdk.mdx b/docs/v2/usage/typescript-sdk.mdx
new file mode 100644
index 00000000..1028b6c4
--- /dev/null
+++ b/docs/v2/usage/typescript-sdk.mdx
@@ -0,0 +1,144 @@
+---
+title: "TypeScript SDK"
+description: "Get started with the AgentOps TypeScript SDK for Node.js applications"
+---
+
+# 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
+
+```bash
+npm install agentops
+```
+
+### Quick Start
+
+```typescript
+import { agentops } from 'agentops';
+
+// Initialize with environment variable AGENTOPS_API_KEY
+await agentops.init();
+
+// Or pass API key explicitly
+await agentops.init({
+ apiKey: 'your-api-key'
+});
+
+// Your AI agent code here - instrumentation happens automatically!
+```
+
+### 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](https://github.com/openai/openai-agents-js/):
+
+```typescript
+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);
+```
+
+Automatically captures:
+- **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:
+
+```bash
+DEBUG=agentops:* node your-app.js
+```
+
+## Legacy TypeScript SDK (Alpha)
+
+<Warning>
+The legacy TypeScript SDK has limited functionality compared to the Python SDK. The modern TypeScript SDK above is recommended for new projects.
+</Warning>
+
+### Installation
+
+```bash
+npm install agentops
+```
+
+### Usage
+
+```typescript
+import OpenAI from "openai";
+import { Client } from 'agentops';
+
+const openai = new OpenAI();
+
+const agentops = new Client({
+ apiKey: "your-agentops-api-key",
+ tags: ["typescript", "example"],
+ patchApi: [openai] // Automatically record OpenAI calls
+});
+
+// Sample OpenAI call (automatically recorded)
+async function chat() {
+ const completion = await openai.chat.completions.create({
+ messages: [
+ { "role": "system", "content": "You are a helpful assistant." },
+ { "role": "user", "content": "Hello!" }
+ ],
+ model: "gpt-3.5-turbo",
+ });
+ return completion;
+}
+
+// Track custom functions
+function customFunction(x: string) {
+ console.log(x);
+ return 5;
+}
+
+const wrappedFunction = agentops.wrap(customFunction);
+wrappedFunction("hello");
+
+// Run your agent
+chat().then(() => {
+ agentops.endSession("Success");
+});
+```
+
+## Repository Links
+
+- **Modern SDK**: [agentops-ts](https://github.com/AgentOps-AI/agentops-ts)
+- **Legacy SDK**: [agentops-node](https://github.com/AgentOps-AI/agentops-node)
+
+## Getting Help
+
+- [Discord Community](https://discord.gg/FagdcwwXRR)
+- [GitHub Issues](https://github.com/AgentOps-AI/agentops-ts/issues)
+- [Documentation](https://docs.agentops.ai)