Skip to main content

Installation

AgentEval is distributed via Maven Central. The minimum requirement is Java 21.

Maven

Add the JUnit 5 integration module (the most common starting point):

<dependency>
<groupId>org.byteveda.agenteval</groupId>
<artifactId>agenteval-junit5</artifactId>
<version>0.2.0</version>
<scope>test</scope>
</dependency>

For LLM-as-judge metrics (AnswerRelevancy, Faithfulness, etc.), also add the judge module:

<dependency>
<groupId>org.byteveda.agenteval</groupId>
<artifactId>agenteval-judge</artifactId>
<version>0.2.0</version>
<scope>test</scope>
</dependency>

Bill of Materials

Use the BOM to manage versions across multiple modules:

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.byteveda.agenteval</groupId>
<artifactId>agenteval-bom</artifactId>
<version>0.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.byteveda.agenteval</groupId>
<artifactId>agenteval-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.byteveda.agenteval</groupId>
<artifactId>agenteval-judge</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

Gradle (Kotlin DSL)

dependencies {
testImplementation(platform("org.byteveda.agenteval:agenteval-bom:0.2.0"))
testImplementation("org.byteveda.agenteval:agenteval-junit5")
testImplementation("org.byteveda.agenteval:agenteval-judge")
}

Gradle (Groovy DSL)

dependencies {
testImplementation platform('org.byteveda.agenteval:agenteval-bom:0.2.0')
testImplementation 'org.byteveda.agenteval:agenteval-junit5'
testImplementation 'org.byteveda.agenteval:agenteval-judge'
}

Module Reference

ModulePurposeRequired
agenteval-coreTest case model, metric interfaces, scoring engineTransitive
agenteval-metricsAll built-in metric implementationsTransitive
agenteval-judgeLLM-as-judge engine and provider integrationsFor LLM metrics
agenteval-junit5JUnit 5 extension, annotations, assertion APIFor test-suite use
agenteval-datasetsDataset loading and managementOptional
agenteval-reportingConsole, XML, JSON, HTML reportsOptional
agenteval-embeddingsEmbedding model integrationsFor semantic metrics
agenteval-spring-aiSpring AI auto-captureOptional
agenteval-langchain4jLangChain4j auto-captureOptional
agenteval-langgraph4jLangGraph4j graph execution captureOptional
agenteval-mcpMCP tool call captureOptional
agenteval-redteamAdversarial testingOptional

Java Version

AgentEval requires Java 21+ and makes use of:

  • Records and sealed interfaces
  • Pattern matching
  • Virtual threads (for parallel evaluation)

API Keys

Set environment variables for your judge provider before running evaluations:

# OpenAI
export OPENAI_API_KEY=sk-...

# Anthropic
export ANTHROPIC_API_KEY=sk-ant-...

# Google
export GOOGLE_API_KEY=...

See Configuration for all options.