/evaluate-spring-ai-alibaba:evaluate-spring-ai-alibabafrom evaluate-spring-ai-alibaba
Sets up Dokimos evaluation for Spring AI Alibaba graph agents, extracting traces from OverAllState and running tool-call validity/correctness evaluators.
Ships in evaluate-spring-ai-alibaba. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Set up Dokimos evaluation for a Spring AI Alibaba graph agent. The user will describe their agent and evaluation goals via $ARGUMENTS.
dokimos-spring-ai-alibaba/src/main/java/dev/dokimos/springai/alibaba/SpringAiAlibabaSupport.javadev.dokimos:dokimos-spring-ai-alibaba (pulls in dokimos-spring-ai)Before writing code, read SpringAiAlibabaSupport.java. It reuses SpringAiSupport for the actual message-to-ToolCall extraction, so it stays thin.
A Spring AI Alibaba graph run carries its whole conversation as standard Spring AI message types (AssistantMessage, ToolResponseMessage) under the OverAllState key "messages". The support class folds that list into one AgentTrace, matching each tool call to its result with per-turn windowing (so a reused tool-call id across turns does not bind to the wrong result).
SpringAiAlibabaSupport.toAgentTrace(OverAllState) — fold a finished run's state into an AgentTrace.toAgentTrace(Optional<OverAllState>) — same, for CompiledGraph.invoke(...) which returns an Optional.toAgentTrace(ReactAgent, Map<String,Object> inputs, RunnableConfig) — the one-liner: run the agent's compiled graph with full fidelity and fold.toToolDefinitions(List<ToolCallback>) — map the tool callbacks the agent was built with to ToolDefinitions.Use getAndCompileGraph().invoke(...), not call(...): the latter is lossy and drops intermediate tool calls.
There is no asJudge or asyncTask here. Spring AI Alibaba runs on a standard Spring AI ChatModel, so use SpringAiSupport.asJudge(...) and SpringAiSupport.asyncTask(...) for those.
OverAllState state = agent.getAndCompileGraph().invoke(inputs, config).orElseThrow();
AgentTrace trace = SpringAiAlibabaSupport.toAgentTrace(state);
// or the one-liner:
AgentTrace trace = SpringAiAlibabaSupport.toAgentTrace(agent, inputs, config);
List<ToolDefinition> tools = SpringAiAlibabaSupport.toToolDefinitions(toolCallbacks);
EvalTestCase testCase = trace.toTestCase(userInput, tools);
var validity = ToolCallValidityEvaluator.builder().build().evaluate(testCase);
var correctness = ToolCorrectnessEvaluator.builder().build().evaluate(testCase);
Always construct evaluators with XEvaluator.builder()...build(); they have private constructors.
A captured ToolCall keeps its arguments as a Map and its result as the string the tool returned. Read them typed with call.argumentsAs(MyArgs.class) and, when the result is JSON, call.resultAs(MyResult.class) (or OutputType for generics).
<dependency>
<groupId>dev.dokimos</groupId>
<artifactId>dokimos-spring-ai-alibaba</artifactId>
<version>${dokimos.version}</version>
</dependency>
Spring AI Alibaba itself is a provided-scope dependency: the user brings their own version (com.alibaba.cloud.ai:spring-ai-alibaba-agent-framework, the 1.1.x line).
$ARGUMENTS what the graph agent does and which tools it callsgetAndCompileGraph().invoke(...) and fold the state into an AgentTraceEvalTestCase with trace.toTestCase(input, tools)evaluate-agent skillWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dokimos-dev/dokimos --plugin evaluate-spring-ai-alibabaOther plugins' skills for the same job