Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

langchain4j

> 数据库
Open source

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 v

12.8K stars0 likes0 views
WebsiteGitHub

About

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 v

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

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:

  • Examples in plain Java
  • Examples with Quarkus (uses quarkus-langchain4j dependency)
  • Example with Spring Boot
  • Examples with Helidon (uses io.helidon.integrations.langchain4j dependency)
  • Examples with Micronaut (uses micronaut-langchain4j dependency)

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.

Issues· 951 open

View all issuesOpen on GitHub
  • #6532

    [FEATURE] Update Apache Tika to version 4.0

    enhancementUpdated Sep 28, 2026
  • #6525

    [BUG] HierarchicalDocumentSplitter throws or emits an empty segment on a whitespace-only buffer

    Updated Sep 28, 2026
  • #2069

    Dependency Dashboard

    DependenciesUpdated Sep 28, 2026
  • #6529

    [BUG] `StreamableHttpMcpTransport` registers the client's reply to a server ping as a pending operation

    bugUpdated Sep 28, 2026
  • #6527

    [BUG] SupervisorPlanner NPE when the planning reply has no agentName

    Updated Sep 28, 2026
  • #6522

    [FEATURE] ReRankingContentAggregator: add minResults to guarantee a minimum number of results when minScore filters out everything

    enhancementUpdated Sep 26, 2026
  • #6520

    [BUG] HierarchicalDocumentSplitter emits empty segments for whitespace-only buffers

    Updated Sep 26, 2026
  • #1520

    [FEATURE] langchain cache feature

    enhancementP2P3Updated Sep 26, 2026
  • #6511

    WatsonxChatModel: thinking() returns null with openai/gpt-oss-120b

    Updated Sep 25, 2026
  • #6468

    Proposal: StructuredDecisionModel, an experimental abstraction for typed batch decisions

    Updated Sep 25, 2026

> Tags

Javaanthropicchatgptchromaembeddings

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库