langchain4j/langchain4j

▲ 5 stars today★ 13,424⑂ 2,688

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

About langchain4j/langchain4j

langchain4j/langchain4j is an open-source project on GitHub, mainly written in Java. LangChain4j is an idiomatic, open-source Java library for building LLM-powered applications on the JVM. It currently holds 13,424 stars and 2,688 forks with 1,152 open issues, and was last pushed on 2026-11-19 (repository created 2023-06-20).

Project Overview

AI Homed tracks it on the Today's Trending board, currently at rank #82 with 5 new stars today.

GitHub Repository Details

Repository langchain4j/langchain4j · default branch main · size 45822 KB · watchers 118 · source: GitHub REST API and repository README

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.

GitHub Stars & Activity

13,424Stars
2,688Forks
1,152Open issues
JavaLanguage

GitHub Popularity

GitHub stars13,424
Forks2,688
Open issues1,152
Primary languageJava
LicenseApache-2.0
Stars gained today5
Created2023-06-20
Last pushed2026-11-19

Trending History

Daily boardrank #82 · ▲ 5 stars

Related AI Projects

1

kestra-io / kestra

Java★ 30,325⑂ 3,550▲ 11 stars
→
2

microsoft / copilot-sdk

Java★ 10,705⑂ 1,534▲ 4 stars
→
3

apache / seatunnel

Java★ 9,829⑂ 2,476▲ 6 stars
→
4

mattpocock / skills

Shell★ 331,272⑂ 27,830▲ 759 stars
→
5

obra / superpowers

Shell★ 324,910⑂ 28,822▲ 838 stars
→
6

affaan-m / ECC

JavaScript★ 309,467⑂ 45,523▲ 649 stars
→
7

anomalyco / opencode

TypeScript★ 228,782⑂ 31,108▲ 256 stars
→
8

firecrawl / firecrawl

TypeScript★ 207,735⑂ 10,859▲ 920 stars
→

More AI Rankings