For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Copy to LLMGithubGo to App
DocumentationIntegrationsAgent OptimizationSelf-hosting OpikSDK & API referenceOpik University
DocumentationIntegrationsAgent OptimizationSelf-hosting OpikSDK & API referenceOpik University
    • Overview
  • TypeScript
    • Opik TypeScript SDK
  • Python
      • AG2
      • Agent Spec
      • Agno
      • BeeAI
      • Claude Agent SDK
      • Autogen
      • CrewAI
      • DSPy
      • Google ADK
      • Haystack
      • Harbor
      • Instructor
      • LangChain
      • LangGraph
      • LangServe
      • LiveKit Agents
      • Llama Index
      • Microsoft Agent Framework
      • OpenAI Agents
      • Pipecat
      • Pydantic AI
      • Semantic Kernel
      • Smolagents
      • Strands Agents
      • Temporal
      • VoltAgent
    • Opik Python SDK
    • OpenTelemetry Python SDK
  • Java
    • Spring AI
    • Quarkus LangChain4j
  • .NET
  • Ruby
    • OpenTelemetry Ruby SDK
  • No-Code
    • Cursor
    • Dify
    • Flowise
    • Langflow
    • n8n
    • OpenClaw
    • OpenAI Codex
    • OpenWebUI
    • Prompt Flow
  • Multi-Language
    • OpenTelemetry
LogoLogo
Copy to LLMGithubGo to App
On this page
  • Getting started
  • Environment configuration
  • Using Opik with VoltAgent
  • Further improvements
PythonFrameworks

Observability for VoltAgent with Opik

Was this page helpful?
Previous

Observability for Anthropic with Opik

Next
Built with

VoltAgent is an agent framework designed to simplify the creation and management of AI agents with built-in support for tool usage, memory management, and multi-agent coordination. It provides a flexible architecture for building production-ready AI agent systems.

VoltAgent’s primary advantage is its modular design that allows developers to easily create, customize, and deploy AI agents with comprehensive tool integration and memory capabilities.

Getting started

To use the VoltAgent integration with Opik, you will need to have VoltAgent and the required OpenTelemetry packages installed:

$npm install @voltagent/core @opentelemetry/api @opentelemetry/sdk-trace @opentelemetry/exporter-trace-otlp-http

Environment configuration

Configure your environment variables based on your Opik deployment:

Opik Cloud
Enterprise deployment
Self-hosted instance

If you are using Opik Cloud, you will need to set the following environment variables:

$export OTEL_EXPORTER_OTLP_ENDPOINT=https://www.comet.com/opik/api/v1/private/otel
$export OTEL_EXPORTER_OTLP_HEADERS='Authorization=<your-api-key>,Comet-Workspace=default'

To log the traces to a specific project, you can add the projectName parameter to the OTEL_EXPORTER_OTLP_HEADERS environment variable:

$export OTEL_EXPORTER_OTLP_HEADERS='Authorization=<your-api-key>,Comet-Workspace=default,projectName=<your-project-name>'

You can also update the Comet-Workspace parameter to a different value if you would like to log the data to a different workspace.

Using Opik with VoltAgent

Set up OpenTelemetry instrumentation for VoltAgent:

1import { trace, SpanStatusCode } from "@opentelemetry/api";
2import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
3import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
4import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
5
6// Configure the OTLP exporter
7const otlpExporter = new OTLPTraceExporter();
8
9// Set up the tracer provider
10const provider = new NodeTracerProvider();
11provider.addSpanProcessor(new BatchSpanProcessor(otlpExporter));
12provider.register();
13
14// Your VoltAgent code will now automatically send traces to Opik
15import { Agent } from "@voltagent/core";
16
17const agent = new Agent();
18// ... agent configuration

Further improvements

If you have any questions or suggestions for improving the VoltAgent integration, please open an issue on our GitHub repository.