Go to file
Dmytro Liubarskyi 005ffda6fc Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
.devcontainer Add Dev Container support (#337) 2023-12-12 19:36:45 +01:00
.github Add azure openai audio (#2110) 2025-08-28 11:02:09 +02:00
.idea FIX BUILD: Fix code coverage and some improvements (#2010) 2024-10-31 16:34:05 +01:00
.mvn Update dependency maven to v3.9.11 (#3428) 2025-07-28 18:44:56 +02:00
code-execution-engines Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
docs Anthropic: added the ability to turn off parallel tool calls and improved the toolChoice implementation (#3401) 2025-09-15 18:52:21 +02:00
document-loaders Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
document-parsers Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
document-transformers/langchain4j-document-transformer-jsoup Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
embedding-store-filter-parsers/langchain4j-embedding-store-filter-parser-sql Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
experimental/langchain4j-experimental-sql Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
http-clients/langchain4j-http-client-jdk Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
integration-tests Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-agentic Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-agentic-a2a Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-anthropic Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-azure-ai-search Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-azure-cosmos-mongo-vcore Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-azure-cosmos-nosql Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-azure-open-ai Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-bedrock Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-bom Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-cassandra Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-chroma Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-cohere Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-coherence Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-core Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-couchbase Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-easy-rag Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-elasticsearch Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-github-models Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-google-ai-gemini Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-http-client Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-hugging-face Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-infinispan Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-jina Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-jlama Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-kotlin Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-local-ai Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-mariadb Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-mcp Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-milvus Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-mistral-ai Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-mongodb-atlas Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-nomic Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-ollama Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-onnx-scoring Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-open-ai Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-open-ai-official Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-opensearch Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-oracle Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-ovh-ai Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-parent Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-pgvector Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-pinecone Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-qdrant Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-tablestore Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-test Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-vertex-ai Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-vertex-ai-gemini Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-vespa Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-voyage-ai Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-watsonx Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-weaviate Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
langchain4j-workers-ai Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
web-search-engines Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
.editorconfig Input and output guardrails (#2571) 2025-06-17 11:49:54 +02:00
.gitattributes Added in-process embedding models (#41) 2023-07-23 19:05:13 +02:00
.gitignore Added maven-flatten-plugin, cleaned up POMs (#2964) 2025-05-08 17:55:51 +02:00
.prettierrc OpenAI DALL·E support (#298) 2023-12-19 11:37:11 +01:00
CODE_OF_CONDUCT.md Create a Code of Conduct (#825) 2024-04-18 14:34:30 +02:00
CONTRIBUTING.md added requirements for common ITs (#3665) 2025-09-10 12:20:08 +02:00
LICENSE Initial commit 2023-06-20 17:30:29 +02:00
Makefile Fix spotless plugin run on CI and in Makefile (#3127) 2025-06-03 09:36:47 +02:00
README.md [DOC] Add links to Micronaut's LangChain4j integration (#3106) 2025-06-02 15:11:25 +02:00
SECURITY.md Create a security policy (#2904) 2025-04-22 15:09:57 +02:00
check-split-packages.sh Input and output guardrails (#2571) 2025-06-17 11:49:54 +02:00
detekt.yml #1897 Add Kotlin dependencies, plugins, and extensions (#2197) 2024-11-28 11:53:15 +01:00
mvnw chore(deps): update dependency maven-wrapper to v3.3.2 (#2232) 2024-12-04 10:39:17 +02:00
mvnw.cmd chore(deps): update dependency maven-wrapper to v3.3.2 (#2232) 2024-12-04 10:39:17 +02:00
pom.xml Updated versions to 1.5.1 and 1.5.1-beta11 2026-06-16 11:44:12 +02:00
renovate.json5 Run integration tests on PR and main only on JDK 21 (#3300) 2025-07-04 09:43:41 +02:00

README.md

LangChain for Java: Supercharge your Java application with the power of LLMs

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 15+ popular LLM providers and 15+ 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! Although "LangChain" is in our name, the project is a fusion of ideas and concepts from LangChain, Haystack, LlamaIndex, and the broader community, spiced up with a touch of our own innovation.

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.