Installation
SDKInstall the Traccia SDK for Python or TypeScript (Node.js).
Traccia ships two SDKs with the same tracing model: a Python SDK on PyPI and a TypeScript SDK on npm (runs on Node.js 16+). Use whichever matches your agent stack — APIs and span attributes are aligned across both.
Basic Installation
Python
Install from PyPI using pip or poetry:
pip install tracciaTypeScript
Install from npm. The package includes TypeScript definitions and also works from plain JavaScript on Node.js:
npm install @traccia/sdkRequirements
Python SDK
Python 3.9 or higher
Tested on 3.9, 3.10, 3.11, and 3.12
Package manager
pip, poetry, or any PyPI-compatible tool
TypeScript SDK
Node.js 16 or higher
LTS releases recommended for production
Package manager
npm, yarn, or pnpm
Core Dependencies
Each SDK installs its own OpenTelemetry and helper libraries automatically:
Python
tiktoken ≥ 0.7.0— Token counting for LLM callsopentelemetry-api ≥ 1.20.0— OpenTelemetry core APIopentelemetry-sdk ≥ 1.20.0— OpenTelemetry SDK implementationopentelemetry-exporter-otlp-proto-http ≥ 1.20.0— OTLP HTTP exporterpydantic ≥ 2.0.0— Configuration validationTypeScript
@opentelemetry/api— OpenTelemetry core API@opentelemetry/sdk-trace-base— Trace SDK@opentelemetry/exporter-trace-otlp-proto— OTLP exporterzod— Configuration validationNo heavy dependencies
Verify Installation
Confirm the SDK and CLI are available:
# Check versionpython -c "import traccia; print(traccia.__version__)"
# Verify CLI is availabletraccia --helpExpected output (Python):
0.1.22
usage: traccia [-h] [--config CONFIG] {check,config,doctor,pricing} ...
Traccia SDK - Production-ready tracing for AI agentsExpected output (TypeScript):
0.1.4
Usage: traccia-ts [options] [command]
Traccia SDK CLI for TypeScript / Node.jsDevelopment Installation
To contribute or install from source, clone the language-specific repository:
git clone https://github.com/traccia-ai/traccia-py.gitcd traccia-py
pip install -e .
# Or with development dependenciespip install -e ".[dev]"Troubleshooting
Python
ModuleNotFoundError: No module named 'traccia'
Ensure Traccia is installed in the active virtual environment.
which pythonpip list | grep tracciacommand not found: traccia
Add pip's script directory to your PATH, or invoke the module directly:
python -m traccia --helpexport PATH="$PATH:~/.local/bin"TypeScript
Cannot find module '@traccia/sdk'
Install the package in your project directory and restart your dev server or REPL.
npm install @traccia/sdknode -e "require('@traccia/sdk')"command not found: traccia-ts
Run the CLI through npx or add node_modules/.bin to your PATH:
npx traccia-ts --helpnpx traccia-ts doctorDocker Installation
Add Traccia to your dependency manifest, then install it in the image build step:
openai>=1.0.0anthropic>=0.5.0traccia>=0.1.22Example Dockerfile:
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "main.py"]Next Steps
© 2026 Traccia.