Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bfebfbc
Upgrade GitHub Actions for Node 24 compatibility
salmanmkc Jan 23, 2026
5ea48cd
ISSUE-777: Ensure token usage metadata included with streaming responses
OwenDavisBC Feb 9, 2026
28a8cd0
chore!: remove deprecated Example processor
Mar 17, 2026
8556d4a
feat: Propagating the otel context
google-genai-bot Mar 17, 2026
2fcff3c
Extract timestamp as double for InMemorySessionService events
tlanclos Mar 4, 2026
4eb3613
fix: improve processRequest_concurrentReadAndWrite_noException test case
google-genai-bot Mar 17, 2026
c8ab0f9
feat: Implement basic version of BigQuery Agent Analytics Plugin
google-genai-bot Mar 17, 2026
551c31f
fix: include saveArtifact invocations in event chain
tilgalas Mar 18, 2026
e51f911
feat: add handling the a2a metadata in the RemoteA2AAgent; Add the en…
google-genai-bot Mar 18, 2026
8bc6b12
Merge pull request #956 from tlanclos:inmemss-timestamp-fix
copybara-github Mar 18, 2026
ca6a75d
Merge branch 'main' into upgrade-github-actions-node24
sherryfox Mar 18, 2026
0d1e5c7
feat: update stateDelta builder input to Map from ConcurrentMap
google-genai-bot Mar 18, 2026
de3b276
Remove ADK dependency for langchain4j module
Jan 12, 2026
296b2a2
Merge pull request #725 from gbrail:langchain-dependency
copybara-github Mar 18, 2026
3ba04d3
fix: workaround for the client config streaming settings are not resp…
google-genai-bot Mar 18, 2026
94de7f1
fix: Use ConcurrentHashMap in InvocationReplayState
tilgalas Mar 18, 2026
2c71ba1
feat: Enhance LangChain4j to support MCP tools with parametersJsonSchema
curefat Mar 18, 2026
ce610ff
Merge pull request #803 from curefat:patch-1
copybara-github Mar 18, 2026
fa67101
ADK changes
google-genai-bot Mar 18, 2026
8b6b344
Merge pull request #668 from salmanmkc:upgrade-github-actions-node24
copybara-github Mar 19, 2026
d7e03ee
fix: Relaxing constraints for output schema
google-genai-bot Mar 19, 2026
e534f12
refactor: Update map handling in EventActions to always use defensive…
google-genai-bot Mar 19, 2026
cd56902
feat: Update return type of toolsets() from ImmutableList to List
google-genai-bot Mar 19, 2026
9a08076
feat: fixing context propagation for agent transfers
google-genai-bot Mar 19, 2026
0af82e6
fix: Removing deprecated methods in Runner
google-genai-bot Mar 19, 2026
dc5d794
chore: set version to 1.0.0-rc.1
tilgalas Mar 19, 2026
dfbab95
Updated tests in Spring AI, Langchain4j, dependency for Spering AI an…
ddobrin Mar 17, 2026
55a4953
Merge pull request #1046 from ddobrin:spring-ai-update-20-M3
copybara-github Mar 19, 2026
dbb1394
feat!: remove McpToolset constructors taking Optional parameters
tilgalas Mar 19, 2026
897f9d9
chore: add test-jar goal in core sub-project
tilgalas Mar 19, 2026
b4c7005
Merge pull request #835 from OwenDavisBC:ISSUE-777
copybara-github Mar 19, 2026
4b9b99a
feat: update Session.state() and its builder to be of general Map types
google-genai-bot Mar 20, 2026
8ba4bfe
feat: Update return type of App.plugins() from ImmutableList to List
google-genai-bot Mar 20, 2026
bf5ca82
chore: update VersionTest to allow rc versions
tilgalas Mar 20, 2026
8af5e03
feat: Return List instead of ImmutableList in CallbackUtil methods
google-genai-bot Mar 20, 2026
f145c74
feat: update requestedAuthConfigs and its builder to be of general Ma…
google-genai-bot Mar 20, 2026
f59215d
chore(main): release 1.0.0-rc.1
adk-java-releases-bot Mar 20, 2026
4ab1a51
Merge pull request #1041 from google:release-please--branches--main
copybara-github Mar 20, 2026
f3eb936
fix: Using App conformant agent names
google-genai-bot Mar 20, 2026
8ea81f7
chore(main): release 1.0.1-rc.1-SNAPSHOT
adk-java-releases-bot Mar 20, 2026
40ca6a7
feat: enabling output_schema and tools to coexist
google-genai-bot Mar 20, 2026
7005670
refactor: migrate LangChain4j to builder pattern, enhance token usage…
glaforge Mar 20, 2026
750851b
Merge pull request #1069 from glaforge:main
copybara-github Mar 20, 2026
3633a7d
fix: Removing deprecated methods from Runner
google-genai-bot Mar 20, 2026
8e9fb08
refactor: Use concatMap for sequential event persistence in Runner
google-genai-bot Mar 20, 2026
3e21e7a
fix: handle null `AiMessage.text()` to prevent NPE and add unit test …
glaforge Mar 21, 2026
f869994
Merge pull request #1071 from glaforge:main
copybara-github Mar 21, 2026
cdc5199
fix: add schema validation to SetModelResponseTool (issue #587 alread…
glaforge Mar 23, 2026
ce18dd9
Merge pull request #1074 from glaforge:main
copybara-github Mar 23, 2026
e9df447
Remove explicit SLF4J binding from city-time-weather ADK tutorial.
vorburger Mar 23, 2026
a4359b8
Merge upstream/main from google/adk-java
Sandeep-BA Mar 23, 2026
5e9824f
Adapt fork code to upstream API after google/adk-java merge
Sandeep-BA Mar 23, 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
4 changes: 2 additions & 2 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
uses: actions/checkout@v6

- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.java-version }}

- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ matrix.java-version }}-${{ hashFiles('**/pom.xml') }}
Expand Down
3 changes: 1 addition & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
".": "0.9.0"
".": "1.0.0-rc.1"
}

43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## [1.0.0-rc.1](https://github.com/google/adk-java/compare/v0.9.0...v1.0.0-rc.1) (2026-03-20)


### ⚠ BREAKING CHANGES

* remove McpToolset constructors taking Optional parameters
* remove deprecated Example processor

### Features

* add handling the a2a metadata in the RemoteA2AAgent; Add the enum type for the metadata keys ([e51f911](https://github.com/google/adk-java/commit/e51f9112050955657da0dfc3aedc00f90ad739ec))
* add type-safe runAsync methods to BaseTool ([b8cb7e2](https://github.com/google/adk-java/commit/b8cb7e2db6d5ce20f4d7a1b237bdc155563cf4bd))
* Enhance LangChain4j to support MCP tools with parametersJsonSchema ([2c71ba1](https://github.com/google/adk-java/commit/2c71ba1332e052189115cd4644b7a473c31ed414))
* fixing context propagation for agent transfers ([9a08076](https://github.com/google/adk-java/commit/9a080763d83c319f539d1bacac4595d13b299e7e))
* Implement basic version of BigQuery Agent Analytics Plugin ([c8ab0f9](https://github.com/google/adk-java/commit/c8ab0f96b09a6c9636728d634c62695fcd622246))
* init AGENTS.md file ([7ebeb07](https://github.com/google/adk-java/commit/7ebeb07bf2ee72475484d8a31ccf7b4c601dda96))
* Propagating the otel context ([8556d4a](https://github.com/google/adk-java/commit/8556d4af16ff04c6e3b678dcfc3d4bb232abc550))
* remove McpToolset constructors taking Optional parameters ([dbb1394](https://github.com/google/adk-java/commit/dbb139439d38157b4b9af38c52824b1e8405a495))
* Return List instead of ImmutableList in CallbackUtil methods ([8af5e03](https://github.com/google/adk-java/commit/8af5e03811dfd548830df43103c81a592c8bf361))
* update requestedAuthConfigs and its builder to be of general Map types ([f145c74](https://github.com/google/adk-java/commit/f145c744482b6b25f29a0b718bd452065e39d930))
* Update return type of App.plugins() from ImmutableList to List ([8ba4bfe](https://github.com/google/adk-java/commit/8ba4bfed3fa7045f3344329de7a39acddc64ee30))
* Update return type of toolsets() from ImmutableList to List ([cd56902](https://github.com/google/adk-java/commit/cd56902b803d4f7a1f3c718529842823d9e4370a))
* update Session.state() and its builder to be of general Map types ([4b9b99a](https://github.com/google/adk-java/commit/4b9b99ae7149a465ba2ae9b7496e01f669786553))
* update stateDelta builder input to Map from ConcurrentMap ([0d1e5c7](https://github.com/google/adk-java/commit/0d1e5c7b0c42cea66b178cf8fedf08a8c20f7fd0))


### Bug Fixes

* fix null handling in runAsyncImpl ([567fdf0](https://github.com/google/adk-java/commit/567fdf048fee49afc86ca5d7d35f55424a6016ba))
* improve processRequest_concurrentReadAndWrite_noException test case ([4eb3613](https://github.com/google/adk-java/commit/4eb3613b65cb1334e9432960d0f864ef09829c23))
* include saveArtifact invocations in event chain ([551c31f](https://github.com/google/adk-java/commit/551c31f495aafde8568461cc0aa0973d7df7e5ac))
* prevent ConcurrentModificationException when session events are modified by another thread during iteration ([fca43fb](https://github.com/google/adk-java/commit/fca43fbb9684ec8d080e437761f6bb4e38adf255))
* Relaxing constraints for output schema ([d7e03ee](https://github.com/google/adk-java/commit/d7e03eeb067b83abd2afa3ea9bb5fc1c16143245))
* Removing deprecated methods in Runner ([0af82e6](https://github.com/google/adk-java/commit/0af82e61a3c0dbbd95166a10b450cb507115ab60))
* Use ConcurrentHashMap in InvocationReplayState ([94de7f1](https://github.com/google/adk-java/commit/94de7f199f86b39bdb7cce6e9800eb05008a8953)), closes [#1009](https://github.com/google/adk-java/issues/1009)
* workaround for the client config streaming settings are not respected ([#983](https://github.com/google/adk-java/issues/983)) ([3ba04d3](https://github.com/google/adk-java/commit/3ba04d33dc8f2ef8b151abe1be4d1c8b7afcc25a))


### Miscellaneous Chores

* remove deprecated Example processor ([28a8cd0](https://github.com/google/adk-java/commit/28a8cd04ca9348dbe51a15d2be3a2b5307394174))
* set version to 1.0.0-rc.1 ([dc5d794](https://github.com/google/adk-java/commit/dc5d794c066571c7d87f006767bd32298e2a3ba8))

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


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.9.0</version>
<version>1.0.0-rc.1</version>
</dependency>
<!-- Dev UI -->
<dependency>
<groupId>com.google.adk</groupId>
<artifactId>google-adk-dev</artifactId>
<version>0.9.0</version>
<version>1.0.0-rc.1</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.9.1-SNAPSHOT</version><!-- {x-version-update:google-adk:current} -->
<version>1.0.1-rc.1-SNAPSHOT</version><!-- {x-version-update:google-adk:current} -->
</parent>

<artifactId>google-adk-a2a</artifactId>
Expand Down
13 changes: 12 additions & 1 deletion a2a/src/main/java/com/google/adk/a2a/agent/RemoteA2AAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private RemoteA2AAgent(Builder builder) {
if (this.description.isEmpty() && this.agentCard.description() != null) {
this.description = this.agentCard.description();
}
this.streaming = this.agentCard.capabilities().streaming();
this.streaming = builder.streaming && this.agentCard.capabilities().streaming();
}

public static Builder builder() {
Expand All @@ -133,6 +133,13 @@ public static class Builder {
private List<? extends BaseAgent> subAgents;
private List<Callbacks.BeforeAgentCallback> beforeAgentCallback;
private List<Callbacks.AfterAgentCallback> afterAgentCallback;
private boolean streaming;

@CanIgnoreReturnValue
public Builder streaming(boolean streaming) {
this.streaming = streaming;
return this;
}

@CanIgnoreReturnValue
public Builder name(String name) {
Expand Down Expand Up @@ -181,6 +188,10 @@ public RemoteA2AAgent build() {
}
}

public boolean isStreaming() {
return streaming;
}

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);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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 metadata. Adds a prefix used to differentiage ADK-related values stored
* in Metadata an A2A event.
*/
public enum A2AMetadataKey {
TYPE("type"),
IS_LONG_RUNNING("is_long_running"),
PARTIAL("partial"),
GROUNDING_METADATA("grounding_metadata"),
USAGE_METADATA("usage_metadata"),
CUSTOM_METADATA("custom_metadata"),
ERROR_CODE("error_code");

private final String type;

private A2AMetadataKey(String type) {
this.type = "adk_" + type;
}

public String getType() {
return type;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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 ADK metadata. Adds a prefix used to differentiate A2A-related values stored
* in custom metadata of an ADK session event.
*/
public enum AdkMetadataKey {
TASK_ID("task_id"),
CONTEXT_ID("context_id");

private final String type;

private AdkMetadataKey(String type) {
this.type = "a2a:" + type;
}

public String getType() {
return type;
}
}
19 changes: 7 additions & 12 deletions a2a/src/main/java/com/google/adk/a2a/converters/PartConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ public final class PartConverter {

private static final Logger logger = LoggerFactory.getLogger(PartConverter.class);
private static final ObjectMapper objectMapper = new ObjectMapper();
// Constants for metadata types. By convention metadata keys are prefixed with "adk_" to align
// with the Python and Golang libraries.
public static final String A2A_DATA_PART_METADATA_TYPE_KEY = "adk_type";
public static final String A2A_DATA_PART_METADATA_IS_LONG_RUNNING_KEY = "adk_is_long_running";
public static final String A2A_DATA_PART_METADATA_IS_PARTIAL_KEY = "adk_partial";
// Constants for metadata types.
public static final String LANGUAGE_KEY = "language";
public static final String OUTCOME_KEY = "outcome";
public static final String CODE_KEY = "code";
Expand Down Expand Up @@ -135,7 +131,7 @@ private static com.google.genai.types.Part convertDataPartToGenAiPart(DataPart d
Map<String, Object> metadata =
Optional.ofNullable(dataPart.getMetadata()).map(HashMap::new).orElseGet(HashMap::new);

String metadataType = metadata.getOrDefault(A2A_DATA_PART_METADATA_TYPE_KEY, "").toString();
String metadataType = metadata.getOrDefault(A2AMetadataKey.TYPE.getType(), "").toString();

if ((data.containsKey(NAME_KEY) && data.containsKey(ARGS_KEY))
|| metadataType.equals(A2ADataPartMetadataType.FUNCTION_CALL.getType())) {
Expand Down Expand Up @@ -218,7 +214,7 @@ private static DataPart createDataPartFromFunctionCall(
addValueIfPresent(data, WILL_CONTINUE_KEY, functionCall.willContinue());
addValueIfPresent(data, PARTIAL_ARGS_KEY, functionCall.partialArgs());

metadata.put(A2A_DATA_PART_METADATA_TYPE_KEY, A2ADataPartMetadataType.FUNCTION_CALL.getType());
metadata.put(A2AMetadataKey.TYPE.getType(), A2ADataPartMetadataType.FUNCTION_CALL.getType());

return new DataPart(data.buildOrThrow(), metadata.buildOrThrow());
}
Expand All @@ -245,7 +241,7 @@ private static DataPart createDataPartFromFunctionResponse(
addValueIfPresent(data, PARTS_KEY, functionResponse.parts());

metadata.put(
A2A_DATA_PART_METADATA_TYPE_KEY, A2ADataPartMetadataType.FUNCTION_RESPONSE.getType());
A2AMetadataKey.TYPE.getType(), A2ADataPartMetadataType.FUNCTION_RESPONSE.getType());

return new DataPart(data.buildOrThrow(), metadata.buildOrThrow());
}
Expand All @@ -268,7 +264,7 @@ private static DataPart createDataPartFromCodeExecutionResult(
addValueIfPresent(data, OUTPUT_KEY, codeExecutionResult.output());

metadata.put(
A2A_DATA_PART_METADATA_TYPE_KEY, A2ADataPartMetadataType.CODE_EXECUTION_RESULT.getType());
A2AMetadataKey.TYPE.getType(), A2ADataPartMetadataType.CODE_EXECUTION_RESULT.getType());

return new DataPart(data.buildOrThrow(), metadata.buildOrThrow());
}
Expand All @@ -290,8 +286,7 @@ private static DataPart createDataPartFromExecutableCode(
.orElse(Language.Known.LANGUAGE_UNSPECIFIED.toString()));
addValueIfPresent(data, CODE_KEY, executableCode.code());

metadata.put(
A2A_DATA_PART_METADATA_TYPE_KEY, A2ADataPartMetadataType.EXECUTABLE_CODE.getType());
metadata.put(A2AMetadataKey.TYPE.getType(), A2ADataPartMetadataType.EXECUTABLE_CODE.getType());

return new DataPart(data.buildOrThrow(), metadata.buildOrThrow());
}
Expand All @@ -305,7 +300,7 @@ public static io.a2a.spec.Part<?> fromGenaiPart(Part part, boolean isPartial) {
}
ImmutableMap.Builder<String, Object> metadata = ImmutableMap.builder();
if (isPartial) {
metadata.put(A2A_DATA_PART_METADATA_IS_PARTIAL_KEY, true);
metadata.put(A2AMetadataKey.PARTIAL.getType(), true);
}

if (part.text().isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ public static Optional<Event> convertA2aMessageToAdkEvent(Message message, Strin
// Convert each A2A Part to GenAI Part
if (message.getParts() != null) {
for (Part<?> a2aPart : message.getParts()) {
Optional<com.google.genai.types.Part> genaiPart = PartConverter.toGenaiPart(a2aPart);
genaiPart.ifPresent(genaiParts::add);
try {
genaiParts.add(PartConverter.toGenaiPart(a2aPart));
} catch (IllegalArgumentException e) {
logger.debug("Skipping unconvertible A2A part: {}", e.getMessage());
}
}
}

Expand Down Expand Up @@ -125,15 +128,18 @@ public static ImmutableList<Event> convertAggregatedA2aMessageToAdkEvents(

// Emit exactly one ADK Event per A2A Part, preserving order.
for (Part<?> a2aPart : message.getParts()) {
Optional<com.google.genai.types.Part> genaiPart = PartConverter.toGenaiPart(a2aPart);
if (genaiPart.isEmpty()) {
com.google.genai.types.Part genaiPart;
try {
genaiPart = PartConverter.toGenaiPart(a2aPart);
} catch (IllegalArgumentException e) {
logger.debug("Skipping unconvertible A2A part in aggregate: {}", e.getMessage());
continue;
}

String author = extractAuthorFromMetadata(a2aPart);
String role = determineRoleFromAuthor(author);

events.add(createEvent(ImmutableList.of(genaiPart.get()), author, role, invocationId));
events.add(createEvent(ImmutableList.of(genaiPart), author, role, invocationId));
}

if (events.isEmpty()) {
Expand Down Expand Up @@ -162,8 +168,7 @@ private static String extractAuthorFromMetadata(Part<?> a2aPart) {
if (a2aPart instanceof DataPart dataPart) {
Map<String, Object> metadata =
Optional.ofNullable(dataPart.getMetadata()).orElse(ImmutableMap.of());
String type =
metadata.getOrDefault(PartConverter.A2A_DATA_PART_METADATA_TYPE_KEY, "").toString();
String type = metadata.getOrDefault(A2AMetadataKey.TYPE.getType(), "").toString();
if (type.equals(A2ADataPartMetadataType.FUNCTION_CALL.getType())) {
return "model";
}
Expand Down
Loading
Loading