Skip to main content

Install the SDK

npm install aden
Or with other package managers:
npm install aden

Install Provider SDKs

Install the LLM provider SDKs you plan to use:
npm install openai

Requirements

RequirementVersion
Node.js>= 18.0.0
TypeScript>= 5.0.0 (optional)

Peer Dependencies

PackageVersionRequired
openai>= 4.0.0If using OpenAI
@anthropic-ai/sdk>= 0.20.0If using Anthropic
@google/generative-ai>= 0.1.0If using Gemini

Verify Installation

Create a simple test file:
import { instrument, createConsoleEmitter, uninstrument } from "aden";
import OpenAI from "openai";

async function main() {
  // Instrument the SDK
  const result = await instrument({
    emitMetric: createConsoleEmitter({ pretty: true }),
    sdks: { OpenAI },
  });

  console.log("Instrumented:", result);
  // Output: { openai: true, anthropic: false, gemini: false }

  // Clean up
  await uninstrument();
}

main();
Run the test:
npx tsx test.ts

TypeScript Configuration

For TypeScript projects, ensure your tsconfig.json includes:
{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "esModuleInterop": true,
    "strict": true
  }
}

CommonJS vs ESM

The SDK supports both module formats:
import { instrument, createConsoleEmitter } from "aden";

Next Steps

Quick Start

Learn how to instrument your first LLM application