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 small e-commerce company wants to add an AI-powered customer support assistant to their existing backend platform. Their backend runs on Quarkus and the team has been asked to expose a new REST endpoint (POST /support/chat) that accepts a plain-text customer message and returns a plain-text response from an AI assistant.
The AI assistant should be set up as a dedicated service component with a system persona that frames it as a helpful customer support agent. The team has settled on Anthropic's Claude as the model provider. The application should be structured following Quarkus CDI conventions so the AI service can be reused across the application later.
Produce a complete, compilable Maven project with the following files:
pom.xml — Maven project descriptor with all required dependenciessrc/main/java/.../SupportAiService.java — the AI service interfacesrc/main/java/.../SupportResource.java — the REST endpoint classsrc/main/resources/application.properties — model provider configurationThe package name and group/artifact IDs are your choice. The project should be ready to run with mvn quarkus:dev after an API key is provided.
Write a brief SETUP.md explaining how to start the application in development mode and where the Dev UI can be accessed.