Repository navigation
Add Go port of the financial-advisor recipe - #2741
Merged
Merged
Conversation
Ports contrib/python/financial-advisor to ADK Go v1.7.0 with the same agent graph (a coordinator calling four specialist agents through agenttool, the data analyst grounded with Google Search) and byte-identical prompts.
Contributor
|
Ready for review. All checks pass and the review comments are resolved. Re-requested review from |
Moves grpc to 1.83.2 and x/crypto and x/mod to their latest releases, which fixes every advisory the CVE scan reported except GO-2026-5932. That one covers x/crypto/openpgp, which has no fix and is not imported by this recipe, so it is ignored in osv-scanner.toml.
distroless/static:nonroot already runs as nonroot, but an explicit USER makes that visible to readers and scanners.
Fixes text defects carried over from the Python prompts: a stray "1" in the disclaimer, a double period, a missing quote, a missing "Objective:" label, and a state key example that did not match the real output key. The coordinator prompt now names the subagents by their tool names, the three copies of the disclaimer come from one legalDisclaimer constant, and MODEL_NAME defaults to gemini-3.5-flash as AGENTS.md recommends.
Mirrors the Python recipe's test_runnability.py: main's launcher configuration is now built by newLauncherConfig, and the test serves it through the ADK REST API handler and checks that /list-apps lists the agent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
contrib/go/financial-advisor, an ADK Go port ofcontrib/python/financial-advisor. It is the second of four ports of this recipe (Java #2740, Go, TypeScript, Kotlin), each in its own PR.The port has the same agent graph as the Python recipe: a coordinator
llmagentcalls four specialist agents throughagenttool, the data analyst usesgeminitool.GoogleSearch, and every agent sets the sameOutputKey. The five prompts are byte-identical to the Python ones (checked by extracting the Go raw strings and comparing them).One deliberate difference:
model.gocreates the Gemini client on first use.genai.NewClientlooks up Vertex AI credentials eagerly, so creating it at startup would make the container exit when it runs without credentials, as it does inrecipe-docker-build.yml.The binary uses the ADK
fulllauncher:go run .opens a console chat,go run . web api webuiserves the dev UI, and the container servesweb api webuion port 8080.Verified locally:
go vet,go build, andgo test -ccompile cleanly; the prompts match;uv run validate all contrib/go/financial-advisorpasses.Not verified locally: this machine's endpoint policy kills every locally built Go binary (even a hello world, and
gofmtitself), sogo test, golangci-lint, and a live model run could not run here.go-tests.yml,go-format.yml, andrecipe-docker-build.ymlon this PR are the first execution of this code. The same design ran live in the Java port (#2740).