# LangChain4j

> Open-source Java library for building LLM-powered applications on the JVM with unified APIs for LLM providers and vector stores.

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.

## 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

## Integrations
OpenAI, Google Vertex AI, Pinecone, Milvus, Quarkus, Spring Boot, Helidon, Micronaut, Anthropic, Ollama, Gemini, Chroma, pgvector, Hugging Face

## Platforms
WEB, API, DEVELOPER_SDK

## Pricing
Open Source

## Version
1.22.0

## Links
- Website: https://docs.langchain4j.dev
- Documentation: https://docs.langchain4j.dev/intro
- Repository: https://github.com/langchain4j/langchain4j
- EveryDev.ai: https://www.everydev.ai/tools/langchain4j
