Docs
Getting Started
Installation

Installation

This guide covers all installation methods for AgenticAnts SDKs and integrations.

System Requirements

JavaScript/TypeScript

  • Node.js 20.0.0 or higher
  • npm 9.0.0 or higher (or yarn/pnpm equivalent)
  • TypeScript 4.5+ (if using TypeScript)

Python

  • Python 3.9 or higher
  • pip 21.0 or higher (or poetry/pipenv)

SDK Installation

JavaScript/TypeScript SDK

The JavaScript SDK is available as a main package or as individual modular packages:

# Install main package (includes all sub-packages)
npm install ants-platform
 
# Or install specific packages
npm install @antsplatform/tracing @antsplatform/otel

Verify Installation

import { startObservation } from '@antsplatform/tracing'
 
console.log('Ants Platform SDK installed successfully!')

Python SDK

pip install ants-platform

Verify Installation

from ants_platform import AntsPlatform
 
print('Ants Platform SDK installed successfully!')

Framework Integrations

LangChain Integration

npm install @antsplatform/langchain langchain

LlamaIndex Integration

# Python only
pip install ants-platform[llamaindex]

AutoGen Integration

# Python only
pip install ants-platform[autogen]

Haystack Integration

# Python only
pip install ants-platform[haystack]

Semantic Kernel Integration

dotnet add package AgenticAnts.SemanticKernel

OpenTelemetry Integration

AgenticAnts is fully compatible with OpenTelemetry for standardized observability.

JavaScript

npm install @opentelemetry/api @opentelemetry/sdk-node @antsplatform/otel

Python

pip install opentelemetry-api opentelemetry-sdk ants-platform[opentelemetry]

Development Installation

For contributors and advanced users who want to install from source:

JavaScript/TypeScript

# Clone the repository
git clone https://github.com/ants-platform/ants-platform-js.git
cd ants-platform-js
 
# Install dependencies
pnpm install
 
# Build the SDK
pnpm run build
 
# Link locally
pnpm link
 
# In your project
pnpm link ants-platform

Python

# Clone the repository
git clone https://github.com/ants-platform/ants-platform-python.git
cd ants-platform-python
 
# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
 
# Install in development mode
pip install -e ".[dev]"
 
# Run tests
pytest

Docker Installation

Run AgenticAnts collector in a Docker container:

docker pull agenticants/collector:latest
 
docker run -d \
  --name agenticants-collector \
  -p 4318:4318 \
  -e AGENTICANTS_API_KEY=your_api_key_here \
  agenticants/collector:latest

Docker Compose

version: '3.8'
 
services:
  agenticants-collector:
    image: agenticants/collector:latest
    ports:
      - "4318:4318"
    environment:
      - AGENTICANTS_API_KEY=${AGENTICANTS_API_KEY}
      - AGENTICANTS_ENDPOINT=https://api.agenticants.ai
    restart: unless-stopped

Environment Setup

Environment Variables

Create a .env file in your project root:

# Required
ANTS_PLATFORM_PUBLIC_KEY=pk-ap-your-public-key-here
ANTS_PLATFORM_SECRET_KEY=sk-ap-your-secret-key-here
 
# Optional
ANTS_PLATFORM_HOST=https://api.agenticants.ai
ANTS_PLATFORM_ENVIRONMENT=production
ANTS_PLATFORM_TIMEOUT=30000
ANTS_PLATFORM_BATCH_SIZE=100
ANTS_PLATFORM_FLUSH_INTERVAL=5000

Configuration File

Alternatively, create an agenticants.config.js or agenticants.yaml:

// ants-platform.config.js
module.exports = {
  publicKey: process.env.ANTS_PLATFORM_PUBLIC_KEY,
  secretKey: process.env.ANTS_PLATFORM_SECRET_KEY,
  host: process.env.ANTS_PLATFORM_HOST || 'https://api.agenticants.ai',
  environment: process.env.ANTS_PLATFORM_ENVIRONMENT || 'production',
  timeout: 30000,
  batch: {
    size: 100,
    flushInterval: 5000,
  },
  sampling: {
    rate: 1.0, // Sample 100% of traces
  },
}

Version Management

Check Current Version

npm list ants-platform

Update to Latest Version

npm update ants-platform

Install Specific Version

npm install ants-platform@1.0.11

Troubleshooting

Installation Fails

If installation fails, try:

  1. Clear package cache

    npm cache clean --force
    # or
    pip cache purge
  2. Update package manager

    npm install -g npm@latest
    # or
    pip install --upgrade pip
  3. Check Node/Python version

    node --version  # Should be 20+
    python --version  # Should be 3.9+

Permission Errors

On macOS/Linux, you might need sudo:

sudo npm install -g ants-platform
# or use nvm to avoid sudo

For Python, use virtual environments:

python -m venv venv
source venv/bin/activate
pip install ants-platform

Network Issues

If you're behind a corporate proxy:

# npm
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
 
# pip
pip install --proxy http://proxy.company.com:8080 ants-platform

Import Errors

If you get import errors after installation:

// Try different import styles
import { startObservation } from '@antsplatform/tracing'
// or
const { startObservation } = require('@antsplatform/tracing')

Next Steps

After installation, proceed to: