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
A productivity startup is building an AI assistant that handles three types of user requests: email drafting, calendar scheduling, and general web research. Rather than building one monolithic agent that does everything, the team wants an intelligent routing architecture where a coordinator agent decides which specialist to invoke for each incoming request. The system should collect outputs from all relevant specialists and produce a combined summary for the user.
The team also needs the system to support a review loop: for email drafting specifically, a drafting agent and a reviewing agent should iterate until the draft is approved (up to 3 rounds). Agents must be able to pass data to each other during the workflow.
Since this is an architecture prototype, stub implementations for the actual agent logic are fine — the important thing is that the correct workflow structure, shared state usage, and dependency setup are in place.
Produce a Maven Java project with:
pom.xml — with all required dependenciessrc/main/java/assistant/agents/ — individual agent interfaces (EmailDraftAgent, CalendarAgent, ResearchAgent, or similar)src/main/java/assistant/workflow/WorkflowDemo.java — demonstrates:
architecture.md — a short document explaining the workflow design, which builder methods were used, and why each workflow type was chosen