Skip to main content

Local-first evaluation framework for LLM agents — tracing, metrics, calibration, and insights.

Project description

Evalyn SDK

Local-first evaluation framework for LLM agents

Evalyn makes GenAI app evaluation practical and easy. Trace LLM calls, evaluate with 130+ metrics, calibrate judges with human feedback — all running locally on your machine.

Why Evalyn?

Fully Local All data stays on your machine. SQLite storage, no cloud dependencies.
Easy Onboarding Just import evalyn_sdk — LLM calls auto-captured with tokens & cost.
Metric Bank 130+ built-in metrics (73 objective, 60 LLM judges).
Auto Calibration 5 optimizers (GEPA, EvoPrompt, TextGrad, MIPROv2, PromptBreeder) align LLM judges with human feedback.
One Command Run the entire pipeline with evalyn one-click.

Install

pip install evalyn-sdk

# With LLM judge support (OpenAI + Gemini):
pip install "evalyn-sdk[llm]"

Quick Start

1. Instrument Your Agent

import evalyn_sdk  # Auto-patches OpenAI, Anthropic, Gemini clients

from evalyn_sdk import eval

@eval(project="myapp", version="v1")
def my_agent(query: str) -> str:
    return call_llm(query)  # LLM calls auto-captured

Important: import evalyn_sdk must come before importing your LLM client library.

2. Run Your Agent

python my_agent.py "What is quantum computing?"

# Initialize config
evalyn init

3. Evaluate

One command:

evalyn one-click --project myapp

Or step by step:

evalyn build-dataset --project myapp
evalyn suggest-metrics --dataset data/prod/datasets/myapp-*/dataset.jsonl --mode llm-registry
evalyn run-eval --dataset data/prod/datasets/myapp-*/dataset.jsonl
evalyn insights --latest --format html

4. Calibrate (Optional)

Align LLM judges with your human judgment:

evalyn annotate --latest
evalyn calibrate --metric-id factual_accuracy
evalyn run-eval --dataset <path> --use-calibrated

The Pipeline

COLLECT  →  EVALUATE  →  CALIBRATE  →  EXPAND
@eval       suggest-     annotate      simulate
trace       metrics      calibrate     synthetic
build-      run-eval     cluster-      queries
dataset     insights     failures

Key Commands

Command What it does
evalyn one-click --project X Run full pipeline
evalyn list-calls View captured traces
evalyn show-trace --last -v View span tree with details
evalyn build-dataset --project X Create dataset from traces
evalyn suggest-metrics --dataset D Get metric recommendations
evalyn run-eval --dataset D Run evaluation
evalyn insights --latest Analysis with recommendations
evalyn insights --latest --deep Add LLM expert panel
evalyn insights --latest --format html Interactive HTML dashboard
evalyn annotate --latest Human annotation
evalyn calibrate --metric-id X Calibrate LLM judges

Supported Frameworks

Auto-instrumentation for: OpenAI, Anthropic, Google Gemini, LangChain, CrewAI, AutoGen, DSPy, Haystack, LlamaIndex, Semantic Kernel

Optional Extras

pip install "evalyn-sdk[llm]"              # OpenAI + Gemini for LLM judges
pip install "evalyn-sdk[agent]"            # LangChain + LangGraph agent support
pip install "evalyn-sdk[anthropic-agents]" # Anthropic Agent SDK support
pip install "evalyn-sdk[clustering]"       # Failure clustering with embeddings
pip install "evalyn-sdk[dev]"              # pytest + coverage for development

Environment Variables

Variable Description
GEMINI_API_KEY Gemini API key for LLM judges (default provider)
OPENAI_API_KEY OpenAI API key when using --provider openai
EVALYN_NO_HINTS Set to 1 to suppress hint messages
EVALYN_AUTO_INSTRUMENT Set to off to disable auto-patching

Claude Code Skills

Evalyn includes Claude Code skills that let Claude guide you through the evaluation pipeline conversationally:

# Install skills
cp -r skills/evalyn-* ~/.claude/skills/

Then in Claude Code: "Help me evaluate my agent" — Claude handles the rest.

License

MIT

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evalyn_sdk-0.1.0.tar.gz (338.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evalyn_sdk-0.1.0-py3-none-any.whl (404.2 kB view details)

Uploaded Python 3

File details

Details for the file evalyn_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: evalyn_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 338.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for evalyn_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 04119528231ac201017c0ea3a38133a29239a71528c273c0055d28e43ff6e501
MD5 7b5674160ae9e551a762b42f063d92e8
BLAKE2b-256 e3ae24bae87647101af8b36589f03361ae80331a1a0b7c935a9698a6f06532e7

See more details on using hashes here.

File details

Details for the file evalyn_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: evalyn_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 404.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for evalyn_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cafa7f582c3ea81edf33744783455ef637b70bb3e0ad13a4a1f069156713234
MD5 a7672f858d30b773f9b472cc091c0410
BLAKE2b-256 e40f2cc1e2b6bc15bc7b99b109114fe6a910bf2bceddaf264cbd8410907d97b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page