Back to rankings

langchain4j/langchain4j

Javadocs.langchain4j.dev

LangChain4j is an idiomatic, open-source Java library for building LLM-powered applications on the JVM. It offers a unified API over popular LLM providers and vector stores, and makes implementing tool calling (including MCP support), agents and RAG easy. It integrates seamlessly with enterprise Java frameworks like Quarkus and Spring Boot.

huggingfacejavalangchainopenaichatgptgptllamamilvuspineconeonnxembeddingsvector-database
Star Growth
Stars
12.6k
Forks
2.4k
Weekly Growth
Issues
593
5k10k
Jun 2023Jun 2024Jul 2025Jul 2026
ArtifactsMavengit clone https://github.com/langchain4j/langchain4j.git
README

LangChain4j: idiomatic, open-source Java library for building LLM-powered applications on the JVM

Build Status Nightly Build CODACY

Discord BlueSky X Maven Version

Introduction

Welcome!

The goal of LangChain4j is to simplify integrating LLMs into Java applications.

Here's how:

  1. Unified APIs: LLM providers (like OpenAI or Google Vertex AI) and embedding (vector) stores (such as Pinecone or Milvus) use proprietary APIs. LangChain4j offers a unified API to avoid the need for learning and implementing specific APIs for each of them. To experiment with different LLMs or embedding stores, you can easily switch between them without the need to rewrite your code. LangChain4j currently supports 20+ popular LLM providers and 30+ embedding stores.
  2. Comprehensive Toolbox: Since early 2023, the community has been building numerous LLM-powered applications, identifying common abstractions, patterns, and techniques. LangChain4j has refined these into practical code. Our toolbox includes tools ranging from low-level prompt templating, chat memory management, and function calling to high-level patterns like Agents and RAG. For each abstraction, we provide an interface along with multiple ready-to-use implementations based on common techniques. Whether you're building a chatbot or developing a RAG with a complete pipeline from data ingestion to retrieval, LangChain4j offers a wide variety of options.
  3. Numerous Examples: These examples showcase how to begin creating various LLM-powered applications, providing inspiration and enabling you to start building quickly.

LangChain4j began development in early 2023 amid the ChatGPT hype. We noticed a lack of Java counterparts to the numerous Python and JavaScript LLM libraries and frameworks, and we had to fix that!

Despite the name, LangChain4j is not a Java port of LangChain (Python) — it is built for Java, not ported to it. It is an idiomatic Java library designed from the ground up around Java conventions: type safety, POJOs, annotations, interfaces, dependency injection, fluent APIs, and first-class integrations with Quarkus, Spring Boot, Helidon, and Micronaut. Its API, internals, and release cycle are independent of the Python LangChain project.

We actively monitor community developments, aiming to quickly incorporate new techniques and integrations, ensuring you stay up-to-date. The library is under active development. While some features are still being worked on, the core functionality is in place, allowing you to start building LLM-powered apps now!

Documentation

Documentation can be found here.

The documentation chatbot (experimental) can be found here.

Getting Started

Getting started guide can be found here.

Code Examples

Please see examples of how LangChain4j can be used in langchain4j-examples repo:

Useful Materials

Useful materials can be found here.

Get Help

Please use Discord or GitHub discussions to get help.

Request Features

Please let us know what features you need by opening an issue.

Contribute

Contribution guidelines can be found here.

Related repositories
huggingface/agents-course

This repository contains the Hugging Face Agents Course.

MDXApache License 2.0agentic-aiagents
30.3k2.2k
huggingface/datasets

🤗 The largest hub of ready-to-use datasets for AI models with fast, easy-to-use and efficient data manipulation tools

PythonPyPIApache License 2.0nlpdatasets
huggingface.co/docs/datasets
21.7k3.3k
speechbrain/speechbrain

A PyTorch-based Speech Toolkit

PythonPyPIApache License 2.0speech-recognitionspeech-toolkit
speechbrain.github.io
11.7k1.7k
Orchestra-Research/AI-Research-SKILLs

Comprehensive open-source library of AI research and engineering skills for any AI model. Package the skills and your claude code/codex/gemini agent will be an AI research agent with full horsepower. Maintained by Orchestra Research.

TeXMIT Licenseaiai-research
orchestra-research.com
10.9k804
huggingface/chat-ui

The open source codebase powering HuggingChat

TypeScriptnpmApache License 2.0chatgpthuggingface
huggingface.co/chat
10.8k1.7k
kyegomez/swarms

The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework. Website: https://swarms.ai

PythonPyPIApache License 2.0artificial-intelligencelangchain
docs.swarms.world
7k966
multimodal-art-projection/YuE

YuE: Open Full-song Music Generation Foundation Model, something similar to Suno.ai but open

PythonPyPIApache License 2.0foundation-modelsmusic-generation
map-yue.github.io
6.3k749
skorch-dev/skorch

A scikit-learn compatible neural network library that wraps PyTorch

Jupyter NotebookBSD 3-Clause "New" or "Revised" Licensescikit-learnpytorch
6.2k413
Andyyyy64/whichllm

Find the local LLM that actually runs and performs best on your hardware. Ranked by real, recency-aware benchmarks, not parameter count. One command, run it instantly.

PythonPyPIMIT Licenseaicli
5.9k315
Michael-A-Kuykendall/shimmy

⚡ Pure-Rust WebGPU inference engine — OpenAI-API compatible, GGUF native, runs on any GPU. No Python. No llama.cpp. Single binary.

Rustcrates.ioApache License 2.0llamallamacpp
5.7k545
baichuan-inc/Baichuan-7B

A large-scale 7B pretraining language model developed by BaiChuan-Inc.

PythonPyPIApache License 2.0artificial-intelligenceceval
huggingface.co/baichuan-inc/baichuan-7B
5.7k501
Eventual-Inc/Daft

High-performance data engine for AI and multimodal workloads. Process images, audio, video, and structured data at any scale

Rustcrates.ioApache License 2.0machine-learningpython
daft.ai
5.6k524