Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
8624d59
dev: Introduce initial AGENTS.md
vorburger Mar 3, 2026
82ef5ac
feat!: remove McpAsyncToolset constructors
tilgalas Mar 9, 2026
5e4eaa4
refactor: remove use of Optional params in Contents class
tilgalas Mar 9, 2026
1cb4d43
refactor: Move RemoteA2AAgent to agent package; remove EXPERIMENTAL a…
google-genai-bot Mar 9, 2026
5e1e1d4
feat!: Remove deprecated create method in ResponseProcessor
tilgalas Mar 9, 2026
a86ede0
feat!: remove deprecated url method in ComputerState.Builder
tilgalas Mar 9, 2026
143b656
feat: update return type for requestedToolConfirmations getter and se…
google-genai-bot Mar 9, 2026
973f887
feat: Fixing the spans produced by agent calls to have the right pare…
google-genai-bot Mar 9, 2026
3c8f488
feat: Fixing the spans produced by agent calls to have the right pare…
google-genai-bot Mar 10, 2026
305299f
refactor: remove the Optional param in VertexAiCodeExecutor method
tilgalas Mar 10, 2026
b71900f
refactor: Use Maybe instead of Single<Optional>
google-genai-bot Mar 10, 2026
d1d5539
feat: update return type for artifactDelta getter and setter to Map f…
google-genai-bot Mar 10, 2026
b8316b1
feat!: Remove Optional parameters in EventActions
tilgalas Mar 10, 2026
14ee28b
fix: Make sure that `InvocationContext.callbackContextData` remains t…
google-genai-bot Mar 10, 2026
d66c31d
refactor: Removing unnecessary PluginManager.runX() methods
google-genai-bot Mar 10, 2026
72c9804
refactor: suppress warnings for Optional param in LlmRequest.addInstr…
tilgalas Mar 10, 2026
aa0e06c
refactor: update ApiClient.createHttpClient Optional timeout param to…
tilgalas Mar 10, 2026
444e0f0
refactor: delete SessionJsonConverter.putIfEmpty method with Optional…
tilgalas Mar 10, 2026
b857f01
fix: Removing deprecated methods in Runner
google-genai-bot Mar 10, 2026
0d8e22d
fix: Removing deprecated methods in Runner
google-genai-bot Mar 10, 2026
20f863f
fix: Explicitly setting the otel parent spans in agents, llm flow and…
google-genai-bot Mar 11, 2026
c6fdb63
feat: update State constructors to accept general Map types
google-genai-bot Mar 11, 2026
e0d833b
feat!: update LoopAgent's maxIteration field and methods to be @Nulla…
tilgalas Mar 11, 2026
1a87114
refactor: Simplifying Tracing code
google-genai-bot Mar 11, 2026
bc38558
feat!: remove deprecated LoadArtifactsTool.loadArtifacts method
tilgalas Mar 11, 2026
0d6dd55
feat: add formatting to the RemoteA2A agent so it filters out the pre…
google-genai-bot Mar 11, 2026
d9d84ee
feat: Trigger traceCallLlm to set call_llm attributes before span ends
google-genai-bot Mar 11, 2026
9cef813
refactor: modify SessionUtils.toContent method to accept Nullable
tilgalas Mar 11, 2026
aabf15a
feat!: remove deprecated LlmAgent.canonicalTools method
tilgalas Mar 11, 2026
4864287
chore: Update actions/checkout to v6 in GitHub workflows
google-genai-bot Mar 12, 2026
bdfb7a7
feat: add multiple LLM responses to LLM recordings for conformance tests
google-genai-bot Mar 12, 2026
3f6504e
feat: update return type for stateDelta() to Map from ConcurrentMap
google-genai-bot Mar 12, 2026
32759f9
refactor: Replacing use of deprecated Runner constructor and Runner.r…
google-genai-bot Mar 12, 2026
be3b3f8
feat: remove executionId method that takes Optional param from CodeEx…
tilgalas Mar 12, 2026
9ce78d7
feat: Update converters for task and artifact events; add long runnin…
google-genai-bot Mar 12, 2026
41f5af0
fix: Removing deprecated InvocationContext methods
google-genai-bot Mar 12, 2026
f9d013b
refactor: update LoggingPlugin.formatContent to accept @Nullable inst…
tilgalas Mar 12, 2026
dc51aec
chore: update deprecation comment for setStateDelta
google-genai-bot Mar 13, 2026
5fd4c53
feat: replace Optional type of version in BaseArtifactService.loadArt…
tilgalas Mar 13, 2026
7cce374
chore: add explicit jackson-annotations dependency in core
tilgalas Mar 13, 2026
910d727
feat!: refactor ApiClient constructors hierarchy to remove Optional p…
tilgalas Mar 13, 2026
a47b651
chore: override new version to 0.9.0
tilgalas Mar 13, 2026
94e6715
chore(main): release 0.9.0
adk-java-releases-bot Mar 13, 2026
0d2c37c
feat: Introducing Tracing.withContext()
google-genai-bot Mar 13, 2026
0a06c77
Merge pull request #979 from google:release-please--branches--main
copybara-github Mar 13, 2026
743ee78
chore(main): release 0.9.1-SNAPSHOT
adk-java-releases-bot Mar 13, 2026
3c702b1
Merge pull request #1031 from google:release-please--branches--main
copybara-github Mar 13, 2026
b6356d2
chore: update mcp dependency version to 0.17.2
tilgalas Mar 16, 2026
7ebeb07
feat: init AGENTS.md file
google-genai-bot Mar 16, 2026
567fdf0
fix: fix null handling in runAsyncImpl
tilgalas Mar 16, 2026
b8cb7e2
feat: add type-safe runAsync methods to BaseTool
tilgalas Mar 16, 2026
d8ca834
Merge pull request #942 from google:vorburger-AGENTS.md
copybara-github Mar 16, 2026
fca43fb
fix: prevent ConcurrentModificationException when session events are …
google-genai-bot Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-commit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# Step 1: Check out the code
# This action checks out your repository under $GITHUB_WORKSPACE, so your workflow can access it.
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# We need to fetch all commits to accurately count them.
# '0' means fetch all history for all branches and tags.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
Expand Down
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
".": "0.8.0"
".": "0.9.0"
}

