Skip to content

The open source post-building layer for agents. Our traces + evals power agent post-training (RL, SFT), monitoring, and regression testing.

License

Notifications You must be signed in to change notification settings

JudgmentLabs/judgeval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Judgment Logo Judgment Logo
Enable self-learning agents with traces, evals, and environment data.

Docs β€’ Judgment Cloud β€’ Self-Host β€’ Landing Page

Demo β€’ Bug Reports β€’ Changelog

We're hiring! Join us in our mission to enable self-learning agents by providing the data and signals needed for monitoring and post-training.

X LinkedIn Discord

Judgment Platform

Judgeval offers open-source tooling for tracing and evaluating autonomous, stateful agents. It provides runtime data from agent-environment interactions for continuous learning and self-improvement.

🎬 See Judgeval in Action

Multi-Agent System with complete observability: (1) A multi-agent system spawns agents to research topics on the internet. (2) With just 3 lines of code, Judgeval traces every input/output + environment response across all agent tool calls for debugging. (3) After completion, (4) export all interaction data to enable further environment-specific learning and optimization.

Agent Demo
πŸ€– Agents Running
Trace Demo
πŸ“Š Real-time Tracing
Agent Completed Demo
βœ… Agents Completed Running
Data Export Demo
πŸ“€ Exporting Agent Environment Data

πŸ“‹ Table of Contents

πŸ› οΈ Installation

Get started with Judgeval by installing our SDK using pip:

pip install judgeval

Ensure you have your JUDGMENT_API_KEY and JUDGMENT_ORG_ID environment variables set to connect to the Judgment Platform.

export JUDGMENT_API_KEY=...
export JUDGMENT_ORG_ID=...

If you don't have keys, create an account on the platform!

🏁 Quickstarts

πŸ›°οΈ Tracing

Create a file named agent.py with the following code:

from judgeval.tracer import Tracer, wrap
from openai import OpenAI

client = wrap(OpenAI())  # tracks all LLM calls
judgment = Tracer(project_name="my_project")

@judgment.observe(span_type="tool")
def format_question(question: str) -> str:
    # dummy tool
    return f"Question : {question}"

@judgment.observe(span_type="function")
def run_agent(prompt: str) -> str:
    task = format_question(prompt)
    response = client.chat.completions.create(
        model="gpt-4.1",
        messages=[{"role": "user", "content": task}]
    )
    return response.choices[0].message.content
    
run_agent("What is the capital of the United States?")

You'll see your trace exported to the Judgment Platform:

Judgment Platform Trace Example

Click here for a more detailed explanation.

✨ Features

πŸ” Tracing

Automatic agent tracing integrated with common frameworks (LangGraph, OpenAI, Anthropic). Tracks inputs/outputs, agent tool calls, latency, cost, and custom metadata at every step.

Useful for:
β€’ πŸ› Debugging agent runs
β€’ πŸ“‹ Collecting agent environment data
β€’ πŸ”¬ Pinpointing performance bottlenecks

Tracing visualization

πŸ§ͺ Evals

Build custom evaluators on top of your agents. Judgeval supports LLM-as-a-judge, manual labeling, and code-based evaluators that connect with our metric-tracking infrastructure.

Useful for:
β€’ ⚠️ Unit-testing
β€’ πŸ”¬ A/B testing
β€’ πŸ›‘οΈ Online guardrails

Evaluation metrics

πŸ“‘ Monitoring

Get Slack alerts for agent failures in production. Add custom hooks to address production regressions.

Useful for:
β€’ πŸ“‰ Identifying degradation early
β€’ πŸ“ˆ Visualizing performance trends across agent versions and time

Monitoring Dashboard

πŸ“Š Datasets

Export traces and test cases to datasets for scaled analysis and optimization. Move datasets to/from Parquet, S3, etc.

Run evals on datasets as unit tests or to A/B test different agent configurations, enabling continuous learning from production interactions.

Useful for:
β€’ πŸ—ƒοΈ Agent environment interaction data for optimization
β€’ πŸ”„ Scaled analysis for A/B tests

Dataset management

🏒 Self-Hosting

Run Judgment on your own infrastructure: we provide comprehensive self-hosting capabilities that give you full control over the backend and data plane that Judgeval interfaces with.

Key Features

  • Deploy Judgment on your own AWS account
  • Store data in your own Supabase instance
  • Access Judgment through your own custom domain

Getting Started

  1. Check out our self-hosting documentation for detailed setup instructions, along with how your self-hosted instance can be accessed
  2. Use the Judgment CLI to deploy your self-hosted environment
  3. After your self-hosted instance is setup, make sure the JUDGMENT_API_URL environmental variable is set to your self-hosted backend endpoint

πŸ“š Cookbooks

Have your own? We're happy to feature it if you create a PR or message us on Discord.

You can access our repo of cookbooks here.

πŸ’» Development with Cursor

Building agents and LLM workflows in Cursor works best when your coding assistant has the proper context about Judgment integration. The Cursor rules file contains the key information needed for your assistant to implement Judgment features effectively.

Refer to the official documentation for access to the rules file and more information on integrating this rules file with your codebase.

⭐ Star Us on GitHub

If you find Judgeval useful, please consider giving us a star on GitHub! Your support helps us grow our community and continue improving the repository.

❀️ Contributors

There are many ways to contribute to Judgeval:

Contributors


Judgeval is created and maintained by Judgment Labs.