Python SDK
Trace, replay, and cluster your LLM agent runs. Wraps OpenAI, Anthropic, LangChain, LlamaIndex, and MCP.
Pre-release. The SDK is not published yet.
The package below is not on a public registry yet, so the install command will not work today. The API shown here is a preview of the shipping interface. Want early access? Sign in to request it.
Install
Once the package is published, install with pip:
pip install verdict-traceOptional per-provider integrations:
pip install "verdict-trace[anthropic]"
pip install "verdict-trace[openai]"
pip install "verdict-trace[langchain]"Configure
import verdict
from verdict_trace import Settings
verdict.configure(Settings.from_env())
verdict.instrument(anthropic=True, openai=True, langchain=True)Environment variables:
VERDICT_API_KEY(required, starts withvdt_)VERDICT_BASE_URL(ingest API,https://verdict-api.jaitly.cloud)VERDICT_BATCH_SIZE(default50)VERDICT_FLUSH_MS(default200)VERDICT_BUFFER_DIR(default~/.verdict/buffer)
Trace an agent run
async with verdict.trace("my-agent") as t:
response = client.messages.create(...)
t.add_step(type="decision", payload={"chose": "tool_x"})Any instrumented Anthropic, OpenAI, or LangChain call inside the trace block is captured automatically. View runs at verdict.jaitly.dev.
Guarantees
- Non-blocking: steps buffered, flushed every 200ms or 50 steps.
- Retry: 5 attempts, exponential backoff 1 → 2 → 4 → 8 → 16s.
- Dead-letter recovery: failed batches saved to
~/.verdict/buffer/, replay viaclient.recover_deadletter(). - Idempotent: step ids are client-generated (UUID7); the server dedupes.