LangChain4j
Java library for LLM applications with unified provider APIs, tool calling, agents, and RAG support.
About
Java gets a first-class LLM toolkit in LangChain4j, an independent open source project that adapts ideas from LangChain and Haystack into idiomatic APIs for the JVM rather than a direct port of Python code. A unified abstraction covers popular model providers and vector stores, so swapping OpenAI for Anthropic, Gemini, or a local Ollama model means changing configuration, not rewriting logic, and the same applies across embedding stores. Higher-level building blocks include AiServices, which turns an annotated Java interface into a working LLM-backed service, plus tool calling with MCP support, agents, chat memory, structured outputs, and RAG utilities spanning document ingestion through retrieval. First-class Spring Boot and Quarkus integrations fit it into standard enterprise stacks. Licensed Apache-2.0 with no commercial tier, the project has grown to about 12,700 GitHub stars and a large contributor base, making it the default choice for teams adding LLM features, agents, or retrieval pipelines to existing Java services without leaving their ecosystem.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Category
- AI Frameworks & Libraries
- Price
- Free
- Platform
- Local/Desktop
- Difficulty
- Intermediate (3/5)
- License
- Apache-2.0
- Added
- Jul 29, 2026
Related Tools
Unified system for large-scale distributed training and inference.
Guidance language for controlling LLM generation with constraints, grammars, and JSON schemas.
Library for easily accessing and processing ML datasets.
JAX neural network library with PyTorch-like module system.
High-level deep learning API supporting JAX, TensorFlow, and PyTorch backends.
Gradient boosting library by Yandex with native categorical feature handling.