Google Java Agent Development Kit Adds LangChain4j Integration
Java Agent Development Kit 0.2.0: LangChain4j Integration Expands LLM Support
The Java Agent Development Kit (ADK) 0.2.0 release delivers a major upgrade by integrating the LangChain4j framework.
This significantly broadens support for all LLMs compatible with LangChain4j, enabling Java developers to work with a much wider range of AI models.
---
Previous Limitations vs. New Capabilities
Before LangChain4j Integration
- Java ADK supported only:
- Google Gemini
- Anthropic Claude
In contrast, the Python ADK leveraged LiteLLM to support many more models.
Now, with LangChain4j
Java developers can access:
- OpenAI models
- Anthropic
- Mistral
- All models supported by Ollama or Docker Model Runner, such as:
- Gemma
- Qwen
- Phi
- and more...
---
Multi-Model Scenarios
Guillaume Laforge — Developer Relations Engineer at Google and LangChain4j contributor — led the integration effort.
LangChain4j enables developers to mix and match models in multi-agent setups via agent tools:
> You can select the optimal model for each task.
> For example:
> - Use an ultra-fast model for simple classification to handle request routing.
> - Use a more powerful model for heavy reasoning, such as the Gemini 2.5 Thinking model.
---
Example: Claude Main Agent with OpenAI Weather Tool
Scenario:
Main agent runs on Claude; a tool agent uses OpenAI to provide weather data.
Code:
LlmAgent agent = LlmAgent.builder()
.name("friendly-weather-app")
.description("Friend agent that knows about the weather")
.model(new LangChain4j(claudeModel, CLAUDE_3_7_SONNET_20250219))
.instruction("""
You are a friendly assistant. If asked about the weather forecast for a city,
you MUST call the `weather-agent` function.
""")
.tools(AgentTool.create(weatherAgent))
.build();
---
Additional Enhancements in ADK 0.2.0
Expanded Tooling
- FunctionTools creation from object instances
- Asynchronous tool operations for better concurrency
Improved Agent Control
- More granular programming control over agent execution
- Stronger agent logic and memory handling with:
- Callback chains
- New memory management primitives for flexible data storage, retrieval, and processing
---
Getting Started
The Java ADK is still in its early stages but part of the larger Agent Development Kit launched earlier this year.
To explore:
- Follow the Getting Started Guide
- Fork Guillaume Laforge’s template project on GitHub
---
Broader Ecosystem Impact
LangChain4j integration joins a growing ecosystem of tools that connect advanced AI workflows across platforms.
Example: AiToEarn官网
An open-source global AI content monetization platform where creators can:
- Generate AI-driven content
- Publish across multiple social/media platforms
- Automate publishing processes
- Access analytics and rankings
This interconnected tooling is making cross-platform AI creativity and monetization more efficient than ever.
---
Original article: https://www.infoq.com/news/2025/09/goodle-adk-langchain4j/