Skip to main content
If you’re creating a new ABV account, the onboarding flow will guide you through these steps automatically. This guide is for manual setup or reference.

Get your API key

Create an ABV account and generate API credentials:
  1. Sign up for ABV (free trial available)
  2. Navigate to Project Settings β†’ API Keys
  3. Click Create API Key and copy your key (starts with sk-abv-...)

Install the ABV SDK

Install the required packages for ABV tracing:
npm install @abvdev/tracing @abvdev/otel @opentelemetry/sdk-node dotenv
This installs:
  • @abvdev/tracing - ABV’s tracing SDK
  • @abvdev/otel - ABV’s OpenTelemetry integration
  • @opentelemetry/sdk-node - OpenTelemetry Node.js SDK
  • dotenv - Environment variable management

Configure environment variables

Create a .env file in your project root with your ABV credentials:
.env
ABV_API_KEY="sk-abv-..."
ABV_BASE_URL="https://app.abv.dev"  # US region
# ABV_BASE_URL="https://eu.app.abv.dev"  # EU region (uncomment if needed)
Make sure .env is in your .gitignore to avoid committing secrets.

Choose your instrumentation method

ABV offers two ways to instrument your JavaScript/TypeScript application. Choose based on your use case:

Choose Your Instrumentation Method

Best for: LLM applications that need automatic tracing with zero manual instrumentationThe ABV Gateway is the fastest way to get complete observability for LLM calls. It automatically captures all metrics without any manual tracing code.
New users get $1 in free credits to test the gateway.
Install the ABV client:
npm install @abvdev/client dotenv
Create a traced LLM application:
server.ts
import { ABVClient } from '@abvdev/client';
import dotenv from 'dotenv';

// Load environment variables
dotenv.config();

// Initialize the ABV client
const abv = new ABVClient(); // Uses ABV_API_KEY from environment

async function main() {
  // Make a gateway request - automatically creates a complete trace
  const response = await abv.gateway.chat.completions.create({
    provider: 'openai',
    model: 'gpt-4o-mini',
    messages: [
      { role: 'user', content: 'What is the capital of France?' }
    ]
  });

  // Access the response
  const output = response.choices[0].message.content;
  console.log(`Response: ${output}`);
}

main();
What gets captured automatically:
  • Full conversation context (user query and LLM response)
  • Model and provider information
  • Token usage (input/output counts)
  • Cost tracking (deducted from gateway credits)
  • Latency metrics (total duration and API timing)
  • Complete observability with zero manual instrumentation
Switch providers easily:
// Try Anthropic's Claude
const response = await abv.gateway.chat.completions.create({
  provider: 'anthropic',
  model: 'claude-sonnet-4-5',
  messages: [{ role: 'user', content: 'What is the capital of France?' }]
});

// Or try Google's Gemini
const response = await abv.gateway.chat.completions.create({
  provider: 'gemini',
  model: 'gemini-2.0-flash-exp',
  messages: [{ role: 'user', content: 'What is the capital of France?' }]
});
The gateway requires no OpenTelemetry setup. Just install @abvdev/client and start making requests.

Run Your First Trace

Execute your application to send your first trace to ABV:
npx tsx server.ts
Navigate to app.abv.dev and click Traces in the sidebar. You should see your trace with:
  • The input query and output
  • Model and provider information (if using gateway)
  • Nested observation hierarchy
  • Timing information and metrics
If you don’t see traces immediately, wait a few seconds and refresh. Check that your API key is correct.

Next Steps

Enhance Your Traces

Build Production-Grade AI

Advanced Platform Features