3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AGENTS.md

Validate changes by running `./mvnw test`.
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# Changelog

## [0.9.0](https://github.com/google/adk-java/compare/v0.8.0...v0.9.0) (2026-03-13)


### ⚠ BREAKING CHANGES

* refactor ApiClient constructors hierarchy to remove Optional parameters
* remove deprecated LlmAgent.canonicalTools method
* remove deprecated LoadArtifactsTool.loadArtifacts method
* update LoopAgent's maxIteration field and methods to be @Nullable instead of Optional
* Remove Optional parameters in EventActions
* remove deprecated url method in ComputerState.Builder
* Remove deprecated create method in ResponseProcessor
* remove McpAsyncToolset constructors
* use @Nullable fields in Event class
* remove methods with Optional params from VertexCredential.Builder

### Features

* add formatting to the RemoteA2A agent so it filters out the previous agent responses and updates the context of the function calls and responses ([0d6dd55](https://github.com/google/adk-java/commit/0d6dd55f4870007e79db23e21bd261879dbfba79))
* add multiple LLM responses to LLM recordings for conformance tests ([bdfb7a7](https://github.com/google/adk-java/commit/bdfb7a72188ce6e72c12c16c0abedb824b846160))
* add support for gemini models in VertexAiRagRetrieval ([924fb71](https://github.com/google/adk-java/commit/924fb7174855b46a58be43373c1a29284c47dfa8))
* Fixing the spans produced by agent calls to have the right parent spans ([3c8f488](https://github.com/google/adk-java/commit/3c8f4886f0e4c76abdbeb64a348bfccd5c16120e))
* Fixing the spans produced by agent calls to have the right parent spans ([973f887](https://github.com/google/adk-java/commit/973f88743cabebcd2e6e7a8d5f141142b596dbbb))
* refactor ApiClient constructors hierarchy to remove Optional parameters ([910d727](https://github.com/google/adk-java/commit/910d727f1981498151dea4cb91b9e5836f91e3ba))
* Remove deprecated create method in ResponseProcessor ([5e1e1d4](https://github.com/google/adk-java/commit/5e1e1d434fa1f3931af30194422800757de96cb6))
* remove deprecated LlmAgent.canonicalTools method ([aabf15a](https://github.com/google/adk-java/commit/aabf15a526ba525cdb47c74c246c178eff1851d5))
* remove deprecated LoadArtifactsTool.loadArtifacts method ([bc38558](https://github.com/google/adk-java/commit/bc385589057a6daf0209a335280bf19d20b2126b))
* remove deprecated url method in ComputerState.Builder ([a86ede0](https://github.com/google/adk-java/commit/a86ede007c3442ed73ee08a5c6ad0e2efa12998a))
* remove executionId method that takes Optional param from CodeExecutionUtils ([be3b3f8](https://github.com/google/adk-java/commit/be3b3f8360888ea1f13796969bb19893c32727e0))
* remove McpAsyncToolset constructors ([82ef5ac](https://github.com/google/adk-java/commit/82ef5ac2689e01676aa95d2616e3b4d8463e573e))
* remove methods with Optional params from VertexCredential.Builder ([0b9057c](https://github.com/google/adk-java/commit/0b9057c9ccab98ea58597ec55b8168e32ac7c9a6))
* Remove Optional parameters in EventActions ([b8316b1](https://github.com/google/adk-java/commit/b8316b1944ce17cc9208963cc09d900c379444c6))
* replace Optional type of version in BaseArtifactService.loadArtifact with Nullable ([5fd4c53](https://github.com/google/adk-java/commit/5fd4c53c88e977d004b9eee8fa3697625ec85f47))
* Trigger traceCallLlm to set call_llm attributes before span ends ([d9d84ee](https://github.com/google/adk-java/commit/d9d84ee67406cce8eeb66abcf1be24fad9c58e29))
* Update converters for task and artifact events; add long running tools ids ([9ce78d7](https://github.com/google/adk-java/commit/9ce78d7c3e1b0fb6d8d4fdce9052a572ffb9e515))
* update LoopAgent's maxIteration field and methods to be @Nullable instead of Optional ([e0d833b](https://github.com/google/adk-java/commit/e0d833b337e958e299d0d11a03f6bfa1468731bc))
* update return type for artifactDelta getter and setter to Map from ConcurrentMap ([d1d5539](https://github.com/google/adk-java/commit/d1d5539ef763b6bfd5057c6ea0f2591225a98535))
* update return type for requestedToolConfirmations getter and setter to Map from ConcurrentMap ([143b656](https://github.com/google/adk-java/commit/143b656949d61363d135e0b74ef5696e78eb270a))
* update return type for stateDelta() to Map from ConcurrentMap ([3f6504e](https://github.com/google/adk-java/commit/3f6504e9416f9f644ef431e612ec983b9a2edd9d))
* update State constructors to accept general Map types ([c6fdb63](https://github.com/google/adk-java/commit/c6fdb63c92e2f3481a01cfeafa946b6dce728c51))
* use @Nullable fields in Event class ([67b602f](https://github.com/google/adk-java/commit/67b602f245f564238ea22298a37bf70049e56a12))


### Bug Fixes

* Explicitly setting the otel parent spans in agents, llm flow and function calls ([20f863f](https://github.com/google/adk-java/commit/20f863f716f653979551c481d85d4e7fa56a35da))
* Make sure that `InvocationContext.callbackContextData` remains the same instance ([14ee28b](https://github.com/google/adk-java/commit/14ee28ba593a9f6f5f7b9bb6003441539fe33a18))
* Removing deprecated InvocationContext methods ([41f5af0](https://github.com/google/adk-java/commit/41f5af0dceb78501ca8b94e434e4d751f608a699))
* Removing deprecated methods in Runner ([0d8e22d](https://github.com/google/adk-java/commit/0d8e22d6e9fe4e8d29c87d485915ba51a22eb350))
* Removing deprecated methods in Runner ([b857f01](https://github.com/google/adk-java/commit/b857f010a0f51df0eb25ecdc364465ffdd9fef65))


### Miscellaneous Chores

* override new version to 0.9.0 ([a47b651](https://github.com/google/adk-java/commit/a47b651b5c4868a603fd79df164b70bc712c3a80))

## [0.8.0](https://github.com/google/adk-java/compare/v0.7.0...v0.8.0) (2026-03-06)


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ If you're using Maven, add the following to your dependencies:
<dependency>
<groupId>com.google.adk</groupId>
<artifactId>google-adk</artifactId>
<version>0.8.0</version>
<version>0.9.0</version>
</dependency>
<!-- Dev UI -->
<dependency>
<groupId>com.google.adk</groupId>
<artifactId>google-adk-dev</artifactId>
<version>0.8.0</version>
<version>0.9.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion a2a/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.google.adk</groupId>
<artifactId>google-adk-parent</artifactId>
<version>0.8.1-SNAPSHOT</version><!-- {x-version-update:google-adk:current} -->
<version>0.9.1-SNAPSHOT</version><!-- {x-version-update:google-adk:current} -->
</parent>

<artifactId>google-adk-a2a</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
package com.google.adk.a2a;
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.adk.a2a.agent;

import static com.google.common.base.Strings.nullToEmpty;

Expand Down Expand Up @@ -44,26 +59,21 @@
import org.slf4j.LoggerFactory;

/**
* Agent that communicates with a remote A2A agent via A2A client.
* Agent that communicates with a remote A2A agent via an A2A client.
*
* <p>This agent supports multiple ways to specify the remote agent:
* <p>The remote agent can be specified directly by providing an {@link AgentCard} to the builder,
* or it can be resolved automatically using the provided A2A client.
*
* <ol>
* <li>Direct AgentCard object
* <li>URL to agent card JSON
* <li>File path to agent card JSON
* </ol>
*
* <p>The agent handles:
* <p>Key responsibilities of this agent include:
*
* <ul>
* <li>Agent card resolution and validation
* <li>A2A message conversion and error handling
* <li>Session state management across requests
* <li>Converting ADK session history events into A2A requests ({@link io.a2a.spec.Message})
* <li>Handling streaming and non-streaming responses from the A2A client
* <li>Buffering and aggregating streamed response chunks into ADK {@link
* com.google.adk.events.Event}s
* <li>Converting A2A client responses back into ADK format
* </ul>
*
* <p>**EXPERIMENTAL:** Subject to change, rename, or removal in any future patch release. Do not
* use in production code.
*/
public class RemoteA2AAgent extends BaseAgent {

Expand Down Expand Up @@ -171,6 +181,25 @@ public RemoteA2AAgent build() {
}
}

private Message.Builder newA2AMessage(Message.Role role, List<io.a2a.spec.Part<?>> parts) {
return new Message.Builder().messageId(UUID.randomUUID().toString()).role(role).parts(parts);
}

private Message prepareMessage(InvocationContext invocationContext) {
Event userCall = EventConverter.findUserFunctionCall(invocationContext.session().events());
if (userCall != null) {
ImmutableList<io.a2a.spec.Part<?>> parts =
EventConverter.contentToParts(userCall.content(), userCall.partial().orElse(false));
return newA2AMessage(Message.Role.USER, parts)
.taskId(EventConverter.taskId(userCall))
.contextId(EventConverter.contextId(userCall))
.build();
}
return newA2AMessage(
Message.Role.USER, EventConverter.messagePartsFromContext(invocationContext))
.build();
}

@Override
protected Flowable<Event> runAsyncImpl(InvocationContext invocationContext) {
// Construct A2A Message from the last ADK event
Expand All @@ -181,14 +210,7 @@ protected Flowable<Event> runAsyncImpl(InvocationContext invocationContext) {
return Flowable.empty();
}

Optional<Message> a2aMessageOpt = EventConverter.convertEventsToA2AMessage(invocationContext);

if (a2aMessageOpt.isEmpty()) {
logger.warn("Failed to convert event to A2A message.");
return Flowable.empty();
}

Message originalMessage = a2aMessageOpt.get();
Message originalMessage = prepareMessage(invocationContext);
String requestJson = serializeMessageToJson(originalMessage);

return Flowable.create(
Expand Down
15 changes: 15 additions & 0 deletions a2a/src/main/java/com/google/adk/a2a/common/A2AClientError.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.adk.a2a.common;

/** Exception thrown when the A2A client encounters an error. */
Expand Down
15 changes: 15 additions & 0 deletions a2a/src/main/java/com/google/adk/a2a/common/A2AMetadata.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.adk.a2a.common;

/** Constants and utilities for A2A metadata keys. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.adk.a2a.common;

/** Exception thrown when the the genai class has an empty field. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.adk.a2a.converters;

/** Enum for the type of A2A DataPart metadata. */
Expand Down
Loading
Loading