Install any skill in seconds. Free to start, no credit card required.
Get Started Free →giuseppe-trisciuoglio/langchain4j-ai-services-patterns
Provides patterns to build declarative AI Services with LangChain4j for LLM integration, chatbot development, AI agent implementation, and conversational AI in Java. Generates type-safe AI services using interface-based patterns, annotations, memory management, and tools integration.
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
1 fixed20 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
When configuring `AiServices.builder` for multi-user chat memory in LangChain4j, how should the chat memory provider be configured to limit memory to the last 10 messages per user session?
| Checked | Without skill | With skill |
|---|---|---|
| Configure chatMemoryProvider on the builder using MessageWindowChatMemory.withMaxMessages(10). | Missed | Passed |
The instructions your model reads when the skill loads.
This skill provides guidance for building declarative AI Services with LangChain4j using interface-based patterns, annotations for system and user messages, memory management, tools integration, and advanced AI application patterns that abstract away low-level LLM interactions.
LangChain4j AI Services define AI functionality using Java interfaces with annotations, providing type-safe, declarative AI with minimal boilerplate.
Use this skill when:
Follow these steps to create declarative AI Services with LangChain4j:
Create a Java interface with method signatures for AI interactions:
interface Assistant {
String chat(String userMessage);
}
Use @SystemMessage and @UserMessage annotations to define prompts:
interface CustomerSupportBot {
@SystemMessage("You are a helpful customer support agent for TechCorp")
String handleInquiry(String customerMessage);
test cases passed, vs 20 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.