LangChain4j is an open-source Java library that simplifies the integration of LLMs into Java applications through a unified API, providing access to popular LLMs and vector databases. It makes implementing RAG, tool calling (including support for MCP), and agents easy. LangChain4j integrates seamlessly with various enterprise Java frameworks.
Agentic: support streaming by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4350
Agentic: support multimodality by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4436
Bedrock: support Guardrails by @jonathannaguin in https://github.com/langchain4j/langchain4j/pull/3988
Elasticsearch: hybrid search implementation by @l-trotta in https://github.com/langchain4j/langchain4j/pull/4069
Gemini: support Nano Banana and Nano Banana Pro by @Bram-- in https://github.com/langchain4j/langchain4j/pull/4380
Gemini: support Google Search tool (Issue #4453) by @mohankumar27 in https://github.com/langchain4j/langchain4j/pull/4456
MCP: Injecting context into header providers & support for listeners by @jmartisk in https://github.com/langchain4j/langchain4j/pull/4467
Mistral: support reasoning models by @dskarzh in https://github.com/langchain4j/langchain4j/pull/4474
Observability: allow to listen for tool executions in both AiServices and agents by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4368
Observability: add listeners for embedding model, embedding store and content retriever by @LucasGois1 in https://github.com/langchain4j/langchain4j/pull/4349
OpenAI: experimental Responses API support by @maxlepikhin in https://github.com/langchain4j/langchain4j/pull/3816
PgVector: hybrid search implementation by @YongGoose in https://github.com/langchain4j/langchain4j/pull/4288
Other Changes
docu: update versions to 1.10.0 and 1.10.0-beta18 by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/4284
Update versions to 1.11.0-SNAPSHOT and 1.11.0-beta19-SNAPSHOT by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/4285
[BUG] DefaultPromptTemplateFactory not took space brackets into consi… by @omarmahamid in https://github.com/langchain4j/langchain4j/pull/4291
Tool Should Support Empty Return String by @omarmahamid in https://github.com/langchain4j/langchain4j/pull/4301
JUnit 6 by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/4305
feat: InMemoryEmbeddingStore add size() and isEmpty() by @wangxuanni in https://github.com/langchain4j/langchain4j/pull/4289
[feature] ChatMemory always keep system message on index 0 by @mr-cloud in https://github.com/langchain4j/langchain4j/pull/4304
isNullOrBlank check on wrong field Type by @omarmahamid in https://github.com/langchain4j/langchain4j/pull/4319
fix typo method on AiServiceTokenStreamParameters by @omarmahamid in https://github.com/langchain4j/langchain4j/pull/4321
Method has poor performance InMemoryEmbeddingStore by @omarmahamid in https://github.com/langchain4j/langchain4j/pull/4323
[BUG] Azure ACADS documentation missing Examples section and broken link in code by @thswlsqls in https://github.com/langchain4j/langchain4j/pull/4325
[BUG] Azure and GCS document loaders do not skip failed documents in loadDocuments() by @thswlsqls in https://github.com/langchain4j/langchain4j/pull/4327
fix(workers-ai): fix deserialization error due to missing fields by @jujn in https://github.com/langchain4j/langchain4j/pull/4336
[BUG] Missing interrupt status restoration in InterruptedException handlers by @thswlsqls in https://github.com/langchain4j/langchain4j/pull/4340
[BUG] Missing interrupt status restoration in InterruptedException handlers #2 by @thswlsqls in https://github.com/langchain4j/langchain4j/pull/4342
[BUG] AnthropicChatModelBuilder.toolChoiceName() does not assign parameter to field by @thswlsqls in https://github.com/langchain4j/langchain4j/pull/4346
Gemini 3 thinking level configuration by @omarmahamid in https://github.com/langchain4j/langchain4j/pull/4357
Fix float bound check in tool by @omarmahamid in https://github.com/langchain4j/langchain4j/pull/4356
[DOCS] Add OceanBase embedding store documentation by @xxsc0529 in https://github.com/langchain4j/langchain4j/pull/4359
[BUG] 4250 - set media resolution in gemini generate content request by @partarstu in https://github.com/langchain4j/langchain4j/pull/4337
[BUG] DefaultAiServices creates new ExecutorService per instance causing resource leak by @thswlsqls in https://github.com/langchain4j/langchain4j/pull/4344
feat: Add onPartialToolCall callbacks to TokenStream by @adrianolaselva in https://github.com/langchain4j/langchain4j/pull/4292
New Contributors
@mr-cloud made their first contribution in https://github.com/langchain4j/langchain4j/pull/4304
@thswlsqls made their first contribution in https://github.com/langchain4j/langchain4j/pull/4325
@xxsc0529 made their first contribution in https://github.com/langchain4j/langchain4j/pull/4359
@partarstu made their first contribution in https://github.com/langchain4j/langchain4j/pull/4337
@qicesun made their first contribution in https://github.com/langchain4j/langchain4j/pull/4371
@ghtjr410 made their first contribution in https://github.com/langchain4j/langchain4j/pull/4390
@nitinramvelraj made their first contribution in https://github.com/langchain4j/langchain4j/pull/4374
@TylerBarkley made their first contribution in https://github.com/langchain4j/langchain4j/pull/4376
@csbiy made their first contribution in https://github.com/langchain4j/langchain4j/pull/4406
@ss-bhatt made their first contribution in https://github.com/langchain4j/langchain4j/pull/4421
@musketyr made their first contribution in https://github.com/langchain4j/langchain4j/pull/4422
@sumeetmehra-dev made their first contribution in https://github.com/langchain4j/langchain4j/pull/4409
@chirino made their first contribution in https://github.com/langchain4j/langchain4j/pull/4416
@mohankumar27 made their first contribution in https://github.com/langchain4j/langchain4j/pull/4456
@isergeymd made their first contribution in https://github.com/langchain4j/langchain4j/pull/4480
@l-trotta made their first contribution in https://github.com/langchain4j/langchain4j/pull/4069
@zzarbttoo made their first contribution in https://github.com/langchain4j/langchain4j/pull/4404
@farzad-sedaghatbin made their first contribution in https://github.com/langchain4j/langchain4j/pull/4486
@hetvi3012 made their first contribution in https://github.com/langchain4j/langchain4j/pull/4487
@abhishek9773 made their first contribution in https://github.com/langchain4j/langchain4j/pull/4468
@karanb192 made their first contribution in https://github.com/langchain4j/langchain4j/pull/4277
@chq562656437 made their first contribution in https://github.com/langchain4j/langchain4j/pull/4530
@HostedDinner made their first contribution in https://github.com/langchain4j/langchain4j/pull/4405
@techoc made their first contribution in https://github.com/langchain4j/langchain4j/pull/4410
@hadalin made their first contribution in https://github.com/langchain4j/langchain4j/pull/4532
Full Changelog: https://github.com/langchain4j/langchain4j/compare/1.10.0...1.11.0
Upgrade to OpenAi Java SDK v4.13.0 by @jdubois in https://github.com/langchain4j/langchain4j/pull/4367
Disallows json deserialization of AgenticScope containing non-final cl… by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4377
Avoid overwriting a structured state with an unstructured argument generated from supervisor's LLM response by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4381
docs: Support Spring Boot 3.5 by @ThomasVitale in https://github.com/langchain4j/langchain4j/pull/4384
refactor(mcp): extract protocol types and shared stdio JSON-RPC IO handler by @qicesun in https://github.com/langchain4j/langchain4j/pull/4371
Fix registration of subagents in conditional pattern when using the declarative API by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4387
Add support for AiServiceRequestIssuedEvent and corresponding listener functionality by @edeandrea in https://github.com/langchain4j/langchain4j/pull/4386
Add omni-moderation models to OpenAiModerationModelName by @ghtjr410 in https://github.com/langchain4j/langchain4j/pull/4390
Introduce langchain4j.http.clientBuilderFactory system property by @geoand in https://github.com/langchain4j/langchain4j/pull/4397
update prompt caching availability docs by @nitinramvelraj in https://github.com/langchain4j/langchain4j/pull/4374
[BUG] Remove duplicate tool description in Bedrock API requests (#4035) by @TylerBarkley in https://github.com/langchain4j/langchain4j/pull/4376
[BUG] 4299 - Make BatchResponse#operations nullable and handle it. by @Bram-- in https://github.com/langchain4j/langchain4j/pull/4382
Add nano banana documentation by @Bram-- in https://github.com/langchain4j/langchain4j/pull/4395
Feat: Use streaming I/O for JSON serialization in InMemoryEmbeddingStore by @wangxuanni in https://github.com/langchain4j/langchain4j/pull/4401
fix handling of multimodal Content parameters in AiServices by @jujn in https://github.com/langchain4j/langchain4j/pull/4353
Add Supplier support for customHeaders in OpenAI models by @ghtjr410 in https://github.com/langchain4j/langchain4j/pull/4403
Using the local AWS region instead of cross region inferences to have… by @jonathannaguin in https://github.com/langchain4j/langchain4j/pull/4412
fix: handle empty embeddings in OnnxBertBiEncoder by @csbiy in https://github.com/langchain4j/langchain4j/pull/4406
#4413 - PGVector does not escape values in an IN (notIn) filter by @odelpozo-denodo in https://github.com/langchain4j/langchain4j/pull/4414
[DOCS] Add Amazon S3 Vectors embedding store documentation by @ss-bhatt in https://github.com/langchain4j/langchain4j/pull/4421
Add Supplier support for customHeaders in Ollama models by @ghtjr410 in https://github.com/langchain4j/langchain4j/pull/4419
Avoid unnecessary connection creation for PGVector store by @musketyr in https://github.com/langchain4j/langchain4j/pull/4422
Allow to optionally add a description to lambda predicates in loop and conditional agentic workflows by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4425
docs: add complete RAG example to pgvector documentation by @sumeetmehra-dev in https://github.com/langchain4j/langchain4j/pull/4409
Remove api key validation from Google AI Gemini by @geoand in https://github.com/langchain4j/langchain4j/pull/4429
[BUG] 4250 - integration tests fix by @partarstu in https://github.com/langchain4j/langchain4j/pull/4389
feat: add ChatMemory.set method by @chirino in https://github.com/langchain4j/langchain4j/pull/4416
Allow describing lambda predicates in agentic declarative API by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4433
Add system message into metadata, revert #4126 by @YSZhuoyang in https://github.com/langchain4j/langchain4j/pull/4431
Support OpenSearch store removal and metadata filtering by @musketyr in https://github.com/langchain4j/langchain4j/pull/4430
Invoke the agentic workflow SPI also when using the declarative API by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4445
Allows to define untyped agents dynamically without the need of an interface by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4462
Allows to use a StreamingChatModel for agents also through the declarative API by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4472
Update the MCP specification version to 2025-11-25 by @jmartisk in https://github.com/langchain4j/langchain4j/pull/4447
Improve agent name resolution in supervisor by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4494
Add Supplier support for customHeaders in Voyage models by @ghtjr410 in https://github.com/langchain4j/langchain4j/pull/4427
Support Gemini URL Context tool (Issue #4475) by @mohankumar27 in https://github.com/langchain4j/langchain4j/pull/4478
Add ModelCatalog support in watsonx.ai by @andreadimaio in https://github.com/langchain4j/langchain4j/pull/4477
[BUG] Fixes 'NPE when retreiving Gemini Batch API job results #4423' by @Bram-- in https://github.com/langchain4j/langchain4j/pull/4441
Minor fix for automatic image type cast by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4495
Missing interrupt status handling in RetryUtils (issue #4479) by @isergeymd in https://github.com/langchain4j/langchain4j/pull/4480
MCP: listeners error handling by @jmartisk in https://github.com/langchain4j/langchain4j/pull/4507
Allow to create LangChain4j contents from a path + agentic test for pdf ingestion by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4497
Make (some) Anthropic classes testable, add tests for DefaultAnthropicClient and add docs by @Bram-- in https://github.com/langchain4j/langchain4j/pull/4392
Disable multimodal agents flaky tests by @mariofusco in https://github.com/langchain4j/langchain4j/pull/4504
docs: clarify RAG as a tool with conditional retrieval by @zzarbttoo in https://github.com/langchain4j/langchain4j/pull/4404
MCP: Replace raw Thread() with ExecutorService in StdioMcpTransport by @farzad-sedaghatbin in https://github.com/langchain4j/langchain4j/pull/4486
feature(google-ai-gemini): add Google Maps Grounding tool support by @mohankumar27 in https://github.com/langchain4j/langchain4j/pull/4502
Fix Cosmos Mongo vCore for MongoDB driver 5.x by @SandraAhlgrimm in https://github.com/langchain4j/langchain4j/pull/4510
Exceptions during AiServiceEvents are eaten by @edeandrea in https://github.com/langchain4j/langchain4j/pull/4500
Update Playwright version to 1.57.0 by @vesense in https://github.com/langchain4j/langchain4j/pull/4448
Revert "MCP: Replace raw Thread() with ExecutorService in StdioMcpTransport" by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/4522
Some more MCP client fixes by @jmartisk in https://github.com/langchain4j/langchain4j/pull/4523
feat: add support for Google Search grounded image generation in Gemi… by @glaforge in https://github.com/langchain4j/langchain4j/pull/4512
docs(mcp): add Java stdio server guide (community MCP server) by @qicesun in https://github.com/langchain4j/langchain4j/pull/4518
feat(anthropic): add support for caching UserMessage by @hetvi3012 in https://github.com/langchain4j/langchain4j/pull/4487
fix: Avoid exception in HierarchicalDocumentSplitter when estimating size of blank strings by @jujn in https://github.com/langchain4j/langchain4j/pull/4440
feat: propagate isError from ToolExecutionResultMessage to Anthropic by @farzad-sedaghatbin in https://github.com/langchain4j/langchain4j/pull/4483
[BUG] FileSystemDocumentLoaderExtensions.loadDocuments() does not skip failed documents by @thswlsqls in https://github.com/langchain4j/langchain4j/pull/4348
fix: include enum values in List, Set, and array format instructions (#4464) by @abhishek9773 in https://github.com/langchain4j/langchain4j/pull/4468
Revert "[BUG] FileSystemDocumentLoaderExtensions.loadDocuments() does not skip failed documents" by @dliubarskyi in https://github.com/langchain4j/langchain4j/pull/4527
Per-part media resolution in Gemini by @partarstu in https://github.com/langchain4j/langchain4j/pull/4457
feat(bedrock): Add granular cache points support for system messages by @karanb192 in https://github.com/langchain4j/langchain4j/pull/4277
修复流式响应时,tool call id重复的问题 by @chq562656437 in https://github.com/langchain4j/langchain4j/pull/4530
MistralAi: return raw HTTP response and SSE events by @HostedDinner in https://github.com/langchain4j/langchain4j/pull/4405
Add Apache HttpClient5 implementation for HTTP client by @techoc in https://github.com/langchain4j/langchain4j/pull/4410
4432 - Added docs for Gemini Media Resolution by @partarstu in https://github.com/langchain4j/langchain4j/pull/4531
fix: handle illegal URI characters in web search engines by @hadalin in https://github.com/langchain4j/langchain4j/pull/4532
Migrate from Azure OpenAi to Microsoft Foundry by @jdubois in https://github.com/langchain4j/langchain4j/pull/4415