Skip to content

Conversation

@dpasiukevich
Copy link
Collaborator

@dpasiukevich dpasiukevich commented Nov 14, 2025

It addresses 2 issues:

  • services.NewSingleAgentLoader() was moved to agent.NewSingleLoader()
  • functiontool now requires the user function with prototype which returns error: from foo(args) res -> foo(args) (res, error)

@ivanmkc
Copy link
Collaborator

ivanmkc commented Nov 15, 2025

Thanks so much for updating.

I ran a build script and it gives the following issues:

remoteagent.NewA2A
[PASS] ./tools-custom/doc_analysis/main.go ./tools-custom/doc_analysis/doc_analysis.go
[PASS] ./tools-custom/order_status/main.go ./tools-custom/order_status/order_status.go
[PASS] ./tools-custom/user_preference/main.go ./tools-custom/user_preference/user_preference.go
[FAIL] ./tools-custom/weather_sentiment/main.go
  # command-line-arguments
  tools-custom/weather_sentiment/main.go:83:3: in call to functiontool.New, type func(ctx tool.Context, args getWeatherReportArgs) (getWeatherReportResult, error) of getWeatherReport does not match inferred type functiontool.Func[getWeatherReportArgs, TResults] for functiontool.Func[TArgs, TResults]
  tools-custom/weather_sentiment/main.go:94:3: in call to functiontool.New, type func(ctx tool.Context, args analyzeSentimentArgs) (analyzeSentimentResult, error) of analyzeSentiment does not match inferred type functiontool.Func[analyzeSentimentArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./callbacks/types_of_callbacks/main.go
  # command-line-arguments
  callbacks/types_of_callbacks/main.go:343:5: in call to functiontool.New, type func(ctx tool.Context, args *GetCapitalCityArgs) (string, error) of getCapitalCity does not match inferred type functiontool.Func[*GetCapitalCityArgs, TResults] for functiontool.Func[TArgs, TResults]
  callbacks/types_of_callbacks/main.go:410:5: cannot use getCapitalCity (value of type func(ctx tool.Context, args *GetCapitalCityArgs) (string, error)) as functiontool.Func[*GetCapitalCityArgs, string] value in argument to functiontool.New[*GetCapitalCityArgs, string]
[FAIL] ./context/main.go
  # command-line-arguments
  context/main.go:281:3: in call to functiontool.New, type func(tc tool.Context, input searchExternalAPIArgs) (string, error) of searchExternalAPI does not match inferred type functiontool.Func[searchExternalAPIArgs, TResults] for functiontool.Func[TArgs, TResults]
  context/main.go:323:3: in call to functiontool.New, type func(tc tool.Context, input toolArgs) (toolResults, error) of myTool does not match inferred type functiontool.Func[toolArgs, TResults] for functiontool.Func[TArgs, TResults]
  context/main.go:405:3: in call to functiontool.New, type func(tc tool.Context, args logToolUsageArgs) (logToolUsageResult, error) of logToolUsage does not match inferred type functiontool.Func[logToolUsageArgs, TResults] for functiontool.Func[TArgs, TResults]
  context/main.go:558:3: in call to functiontool.New, type func(tc tool.Context, input GetUserProfileArgs) (string, error) of getUserProfile does not match inferred type functiontool.Func[GetUserProfileArgs, TResults] for functiontool.Func[TArgs, TResults]
  context/main.go:568:3: in call to functiontool.New, type func(tc tool.Context, input GetUserOrdersArgs) (*getUserOrdersResult, error) of getUserOrders does not match inferred type functiontool.Func[GetUserOrdersArgs, TResults] for functiontool.Func[TArgs, TResults]
  context/main.go:632:3: in call to functiontool.New, type func(tc tool.Context, args setUserPreferenceArgs) (setUserPreferenceResult, error) of setUserPreference does not match inferred type functiontool.Func[setUserPreferenceArgs, TResults] for functiontool.Func[TArgs, TResults]
  context/main.go:751:3: in call to functiontool.New, type func(tc tool.Context, args saveDocRefArgs) (saveDocRefResult, error) of saveDocRef does not match inferred type functiontool.Func[saveDocRefArgs, TResults] for functiontool.Func[TArgs, TResults]
  context/main.go:761:3: in call to functiontool.New, type func(tc tool.Context, input summarizeDocumentArgs) (summarizeDocumentResult, error) of summarizeDocumentTool does not match inferred type functiontool.Func[summarizeDocumentArgs, TResults] for functiontool.Func[TArgs, TResults]
  context/main.go:797:3: in call to functiontool.New, type func(tc tool.Context, args checkAvailableDocsArgs) (checkAvailableDocsResult, error) of checkAvailableDocs does not match inferred type functiontool.Func[checkAvailableDocsArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./tools/function-tools/func_tool.go
  # command-line-arguments
  tools/function-tools/func_tool.go:81:3: in call to functiontool.New, type func(ctx tool.Context, input getStockPriceArgs) (getStockPriceResults, error) of getStockPrice does not match inferred type functiontool.Func[getStockPriceArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./sessions/state_example/state_example.go
  # command-line-arguments
  sessions/state_example/state_example.go:166:3: in call to functiontool.New, type func(tctx tool.Context, args struct{}) (struct{}, error) of func(tctx tool.Context, args struct{}) (struct{}, error) {…} does not match inferred type functiontool.Func[struct{}, TResults] for functiontool.Func[TArgs, TResults]
[PASS] ./sessions/session_management_example/session_management_example.go
[PASS] ./sessions/instruction_template/instruction_template_example.go
[PASS] ./sessions/instruction_provider/instruction_provider_example.go
[PASS] ./artifacts/main.go
[PASS] ./tools/built-in-tools/google_search.go
[PASS] ./callbacks/main.go
[PASS] ./agents/models/models.go
[PASS] ./agents/custom-agent/storyflow_agent.go
[PASS] ./agents/workflow-agents/sequential/main.go
[PASS] ./agents/workflow-agents/parallel/main.go
[FAIL] ./agents/workflow-agents/loop/main.go
  # command-line-arguments
  agents/workflow-agents/loop/main.go:114:3: in call to functiontool.New, type func(ctx tool.Context, input ExitLoopArgs) (ExitLoopResults, error) of ExitLoop does not match inferred type functiontool.Func[ExitLoopArgs, TResults] for functiontool.Func[TArgs, TResults]
[PASS] ./quickstart/main.go
[FAIL] ./agents/multi-agent/main.go
  # command-line-arguments
  agents/multi-agent/main.go:344:3: in call to functiontool.New, type func(tool.Context, externalApprovalToolArgs) (string, error) of externalApprovalTool does not match inferred type functiontool.Func[externalApprovalToolArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./tools/function-tools/long-running-tool/long_running_tool.go
  # command-line-arguments
  tools/function-tools/long-running-tool/long_running_tool.go:68:3: in call to functiontool.New, type func(ctx tool.Context, args CreateTicketArgs) (CreateTicketResults, error) of createTicketAsync does not match inferred type functiontool.Func[CreateTicketArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./agents/llm-agents/snippets/main.go
  # command-line-arguments
  agents/llm-agents/snippets/main.go:101:3: in call to functiontool.New, type func(ctx tool.Context, args getCapitalCityArgs) (map[string]any, error) of getCapitalCity does not match inferred type functiontool.Func[getCapitalCityArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./agents/llm-agents/main.go
  # command-line-arguments
  agents/llm-agents/main.go:161:3: in call to functiontool.New, type func(ctx tool.Context, args getCapitalCityArgs) (map[string]any, error) of getCapitalCity does not match inferred type functiontool.Func[getCapitalCityArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./sessions/memory_example/memory_example.go
  # command-line-arguments
  sessions/memory_example/memory_example.go:80:2: in call to functiontool.New, type func(tctx tool.Context, args Args) (Result, error) of memorySearchToolFunc does not match inferred type functiontool.Func[Args, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./tools-custom/customer_support_agent/main.go
  # command-line-arguments
  tools-custom/customer_support_agent/main.go:71:3: in call to functiontool.New, type func(ctx tool.Context, args checkAndTransferArgs) (checkAndTransferResult, error) of checkAndTransfer does not match inferred type functiontool.Func[checkAndTransferArgs, TResults] for functiontool.Func[TArgs, TResults]

Build script finished.
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ 
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ 
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ go get github.com/owner/repo@master
^C
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ ./build_all.sh
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ ./build_all.sh
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ 
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ go get github.com/owner/repo@master
go: github.com/owner/repo@master: invalid version: git ls-remote -q https://github.com/owner/repo in /Users/ivanmkc/go/pkg/mod/cache/vcs/a0b6f4061e53ac8b334a7bddb042f546c9d366f94158675fb2f37b10f54daa81: exit status 128:
        remote: Repository not found.
        fatal: repository 'https://github.com/owner/repo/' not found
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ 
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ go get github.com/owne@master
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ go get google.golang.org/adk@main
go: downloading google.golang.org/adk v0.1.1-0.20251114161814-0a038b69ea44
go: upgraded google.golang.org/adk v0.1.0 => v0.1.1-0.20251114161814-0a038b69ea44
((env) ) ivanmkc@ivanmkc-mac:~/Documents/code/adk-docs/examples/go/snippets (env) (imkc--go-regression-testing)$ ./build_all.sh
Running Go snippet builds...

[PASS] ../../go/cloud-run/main.go
[PASS] ../../go/a2a_basic/remote_a2a/check_prime_agent/main.go
[PASS] ../../go/a2a_basic/main.go
[FAIL] ./tools-custom/doc_analysis/main.go ./tools-custom/doc_analysis/doc_analysis.go
  # command-line-arguments
  tools-custom/doc_analysis/main.go:85:3: in call to functiontool.New, type func(ctx tool.Context, args processDocumentArgs) processDocumentResult of processDocument does not match inferred type functiontool.Func[processDocumentArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./tools-custom/order_status/main.go ./tools-custom/order_status/order_status.go
  # command-line-arguments
  tools-custom/order_status/main.go:44:3: in call to functiontool.New, type func(ctx tool.Context, args lookupOrderStatusArgs) lookupOrderStatusResult of lookupOrderStatus does not match inferred type functiontool.Func[lookupOrderStatusArgs, TResults] for functiontool.Func[TArgs, TResults]
[FAIL] ./tools-custom/user_preference/main.go ./tools-custom/user_preference/user_preference.go
  # command-line-arguments
  tools-custom/user_preference/main.go:44:3: in call to functiontool.New, type func(ctx tool.Context, args updateUserPreferenceArgs) updateUserPreferenceResult of updateUserPreference does not match inferred type functiontool.Func[updateUserPreferenceArgs, TResults] for functiontool.Func[TArgs, TResults]
[PASS] ./tools-custom/weather_sentiment/main.go
[PASS] ./callbacks/types_of_callbacks/main.go
[PASS] ./context/main.go
[PASS] ./tools/function-tools/func_tool.go
[PASS] ./sessions/state_example/state_example.go
[FAIL] ./sessions/session_management_example/session_management_example.go
  # command-line-arguments
  sessions/session_management_example/session_management_example.go:47:32: undefined: session.VertexAIService
[PASS] ./sessions/instruction_template/instruction_template_example.go
[PASS] ./sessions/instruction_provider/instruction_provider_example.go
[PASS] ./artifacts/main.go
[PASS] ./tools/built-in-tools/google_search.go
[PASS] ./callbacks/main.go
[PASS] ./agents/models/models.go
[PASS] ./agents/custom-agent/storyflow_agent.go
[PASS] ./agents/workflow-agents/sequential/main.go
[PASS] ./agents/workflow-agents/parallel/main.go
[PASS] ./agents/workflow-agents/loop/main.go
[FAIL] ./quickstart/main.go
  quickstart/main.go:23:2: no required module provides package google.golang.org/adk/cmd/launcher/adk; to add it:
        go get google.golang.org/adk/cmd/launcher/adk
  quickstart/main.go:26:2: no required module provides package google.golang.org/adk/server/restapi/services; to add it:
        go get google.golang.org/adk/server/restapi/services
[PASS] ./agents/multi-agent/main.go
[PASS] ./tools/function-tools/long-running-tool/long_running_tool.go
[PASS] ./agents/llm-agents/snippets/main.go
[PASS] ./agents/llm-agents/main.go
[PASS] ./sessions/memory_example/memory_example.go
[PASS] ./tools-custom/customer_support_agent/main.go

Build script finished.

Copy link
Collaborator

@ivanmkc ivanmkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments about build errors

}

agent, err := llmagent.New(llmagent.Config{
timeAgent, err := llmagent.New(llmagent.Config{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be agent

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it cannot be agent, because package agent is used in lines 83.

Apparently my change was removed in this 9e30396 merge commit, but I restored it.

@dpasiukevich
Copy link
Collaborator Author

Regarding the build: seems like your script used older version go: downloading google.golang.org/adk v0.1.1-0.20251114161814-0a038b69ea44. And functiontool change was done November 13 -- google/adk-go#270.

@ivanmkc could you share your script so I can double check its behavior?
What I did for this PR -- manually copypasting snippet code to file in adk-go repo set at HEAD. Some manual work here, but I'm sure the proposed changes build with latest version. But let's double check.

@ivanmkc
Copy link
Collaborator

ivanmkc commented Nov 18, 2025

Regarding the build: seems like your script used older version go: downloading google.golang.org/adk v0.1.1-0.20251114161814-0a038b69ea44. And functiontool change was done November 13 -- google/adk-go#270.

@ivanmkc could you share your script so I can double check its behavior? What I did for this PR -- manually copypasting snippet code to file in adk-go repo set at HEAD. Some manual work here, but I'm sure the proposed changes build with latest version. But let's double check.

Hi, I added this PR with the scripts to test, which should help: #973
I think you can simply merge in the changes to get the testing scripts. The README has some commands that will run everything.
You might need to point at the desired version of ADK.

@joefernandez
Copy link
Collaborator

DO NOT MERGE: This docs update indicates code changes for ADK Go launcher.

HOWEVER, there is nothing to indicate an official release happened:

Pinging the Go team internally for an update.

@dpasiukevich
Copy link
Collaborator Author

@dpasiukevich
Copy link
Collaborator Author

All snippets should be buildable except for one (snippets/sessions/session_management_example/session_management_example.go)

We actually removed session.VertexAIService method from adk-go. Because it was in incomplete state and we didn't want to confuse users.
Could I ask to help to update the docs here as well (in a separate PR)?

Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this quickstart is now INCOMPATIBLE with release v0.1.0, add this requirement:

*   Go 1.24.4 or later
*   ADK Go v0.2.0 or later

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Copy link
Collaborator

@ivanmkc ivanmkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it builds then looks good to me.

@dpasiukevich
Copy link
Collaborator Author

For reference (built with adk-go 0.2.0)
image

@ivanmkc I'd only would like to ask for help with snippets/sessions/session_management_example/session_management_example.go:47:32: undefined: session.VertexAIService in a separate PR.

We removed session.VertexAIService method from adk-go. Because it was in incomplete state and we didn't want to confuse users.

@dpasiukevich dpasiukevich merged commit d506137 into main Nov 21, 2025
5 of 6 checks passed
@dpasiukevich dpasiukevich deleted the upd_adkgo branch November 21, 2025 21:05
@kaushalparmar942004-lab

Mere nems ka kitana account he kese kare

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants