Expanding Capabilities: The Agent Development Kit for Java Version 0.2.0
The latest release of the Agent Development Kit for Java (ADK for Java), version 0.2.0, brings a wave of enhancements driven primarily by its integration with the LangChain4j LLM framework. This advancement significantly broadens the array of large language models (LLMs) developers can leverage, making it a pivotal update for Java enthusiasts aiming to explore cutting-edge AI capabilities.
Enhanced Model Support
Prior to integrating LangChain4j, the ADK for Java exclusively supported two models: Google Gemini and Anthropic Claude. This limited scope stood in stark contrast to the more comprehensive support offered by the Python version of the ADK via LiteLLM. With the recent upgrade, Java developers can now tap into a multitude of models such as OpenAI, Mistral, Anthropic, and others associated with Ollama or Docker Model Runner, including models like Gemma, Qwen, Phi, and beyond. This enhanced compatibility positions the ADK for Java as a formidable player in the growing landscape of AI development.
Multi-Agent Scenarios with LangChain4j
Guillaume Laforge, a developer relations engineer at Google and a key contributor to LangChain4j, highlights the innovative possibilities that arise from using this integration. One of the standout features is the ability to mix models in multi-agent environments, allowing developers to optimize performance by selecting the ideal model for various tasks.
“Mixing different models in a multi-agent scenario is quite interesting, as you can use the best model for the job,” explains Laforge. For instance, a lightweight model might be employed for speedy classification tasks, while a more sophisticated model, like Gemini 2.5, is reserved for tasks demanding deeper cognitive processing.
Implementing Multi-Agent Functionality
Laforge provides a straightforward example illustrating how to combine agents for functional outcomes. In this setup, you can instantiate a main agent powered by Claude and a tool agent that delivers weather information through OpenAI. Here’s a glimpse of how you can bring these agents together in code:
java
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();
This snippet showcases how intuitive it is to define agent behavior and responsibilities, setting the stage for efficient interactions between different models.
Additional Enhancements in ADK 0.2.0
Beyond the LangChain4j integration, the ADK 0.2.0 release introduces a slew of significant improvements aimed at optimizing both tooling capabilities and overall agent performance. Key upgrades include:
-
Support for FunctionTools: Developers can now create
FunctionToolsdirectly from object instances, adding more versatility to how functions can be executed within agents. -
Asynchronous Tool Operation: Enhanced support for asynchronous operations allows for smoother and faster interactions between tools and agents.
- Improved Control Mechanisms: The introduction of callback chaining and new memory management primitives grants developers finer control over how agents handle logic and memory, thus enhancing the flexibility of information storage and retrieval.
Getting Started with ADK for Java
Launched earlier this year as part of a broader vision for the Agent Development Kit, the ADK for Java continues to evolve rapidly, despite still being in its early stages. For developers eager to dive into the toolkit, comprehensive documentation is readily available through the getting started guide. Additionally, for those looking to explore practical implementations, Laforge’s template project on GitHub serves as a valuable resource.
As the landscape of AI and language models expands, the Agent Development Kit for Java stands as a potent tool for innovation, offering developers the flexibility and robust features needed to tackle diverse challenges.
Inspired by: Source

