Quickstart: Python

From zero to your first replayable trace in under three minutes. Works with any LangChain agent (Python 3.9+).

1. Install

pip install vorlo-trace

2. Get an API key

Create one in your Vorlo account under Settings → API keys. Set it as an environment variable (or pass it to init() directly):

export VORLO_API_KEY="vrlo_..."

3. Add two lines to your agent

import vorlo_trace
from langchain.agents import AgentExecutor

# 1 — initialize once at startup
vorlo_trace.init(agent_name="order-agent")  # reads VORLO_API_KEY

# 2 — pass the handler wherever your agent runs
result = agent_executor.invoke(
    {"input": "Process the refund for order #1234"},
    config={"callbacks": [vorlo_trace.get_handler()]},
)

That's it. Open your dashboard— the run appears as a session with every tool call, the model's reasoning, token cost per step, and (if anything failed) the diagnosis.

Or use the convenience wrapper

out = vorlo_trace.trace(agent_executor, input="Process the refund")

Redacting sensitive data

Pass a redact callback and it runs on every captured string — tool inputs, outputs, errors, and reasoning — before anything leaves your process. If your callback raises, the content is dropped rather than shipped raw.

import re

def scrub(text: str) -> str:
    return re.sub(r"[\w.+-]+@[\w-]+\.[\w.]+", "[EMAIL]", text)

vorlo_trace.init(agent_name="order-agent", redact=scrub)

Verify it's working

  • Set VORLO_DEBUG=1 to log SDK send activity to stderr (the SDK is silent by default — it never pollutes your output).
  • The dashboard's empty state listens live and celebrates the moment your first trace arrives.
The SDK never raises and never blocks: events are queued to a daemon thread with a bounded queue and a 2-second send timeout. If Vorlo is unreachable, your agent runs exactly as before.