Build AI agents with LangChain4j - basic agent, memory, tools/MCP, agentic workflows, guardrails, and observability
90
90%
Does it follow best practices?
Impact
90%
2.90xAverage score across 3 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent uses the langchain4j-agentic dependency correctly, applies the right AgenticServices builder methods for supervisor and loop workflows, configures loop termination properly, uses AgenticScope for shared state, and selects an appropriate SupervisorResponseStrategy.",
"type": "weighted_checklist",
"checklist": [
{
"name": "langchain4j-agentic dependency",
"description": "pom.xml includes dev.langchain4j:langchain4j-agentic as a dependency",
"max_score": 8
},
{
"name": "supervisorBuilder used",
"description": "Code uses AgenticServices.supervisorBuilder() to create the routing/coordinator agent",
"max_score": 10
},
{
"name": "loopBuilder used",
"description": "Code uses AgenticServices.loopBuilder() for the iterative draft/review workflow",
"max_score": 10
},
{
"name": "Loop maxIterations",
"description": "Loop workflow calls .maxIterations() to cap the number of iterations",
"max_score": 9
},
{
"name": "Loop exitCondition",
"description": "Loop workflow calls .exitCondition(scope -> ...) with a lambda that reads from scope",
"max_score": 9
},
{
"name": "AgenticScope writeState",
"description": "At least one agent calls scope.writeState() to persist a value to shared state",
"max_score": 9
},
{
"name": "AgenticScope readState",
"description": "At least one agent calls scope.readState() with a key and a default value",
"max_score": 9
},
{
"name": "responseStrategy set",
"description": "Supervisor agent sets .responseStrategy() to one of LAST, SUMMARY, or SCORED (not just left as default implicitly)",
"max_score": 8
},
{
"name": "subAgents registered",
"description": "Both supervisor and loop builders register sub-agents via .subAgents() call",
"max_score": 8
},
{
"name": "Architecture documented",
"description": "architecture.md mentions the builder types used (supervisorBuilder, loopBuilder) and the reasoning for the workflow choices",
"max_score": 10
},
{
"name": "AgenticServices import",
"description": "Code imports AgenticServices from dev.langchain4j.agentic package",
"max_score": 10
}
]
}