Skip to main content
In this tutorial you’ll deploy an example AI Agent in Kubernetes and automatically capture complete observability — distributed traces, LLM costs, token usage, and agent performance metrics — using the OpenLIT Operator.

Prerequisites

  • A Kubernetes cluster with cluster-admin access
  • Helm installed
  • kubectl configured for your cluster
Don’t have a cluster? You can create one locally with k3d (k3d cluster create openlit-demo) or minikube (minikube start --cpus=2 --memory=4096mb --driver=docker).
1

Install the OpenLIT Platform

Install the OpenLIT observability platform to collect and visualize traces and metrics.Add the Helm repository:
Install the platform:
Wait for the platform pods to reach Running status:
2

Install the OpenLIT Operator

Install the operator to enable zero-code instrumentation:
Verify the operator is running:
Expected output:
3

Create an AutoInstrumentation resource

Create an AutoInstrumentation custom resource that defines which pods to instrument and where to send telemetry:
This tells the operator to inject instrumentation into any pod in the default namespace that has the label instrumentation: openlit.
Already have AI applications running? Instrumentation is injected at pod startup. Restart existing pods to enable it:
4

Deploy the example AI Agent

Deploy a sample AI Agent built with CrewAI. This deployment already has the instrumentation: openlit label, so it will be automatically instrumented:
Check that the pod starts with the instrumentation init container:
5

View traces and metrics in OpenLIT

Port-forward to the OpenLIT dashboard:
Open http://localhost:3000 in your browser and navigate to the Traces section. You’ll see:
  • Service overview — your openlit-test-app service with health metrics
  • Trace timeline — individual traces for HTTP requests and LLM API calls
  • LLM operations — detailed spans showing token usage per call
  • Cost tracking — estimated costs based on token usage
  • Performance metrics — response times, error rates, and throughput

Next steps

Installation

Full installation guide with prerequisites, upgrade paths, and troubleshooting

Configuration

Configure the operator and AutoInstrumentation resources in detail

Instrumentations

Annotate your own deployments and choose an instrumentation provider

Destinations

Send telemetry to your existing observability stack