Docs
Getting Started
Quick Start

Quick Start Guide

Get started with AgenticAnts in under 5 minutes. This guide will walk you through setting up your first AI agent monitoring.

Prerequisites

Before you begin, ensure you have:

  • A modern web browser
  • Node.js 20+ or Python 3.9+ installed
  • An existing AI agent or application (or follow along with our example)

Step 1: Create Your Account

  1. Visit agenticants.ai (opens in a new tab)
  2. Click "Request Demo" or "Get Started"
  3. Fill out the contact form with your details
  4. You'll receive an email with your account credentials

Free Trial Available: Start with our free trial - 50,000 credits included, no credit card required.

Step 2: Set Up Your Organization and Project

After creating your account, you'll be guided through a quick setup process to configure your organization and project:

Organization and Project Setup

The setup workflow includes:

  1. Create Your Organization - Enter your organization name (e.g., "Acme Corporation")
  2. Invite Team Members - Add team members by email and assign roles (Admin, Member, Viewer). You can skip this and invite members later from Organization Settings
  3. Create Your First Project - Set up a project with a name and description. Select which team members should have access
  4. Add Payment Method - Optional step for continued usage beyond the free trial. Powered by Stripe for secure payment processing. Your free trial includes 50,000 credits with no credit card required
  5. Setup Tracing - Get your API keys to start integrating AgenticAnts into your applications

Setup Complete! Your organization and project are now ready. You can now proceed to get your API credentials.

Step 3: Get Your Credentials

Once logged in:

  1. Navigate to SettingsAPI Keys
  2. Find your Public Key and Secret Key
  3. Copy both keys and store them securely
# Set your credentials as environment variables
export ANTS_PLATFORM_PUBLIC_KEY="pk-ap-your-public-key-here"
export ANTS_PLATFORM_SECRET_KEY="sk-ap-your-secret-key-here"
export ANTS_PLATFORM_HOST="https://api.agenticants.ai"  # Optional, defaults to production
⚠️

Keep Your Keys Secret: Never commit your keys to version control or share them publicly. The secret key provides full access to your account.

Step 4: Install the SDK

Choose your preferred programming language:

npm install ants-platform
# or install specific packages
npm install @antsplatform/tracing @antsplatform/otel
# or
yarn add ants-platform
# or
pnpm add ants-platform

Step 5: Initialize AgenticAnts

Set up AgenticAnts in your application:

// For OpenTelemetry-based setup (recommended)
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
import { resourceFromAttributes } from "@opentelemetry/resources";
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
import { AntsPlatformSpanProcessor } from "@antsplatform/otel";
import { setAntsPlatformTracerProvider } from "@antsplatform/tracing";
 
// Create the Ants Platform span processor
const processor = new AntsPlatformSpanProcessor({
  publicKey: process.env.ANTS_PLATFORM_PUBLIC_KEY,
  secretKey: process.env.ANTS_PLATFORM_SECRET_KEY,
  baseUrl: process.env.ANTS_PLATFORM_HOST || "https://api.agenticants.ai",
  environment: process.env.ANTS_PLATFORM_ENVIRONMENT || "production",
});
 
// Create tracer provider
const provider = new NodeTracerProvider({
  resource: resourceFromAttributes({
    [SemanticResourceAttributes.SERVICE_NAME]: "my-agent",
    [SemanticResourceAttributes.SERVICE_VERSION]: "1.0.0",
  }),
  spanProcessors: [processor],
});
 
// Register with Ants Platform and globally
setAntsPlatformTracerProvider(provider);
provider.register();
 
console.log('✅ Ants Platform tracing initialized');

Step 6: Instrument Your First Agent

Now let's add monitoring to an AI agent:

import { startObservation } from '@antsplatform/tracing'
import OpenAI from 'openai'
 
const openai = new OpenAI()
 
