Back to docs
Getting Started
Quickstart Guide
Get up and running with Kalmia in under 5 minutes. Instrument your agent, register an experiment, and view your first traces.
1
Install the SDK
Install the Kalmia SDK for your language.
pip install kalmia-sdk2
Wrap your LLM client
Initialize the logger and wrap your OpenAI or Anthropic client. Every LLM call is now automatically traced.
from kalmia_sdk import init_logger, wrap_anthropic, traced
import anthropic
init_logger(
project_name="my-agent",
base_url="https://your-kalmia.app"
)
client = wrap_anthropic(anthropic.Anthropic())3
Trace an agent run
Use traced() to group multiple LLM calls into a single trace. Without it, each call creates its own standalone trace.
@traced(name="my-agent-run")
def run(prompt):
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": prompt}],
)
return response.content[0].text
run("What is the capital of France?")4
Register an experiment
Group traces into an experiment to compare variants. Each trace is identified by its correlation ID.
curl -X POST https://your-kalmia.app/api/experiments \
-H "Content-Type: application/json" \
-d '{
"name": "RAG vs no-RAG",
"correlationIds": [
"run-abc-123",
"run-def-456"
]
}'5
View your traces
Open Kalmia in your browser and navigate to the experiment. You'll see your traces preprocessed with metrics computed automatically — duration, tokens, tool calls, and more.
Kalmia polls for new traces every 3 seconds while an experiment is open. Launch your agent variants and watch results stream in live.

