LangChain4j
Open-source Java library for building LLM-powered applications on the JVM with unified APIs for LLM providers and vector stores.
At a Glance
LangChain4j is an open-source Java library licensed under Apache License 2.0, free to use, reproduce, modify and distribute.
Engagement
Available On
Alternatives
Listed Oct 2026
About LangChain4j
LangChain4j is an open-source Java library from the langchain4j organization that simplifies integrating large language models into Java applications. It offers a unified API over LLM providers and embedding stores, plus building blocks for tool calling, agents and RAG. The latest listed release is 1.22.0.
What It Is
LangChain4j is a library for developers building chatbots, assistants and other LLM-powered apps on the JVM. Despite the name, the README states it is not a Java port of LangChain (Python); it is designed around Java conventions such as type safety, POJOs, annotations, interfaces, dependency injection and fluent APIs. Its API, internals and release cycle are independent of the Python project.
Unified APIs and Toolbox
The README says LangChain4j supports 20+ LLM providers and 30+ embedding stores through one API, so teams can switch providers or stores without rewriting code. The toolbox covers low-level pieces such as prompt templating, chat memory management, function calling and output parsing, up to higher-level patterns like Agents and RAG with a pipeline from data ingestion to retrieval. For each abstraction it provides an interface along with several ready-to-use implementations. Tool calling includes MCP support.
Java Framework Integration
The project documents integrations with Quarkus, Spring Boot, Helidon and Micronaut. The docs describe two-way integration: Java code can call LLMs, and LLMs can call back into Java code. Example repositories cover plain Java, Quarkus, Spring Boot, Helidon and Micronaut.
Getting Started and Support
The docs site provides an introduction, a get-started guide, tutorials, integration pages, useful materials and Javadoc. An experimental documentation chatbot is available. Help is offered through Discord and GitHub discussions, and the code is licensed under Apache 2.0.
Community Discussions
Be the first to start a conversation about LangChain4j
Share your experience with LangChain4j, ask questions, or help others learn from your insights.
Pricing
Open Source (Apache-2.0)
LangChain4j is an open-source Java library licensed under Apache License 2.0, free to use, reproduce, modify and distribute.
- Apache License 2.0 (OSI-approved)
- Unified API over 20+ LLM providers and 30+ embedding stores
- Tool calling (including MCP support), agents and RAG
- Integrations with Quarkus, Spring Boot, Helidon and Micronaut
- Third-party LLM provider API costs (e.g. OpenAI API key) are external and not charged by LangChain4j
Capabilities
Key Features
- Unified API for 20+ LLM providers
- Unified API for 30+ embedding stores
- Prompt templating
- Chat memory management
- Function/tool calling with MCP support
- Agents
- RAG pipelines
- Output parsing
- Quarkus, Spring Boot, Helidon and Micronaut integrations
- Example applications
