langchain4j/langchain4j

▲ 10 stars today★ 13,106⑂ 2,551

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,106 stars and 2,551 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

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

GitHub Repository Details

Repository langchain4j/langchain4j · default branch - · size 0 KB · watchers 0 · 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,106Stars
2,551Forks
0Open issues
JavaLanguage

GitHub Popularity

GitHub stars13,106
Forks2,551
Open issues0
Primary languageJava
License-
Stars gained today10
Created-
Last pushed-

Trending History

Daily boardrank #71 · ▲ 10 stars

Related AI Projects

1

alibaba / nacos

Java★ 33,372⑂ 13,293▲ 5 stars
2

apache / doris

Java★ 15,918⑂ 3,947▲ 11 stars
3

LaurieWired / GhidraMCP

Java★ 10,063⑂ 1,039▲ 21 stars
4

obra / superpowers

Shell★ 287,295⑂ 25,690▲ 522 stars
5

mattpocock / skills

Shell★ 263,045⑂ 22,188▲ 820 stars
6

ollama / ollama

Go★ 181,102⑂ 17,896▲ 140 stars
7

ggml-org / llama.cpp

C++★ 128,384⑂ 23,249▲ 128 stars
8

openai / codex

Rust★ 124,542⑂ 19,253▲ 314 stars

More AI Rankings