Add Interactions API support to adk-java
Description:
Interactions API ( https://blog.google/innovation-and-ai/technology/developers-tools/interactions-api/) provides a unified interface for interacting with Gemini models and agents with stateful multi-turn conversations and server-side history management.
This feature is already available in adk-python (since v1.21.0) but is currently missing in adk-java, creating a feature parity gap between the two SDKs.
Proposed Solution
Add support for the Interactions API in adk-java, similar to how it's implemented in adk-python with the use_interactions_api=True parameter in the Agent configuration.
Additional context
- https://blog.google/innovation-and-ai/technology/developers-tools/interactions-api/
- https://developers.googleblog.com/building-agents-with-the-adk-and-the-new-interactions-api/
- https://github.com/google/adk-python/tree/main/contributing/samples/interactions_api
Adding a note on dependencies:
Support for the Interactions API in adk-java depends on the availability of the Interactions API in the underlying java-genai SDK.
There is already an upstream feature request for this in java-genai, and I have opened a corresponding implementation PR:
- Feature request: https://github.com/googleapis/java-genai/issues/749
- Implementation PR: https://github.com/googleapis/java-genai/pull/792
Once this is available in java-genai, it will unblock adding Interactions API support in adk-java.
@hemasekhar-p
Update: I’ve completed an implementation of Interactions API support for adk-java and am currently testing it.
The implementation builds against the proposed java-genai support (googleapis/java-genai#792). I’ll proceed with opening a PR here shortly so the changes can be reviewed in parallel.
I also noticed the issue was recently labeled as an enhancement — please let me know if there are any roadmap considerations I should be aware of as I move forward.
Hi @prasadskarmarkar, Thank you for submitting this feature request. It’s currently under review by our team, and we will keep you posted on any updates. We appreciate your input!
@anFatum, Please have a look into it.