Build Quarkus applications with LangChain4j extensions - project setup, CDI services, REST endpoints, MCP, agentic, and dev mode
91
90%
Does it follow best practices?
Impact
96%
1.71xAverage score across 3 eval scenarios
Advisory
Suggest reviewing before use
A market research firm wants to automate their analyst workflow in a Quarkus backend. Currently, analysts manually perform two steps for every research request: first they gather and summarize raw data from a topic, then they write an executive summary suitable for business stakeholders. These are distinct cognitive tasks — the summarization specialist works differently from the executive-writing specialist — so the team wants them modeled as separate, independently testable agents.
The two agents must run in sequence: the output of the data summarizer feeds directly into the executive writer as its input. A single REST endpoint (POST /research/report) accepts a research topic string and returns the final executive report. The overall pipeline should be implemented using Quarkus agentic workflow primitives so the orchestration logic is declarative and the individual agents remain focused on their own responsibilities.
Produce a complete Maven project with:
pom.xml — all required dependencies including the agentic extensionsrc/main/java/.../SummarizerAgent.java — agent interface for data summarizationsrc/main/java/.../WriterAgent.java — agent interface for executive writingsrc/main/java/.../ResearchPipeline.java — the orchestrating workflow component that composes the two agentssrc/main/java/.../ResearchResource.java — REST endpointsrc/main/resources/application.properties — model provider configurationWrite a ARCHITECTURE.md describing how data flows between the agents and how the final result is extracted from the workflow.