langchain4j-ai-services-patterns

Installation
Summary

Type-safe AI services in Java using interface-based patterns, annotations, and declarative configuration.

  • Define AI capabilities as plain Java interfaces with @SystemMessage and @UserMessage annotations, eliminating manual prompt construction and response parsing
  • Built-in memory management for multi-turn conversations with per-user or per-session isolation using @MemoryId and configurable chat memory providers
  • Tool integration enables AI services to call external functions and execute code through @Tool annotations on methods
  • Supports structured output extraction, streaming responses, RAG patterns, and multi-agent systems with specialized personas and behaviors
SKILL.md

LangChain4j AI Services Patterns

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.

Overview

LangChain4j AI Services define AI functionality using Java interfaces with annotations, providing type-safe, declarative AI with minimal boilerplate.

When to Use

Use this skill when:

  • Building declarative AI services with minimal boilerplate using Java interfaces
  • Creating type-safe conversational AI with memory management
  • Implementing AI agents with function/tool calling capabilities
  • Designing AI services returning structured data (enums, POJOs, lists)
  • Integrating RAG patterns declaratively

Instructions

Related skills

More from giuseppe-trisciuoglio/developer-kit

Installs
865
GitHub Stars
246
First Seen
Feb 3, 2026