What is Judgeval?
Judgeval is the open-source Python SDK from Judgment Labs for improving AI agents once they are in production. It sits in the Observability & LLMOps category of the Evaluation & Production Ops tools and is open-source, written in Python and licensed Apache-2.0. To get started: install Judgeval.
Overview
Judgeval is the open-source Python SDK from Judgment Labs for improving AI agents once they are in production. Its README describes it as tracing and agent-judge evaluation for LLM-powered applications: you instrument your agent, every run is recorded as a trace, and judges score those traces so you can detect failures, understand what went wrong, and check a fix against real production cases before you ship it.
Tracing is built on OpenTelemetry. You decorate functions with `@Tracer.observe()` and wrap your model client, and Judgeval captures inputs, outputs and LLM token usage as spans under one agent root. Auto-instrumentation covers OpenAI, Anthropic, Google GenAI and Together AI, with framework support for LangGraph, OpenLit and the Claude Agent SDK; the docs list further integrations such as the OpenAI Agents SDK, Google ADK, Vercel AI SDK, LiveKit and Pipecat.

Agent judges are prompt-based scorers you define once and run at scale. Each judge turns a trace into a structured, labelled behaviour, and those behaviours accumulate into a searchable record of how your agent acted. Judges can score live production traffic server-side through online monitoring (with Slack alerts for regressions) or be replayed on historical traces. The traces and judges live in the hosted Judgment platform, so the quickstart needs a Judgment account, API key and organization ID; the platform can also be reached from a CLI, an MCP server and a read-only SQL API in the SDK.
What it does
- OpenTelemetry-based tracing via `@Tracer.observe()`, capturing inputs, outputs and LLM token usage
- Prompt-based agent judges that turn traces into scored, labelled behaviours
- Online monitoring that scores live production traffic server-side, with Slack alerts
- Replay of judges on historical traces to validate a fix before shipping
- Auto-instrumentation for OpenAI, Anthropic, Google GenAI and Together AI, plus LangGraph, OpenLit and Claude Agent SDK support
- Read-only SQL queries over trace data with `Judgeval.sql()`, plus a companion CLI and MCP server
Getting started
These steps follow the Judgment docs quickstart: install the SDK, point it at your Judgment project, trace one agent path, then attach a judge in the Judgment app.
Install Judgeval
Install the SDK together with the OpenAI client and python-dotenv used by the example. The docs also ship a TypeScript package installed with `npm install judgeval openai`.
pip install judgeval openai python-dotenvSet your credentials
Create a Judgment account and project, copy the API key from Settings > Account & API Key, and set it with the organization ID and the exact project name.
JUDGMENT_API_KEY="your_judgment_api_key"
JUDGMENT_ORG_ID="your_organization_id"
JUDGMENT_PROJECT_NAME="your_exact_project_name"
OPENAI_API_KEY="your_openai_api_key"Trace one agent path
Initialise the tracer before creating wrapped clients, put one `agent` span around the user-visible work and let tool and model calls become its children. Run it with `python trace_agent.py`.
import os
from dotenv import load_dotenv
from judgeval import Tracer
from openai import OpenAI
load_dotenv()
Tracer.init(project_name=os.environ["JUDGMENT_PROJECT_NAME"])
openai = Tracer.wrap(OpenAI())
@Tracer.observe(span_type="tool", span_name="retrieve_context")
def retrieve_context(question: str) -> str:
return f"Reference material relevant to: {question}"
@Tracer.observe(span_type="agent", span_name="run_agent")
def run_agent(question: str) -> str:
context = retrieve_context(question)
response = openai.chat.completions.create(
model="gpt-5.2",
messages=[{
"role": "user",
"content": f"Question: {question}\n\nContext: {context}",
}],
)
return response.choices[0].message.content
if __name__ == "__main__":
print(run_agent("What is the capital of the United States?"))
Tracer.shutdown()Check the trace
In your Judgment project open Logs > Traces and the newest `run_agent` trace. It should show one `run_agent` root, a `retrieve_context` tool span and one model span under it, with a completed duration.

Create and monitor an agent judge
Open Judges > New Judge, choose Create manually and Binary, name it `Uses retrieved context` and give it the prompt below. Then use Set up monitoring with Continuous evaluation at 100% sampling, run the agent again, and read the judge's decision and reasoning in the trace's Behaviors panel.
Return true when the agent retrieves context before answering the user.
Return false when it answers without retrieving context.Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Tracing a production agent's tool and model calls to find the step where a bad answer started

- Continuously scoring live agent traffic with a judge and getting a Slack alert when a behaviour regresses
- Replaying a judge on historical traces to confirm a prompt or code fix before shipping it
- Querying trace history with read-only SQL from a script, the CLI or a coding agent over MCP
How Judgeval compares
Judgeval alongside other open-source observability & llmops tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Langfuse | ★ 38k | A self-hostable platform for tracing LLM and agent calls, managing prompts, and running evaluations to debug and improve AI applications. |
| Opik | ★ 23.5k | An open-source platform from Comet for tracing, evaluating, and monitoring LLM applications, RAG systems, and agent workflows with dashboards and LLM-as-judge metrics. |
| RagaAI Catalyst | ★ 16.2k | Python SDK that combines agentic tracing, metric evaluation, dataset and prompt management, guardrails and red-teaming for LLM and multi-agent applications. |
| CodeBurn | ★ 11.9k | Reads the session files 41 AI coding tools already write to disk and breaks token spend down by model, project and task — no API keys or proxy — then flags waste and correlates spend with git commits. |
| TensorZero | ★ 11.7k | An open-source LLMOps platform that puts a single gateway in front of every major LLM provider and adds observability, evaluation, optimization, and A/B testing. |
| Evidently | ★ 8.1k | A monitoring and evaluation framework for ML and LLM systems that tracks output quality, drift, and test results over time with reports and dashboards. |
| Star Office UI | ★ 7.6k | A self-hosted pixel-art office that shows an AI agent's live work state, with a character moving between desk, sofa and bug corner as it writes, idles or hits errors; built for OpenClaw but drivable by any HTTP client. |
| Judgeval | ★ 1.1k | Open-source SDK that traces AI agents and scores their behaviour with agent judges |
