Go to file
NeatGuyCoding faeac9e061
fix memory leak in load() of PlaywrightDocumentLoader (#3327)
2025-07-09 20:17:34 +03:00
.devcontainer Add Dev Container support (#337) 2023-12-12 19:36:45 +01:00
.github Update mikepenz/action-junit-report action to v5 (#3318) 2025-07-07 00:30:08 +03: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.10 (#3314) 2025-07-06 17:07:24 +03:00
code-execution-engines Updated to the next development version 2025-06-18 19:36:52 +02:00
docs add http1.1 for LMStudio in docs (#3324) 2025-07-09 15:25:09 +02:00
document-loaders fix memory leak in load() of PlaywrightDocumentLoader (#3327) 2025-07-09 20:17:34 +03:00
document-parsers Updated to the next development version 2025-06-18 19:36:52 +02:00
document-transformers/langchain4j-document-transformer-jsoup Updated to the next development version 2025-06-18 19:36:52 +02:00
embedding-store-filter-parsers/langchain4j-embedding-store-filter-parser-sql Updated to the next development version 2025-06-18 19:36:52 +02:00
experimental/langchain4j-experimental-sql Updated to the next development version 2025-06-18 19:36:52 +02:00
http-clients/langchain4j-http-client-jdk Updated to the next development version 2025-06-18 19:36:52 +02:00
integration-tests Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j Improve JSON extraction from LLM response (#3268) 2025-07-03 11:52:45 +02:00
langchain4j-anthropic Parametrize `baseUrl` for GoogleAi Gemini models. (#3272) 2025-07-04 09:51:35 +02:00
langchain4j-azure-ai-search Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-azure-cosmos-mongo-vcore Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-azure-cosmos-nosql Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-azure-open-ai Refactor Azure OpenAI tests to address flackiness (#3280) 2025-07-03 12:30:20 +02:00
langchain4j-bedrock Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-bom feat: Playwright Support (#3282) 2025-07-07 14:57:46 +02:00
langchain4j-cassandra Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-chroma Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-cohere Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-coherence Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-core slight IT improvements 2025-07-09 11:32:16 +02:00
langchain4j-couchbase Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-easy-rag Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-elasticsearch Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-github-models Refactor Azure OpenAI tests to address flackiness (#3280) 2025-07-03 12:27:42 +02:00
langchain4j-google-ai-gemini Parametrize `baseUrl` for GoogleAi Gemini models. (#3272) 2025-07-04 09:51:35 +02:00
langchain4j-http-client slight IT improvements 2025-07-09 11:32:16 +02:00
langchain4j-hugging-face Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-infinispan Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-jina Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-jlama Update jlama.version to v0.8.4 (#3048) 2025-07-06 19:56:11 +03:00
langchain4j-kotlin Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-local-ai Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-mariadb Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-mcp MCP: roots support (#3283) 2025-07-02 14:14:52 +02:00
langchain4j-milvus Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-mistral-ai fixed failing ITs 2025-07-01 09:04:28 +02:00
langchain4j-mongodb-atlas Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-nomic Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-ollama Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-onnx-scoring Update ai.djl.version to v0.33.0 (#3049) 2025-07-06 18:01:30 +03:00
langchain4j-open-ai OpenAI: allow setting custom chat request parameters and access raw HTTP responses and SSE events (#2694) 2025-07-08 11:44:33 +02:00
langchain4j-open-ai-official Remove the need for Azure dependencies at compile time (#3287) 2025-07-02 12:12:07 +02:00
langchain4j-opensearch Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-oracle Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-ovh-ai Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-parent feat: Playwright Support (#3282) 2025-07-07 14:57:46 +02:00
langchain4j-pgvector Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-pinecone Update dependency com.google.protobuf:protobuf-java-util to v3.25.8 (#3313) 2025-07-06 18:59:32 +03:00
langchain4j-qdrant Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-tablestore Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
langchain4j-test Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-vertex-ai Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-vertex-ai-gemini Parametrize `baseUrl` for GoogleAi Gemini models. (#3272) 2025-07-04 09:51:35 +02:00
langchain4j-vespa Reorder parameters in VespaEmbeddingStore (#3301) 2025-07-06 20:10:18 +03:00
langchain4j-voyage-ai Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-weaviate Updated to the next development version 2025-06-18 19:36:52 +02:00
langchain4j-workers-ai Use isNullOrEmpty and isNullOrBlank functions from Utils class (#3071) 2025-07-01 09:33:33 +02:00
web-search-engines Relaxed Tavily IT assertions 2025-07-07 12:39:53 +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 Update CONTRIBUTING.md to mention spotless (#3230) 2025-06-18 15:05:39 +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 feat: Playwright Support (#3282) 2025-07-07 14:57:46 +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.