async function customerSupportAgent(query: string) {
  // Start a trace
  const trace = startObservation('customer-support-agent', {
    input: { user_input: query },
    metadata: {
      agent: 'customer-support',
      channel: 'web-chat',
      priority: 'high'
    }
  })
 
  // Set trace-level attributes
  trace.updateTrace({
    userId: 'user_123',
    tags: ['agent:customer-support', 'service:my-app', 'version:1.0.0']
  })
 
  try {
    // Create a span for request validation
    const validationSpan = trace.startObservation('request_validation', {
      input: { raw_input: query },
      metadata: { step: 'validation' }
    })
    // Validate input...
    validationSpan.update({
      output: { validated_input: query, input_length: query.length }
    })
    validationSpan.end()
 
    // Create a span for LLM call
    const llmSpan = trace.startObservation('llm_preparation', {
      input: { model: 'gpt-4', task: 'customer-support' },
      metadata: { step: 'preparation' }
    })
    llmSpan.end()
 
    // Your agent logic
    const response = await openai.chat.completions.create({
      model: 'gpt-4',
      messages: [
        { role: 'system', content: 'You are a helpful customer support agent.' },
        { role: 'user', content: query }
      ]
    })
 
    const output = response.choices[0].message.content
 
    // Create generation span for LLM call
    const generation = trace.startObservation('gpt-4_llm_call', {
      model: 'gpt-4',
      input: query,
      output: output,
      usageDetails: {
        input: response.usage.prompt_tokens,
        output: response.usage.completion_tokens,
        total: response.usage.total_tokens
      },
      metadata: {
        step: 'llm_call',
        status: 'success',
        agent: 'customer-support'
      }
    }, { asType: 'generation' })
    generation.end()
 
    // Update trace with final results
    trace.update({
      output: { result: output },
      metadata: {
        input_tokens: response.usage.prompt_tokens,
        output_tokens: response.usage.completion_tokens,
        total_tokens: response.usage.total_tokens,
        status: 'success'
      }
    })
 
    // End the trace
    trace.end()
 
    return output
  } catch (error) {
    // Log errors
    const errorSpan = trace.startObservation('error_handling', {
      input: { error: error.message },
      output: { error_response: error.message },
      level: 'ERROR',
      metadata: {
        error_type: error.name,
        step: 'error_handling'
      }
    })
    errorSpan.end()
 
    trace.update({
      level: 'ERROR',
      output: { error: error.message }
    })
    trace.end()
 
    throw error
  }
}
 
// Use your agent
const result = await customerSupportAgent('How do I track my order?')
console.log(result)

Step 7: View Your Data

  1. Navigate to your AgenticAnts Dashboard (opens in a new tab)
  2. You should see your first trace appear within seconds
  3. Click on the trace to see detailed information:
    • Input and output
    • Execution time
    • Token usage and cost
    • Metadata and tags

AgenticAnts Traces Dashboard

** Congratulations!** You've successfully instrumented your first AI agent with AgenticAnts.

Next Steps

Now that you have basic monitoring set up, explore more features:

Advanced Tracing

Learn how to trace complex multi-agent systems with nested spans and parallel operations.

Read the SRE guide →

Cost Tracking

Set up detailed cost tracking and budgets for your AI operations.

Read the FinOps guide →

Security Setup

Add PII detection and security guardrails to protect sensitive data.

Read the Security Posture guide →

Framework Integrations

Integrate with LangChain, LlamaIndex, or other AI frameworks.

View all integrations →

Common Issues

Credentials Not Working

If you're getting authentication errors:

  1. Verify both your public key and secret key are correct
  2. Check they're properly set in your environment variables
  3. Ensure there are no extra spaces or characters
# Verify your credentials are set
echo $ANTS_PLATFORM_PUBLIC_KEY
echo $ANTS_PLATFORM_SECRET_KEY

Connection Timeout

If requests are timing out:

  1. Check your network connection
  2. Verify firewall settings allow outbound HTTPS
  3. Try increasing timeout settings
const processor = new AntsPlatformSpanProcessor({
  publicKey: process.env.ANTS_PLATFORM_PUBLIC_KEY,
  secretKey: process.env.ANTS_PLATFORM_SECRET_KEY,
  baseUrl: process.env.ANTS_PLATFORM_HOST,
  timeout: 30000, // 30 seconds
})

Traces Not Appearing

If traces aren't showing in the dashboard:

  1. Verify your public key and secret key are correct
  2. Check the environment setting matches your dashboard view
  3. Verify the host URL is correct for your deployment
  4. Wait a few seconds - traces are processed asynchronously
  5. Check that your OpenTelemetry provider is properly registered

Example Projects

Check out these complete example projects:

  • Customer Support Bot - LangChain + OpenAI integration
  • Code Assistant - Multi-agent system with tool usage
  • Document Q&A - RAG system with LlamaIndex
  • Data Analyst Agent - AutoGen integration with code execution

View examples on GitHub → (opens in a new tab)

What's Next?