Go to file
github-actions[bot] c06ebd9a65 Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
.devcontainer Update Dev Container support (#5489) 2026-06-19 10:14:43 +02:00
.github CI improvements 2026-07-06 11:49:06 +02:00
.idea FIX BUILD: Fix code coverage and some improvements (#2010) 2024-10-31 16:34:05 +01:00
.mvn chore(deps): update dependency maven to v3.9.15 (#4548) 2026-05-12 16:44:18 +02:00
code-execution-engines Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
docs Allow json deserialization of the AgenticScope only for known and registered classes (#5872) 2026-07-29 16:47:12 +02:00
document-loaders Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
document-parsers Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
document-transformers/langchain4j-document-transformer-jsoup Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
embedding-store-filter-parsers/langchain4j-embedding-store-filter-parser-sql Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
embeddings Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
experimental Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
http-clients Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
integration-tests Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
internal Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-agentic Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-agentic-a2a Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-agentic-mcp Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-agentic-patterns Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-anthropic Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-azure-ai-search Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-azure-cosmos-mongo-vcore Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-azure-cosmos-nosql Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-azure-open-ai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-bedrock Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-bom Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-cassandra Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-chroma Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-cohere Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-coherence Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-core Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-couchbase Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-easy-rag Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-elasticsearch Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-github-models Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-google-ai-gemini Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-google-genai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-gpu-llama3 Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-guardrails Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-hibernate Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-http-client Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-hugging-face Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-infinispan Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-jina Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-jlama Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-kotlin Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-local-ai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-mariadb Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-mcp Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-mcp-docker Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-micrometer-metrics Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-milvus Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-mistral-ai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-mongodb-atlas Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-nomic Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-observation Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-ollama Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-onnx-scoring Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-open-ai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-open-ai-official Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-opensearch Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-oracle Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-ovh-ai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-parent Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-pgvector Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-pinecone Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-qdrant Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-skills Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-tablestore Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-test Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-vertex-ai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-vertex-ai-anthropic Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-vertex-ai-gemini Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-vespa Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-voyage-ai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-watsonx Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-weaviate Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
langchain4j-workers-ai Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00:00
web-search-engines Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00: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 feat(google-genai): introduce batch processing, grounding metadata, and image labels (#5255) 2026-06-05 16:20:37 +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 EmbeddingModel: request/response API with per-call parameters, multimodal inputs, and observability (#5735) 2026-07-09 22:09:34 +02:00
LICENSE Initial commit 2023-06-20 17:30:29 +02:00
LOGO_LICENSE.md add logos and logo license (#3739) 2025-09-26 16:23:38 +02:00
Makefile Fix spotless plugin run on CI and in Makefile (#3127) 2025-06-03 09:36:47 +02:00
README.md doc: clarified relationship to Python LangChain 2026-04-17 10:24:57 +02:00
SECURITY.md Fix https://github.com/langchain4j/langchain4j/issues/4176 2025-12-04 12:13:51 +01: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.4 (#5169) 2026-05-12 12:19:20 +02:00
mvnw.cmd chore(deps): update dependency maven-wrapper to v3.3.4 (#5169) 2026-05-12 12:19:20 +02:00
pom.xml Release versions 1.18.1 and 1.18.1-beta28 2026-07-29 16:36:14 +00: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

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.