Back to directory

LangChain4j

An idiomatic, open-source Java library for building LLM-powered applications on the JVM, with a unified API over more than 20 model providers and more than 30 vector stores.

LangChain4j

LangChain4j is an open-source Java library for building applications powered by large language models on the JVM. It offers a unified API over language-model providers, such as OpenAI and Google Vertex AI, and embedding stores, such as Pinecone and Milvus, so a project can switch between them without rewriting its own code, and currently supports more than 20 LLM providers and more than 30 embedding stores.

Its toolbox covers prompt templating, chat memory management and function calling, as well as higher-level patterns for agents and retrieval-augmented generation, with an interface and several ready-to-use implementations provided for each abstraction. Despite its name, it is not a Java port of the Python LangChain project: it is designed from the ground up around Java conventions such as type safety, plain objects, annotations, interfaces, dependency injection and fluent APIs, with first-class integration into frameworks including Quarkus, Spring Boot, Helidon and Micronaut, and its API and release cycle are independent of the Python project.

It began in early 2023 to fill a gap in Java tooling for large language models, and remains under active development.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.