Skip to main content
In traditional software engineering, CI/CD is the heartbeat of development. You wouldn’t deploy code without passing tests. However, applying this discipline to Intelligent Agents requires a fundamental paradigm shift, since Code is Deterministic (Logic) but Agents are Probabilistic (Behavior). We are moving from verifying syntax to evaluating cognition AgentScope’s Evaluation Module is designed to be the CI/CD pipeline for your Agents. It transforms the vague art of “prompt engineering” into a measurable engineering discipline, providing the infrastructure to quantify reliability, catch regressions, and validate performance before you ship. It serves three critical roles in your development lifecycle:

Capability

Can the agent solve the specific tasks (e.g., Coding, Math) it was designed for?

Stability

Does it perform consistently across multiple runs? (e.g., success rate over 10 trials)

Regression Detection

Does behavior change when you tweak the system prompt or switch from qwen2.5-max to qwen3-max?

Overview

To address the complexity of evaluating agents, AgentScope employs a framework decomposes the evaluation into several key components:
  • Benchmark is responsible for defining “Task” (what to evaluate) and “Metric” (how to judge it). It is the static standard against which agents are measured.
  • Solution acts as an Adapter Pattern. Since every Agent might have unique input schemas or memory structures, the framework cannot call them directly. The Solution module standardizes this interaction.
  • Evaluator orchestrates the workflow. It manages resources, concurrency, and persistence. It serves as the bridge connecting the Benchmark to the Solution.
AgentScope Evaluation Framework overview

The Evaluation Pipeline

Let’s build a complete “Math Capability Evaluation” pipeline to demonstrate how to use the AgentScope evaluation module.

Building Metric

In AgentScope, we use Metric to define how to grade. A Metric accepts a SolutionOutput (the agent’s answer) and returns a MetricResult.
AgentScope supports deeper analysis beyond simple correctness checks:
  • Trajectory Analysis: Use the trajectory field in SolutionOutput to evaluate the process (e.g., “Did the agent use the Calculator tool?”).
  • LLM-as-a-Judge: Implement MetricBase to use a stronger LLM (like Qwen3-Max) to score subjective qualities such as tone, helpfulness, or safety.

Constructing Benchmark

A Benchmark is not just a list of questions; it organizes multiple Tasks for systematic evaluation. Crucially, the Task is the self-contained unit of evaluation that carries all information and Metric for the agent to execute and evaluate (e.g., input/query and its ground truth)
AgentScope includes standard benchmarks like ACEBench, a comprehensive multi-domain evaluation framework for testing AI agents’ tool usage and collaboration capabilities across diverse real-world scenarios — test against industry standards immediately.

Adapting the Agent

The Solution is a function that acts as an Adapter. It takes a standardized Task as input and produces a standardized SolutionOutput. This isolation ensures that you can swap agents without changing the benchmark, or swap benchmarks without rewriting the agent. We need to define the logic for running agents and retrieving the execution result and trajectory in the Solution.

Running the Evaluator

Evaluators manage the evaluation process. They automatically iterate through tasks in the benchmark and feed each task into a solution-generation function.
AgentScope provides RayEvaluator, a drop-in replacement for GeneralEvaluator. It leverages the Ray framework to distribute tasks across available CPU/GPU workers, drastically reducing feedback time without requiring changes to your agent logic.An example using RayEvaluator with ACEBench multistep tasks is available in the GitHub repository.

Advanced Metrics: Integrating OpenJudge

While simple string matching (like the CheckEqual metric) works well for deterministic tasks, you can also implement MetricBase to use a stronger LLM to score subjective qualities such as tone, helpfulness, or safety, which are impossible to measure with simple code. To achieve this without building evaluation prompts from scratch, you can integrate OpenJudge. By connecting OpenJudge to AgentScope, you gain immediate access to 50+ battle-tested, professional-grade graders directly within the AgentScope MetricBase architecture.

Building OpenJudgeMetric

To make OpenJudge compatible with AgentScope, we create an adapter class. This class inherits from MetricBase and translates AgentScope’s SolutionOutput into the payload OpenJudge expects.

Constructing Benchmark with OpenJudge Graders

Since the Task is the self-contained unit of evaluation that carries all information and metrics for the agent to execute and evaluate, we need to define a Mapper when constructing it. The mapper tells the wrapper how to extract the query, response, and context from your specific task data to feed into the OpenJudge Grader.
Once defined, this QABenchmark can be run seamlessly using the exact same GeneralEvaluator or RayEvaluator shown in the pipeline overview, standardizing your subjective assessments without changing the orchestrator logic.
Explore 50+ available graders for immediate use from OpenJudge Built-in Graders.