Skip to content

Add Go port of the financial-advisor recipe - #2741

Merged
happyhuman merged 7 commits into
mainfrom
feat/go-financial-advisor
Oct 1, 2026
Merged

happyhuman merged 7 commits into
mainfrom
feat/go-financial-advisor

Conversation

@happyhuman

Copy link
Copy Markdown
Collaborator

Adds contrib/go/financial-advisor, an ADK Go port of contrib/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 llmagent calls four specialist agents through agenttool, the data analyst uses geminitool.GoogleSearch, and every agent sets the same OutputKey. The five prompts are byte-identical to the Python ones (checked by extracting the Go raw strings and comparing them).

One deliberate difference: model.go creates the Gemini client on first use. genai.NewClient looks up Vertex AI credentials eagerly, so creating it at startup would make the container exit when it runs without credentials, as it does in recipe-docker-build.yml.

The binary uses the ADK full launcher: go run . opens a console chat, go run . web api webui serves the dev UI, and the container serves web api webui on port 8080.

Verified locally: go vet, go build, and go test -c compile cleanly; the prompts match; uv run validate all contrib/go/financial-advisor passes.

Not verified locally: this machine's endpoint policy kills every locally built Go binary (even a hello world, and gofmt itself), so go test, golangci-lint, and a live model run could not run here. go-tests.yml, go-format.yml, and recipe-docker-build.yml on this PR are the first execution of this code. The same design ran live in the Java port (#2740).

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Security review — 1 finding(s).


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

Comment thread contrib/go/financial-advisor/Dockerfile Resolved
@github-actions github-actions Bot added the status/not-ready-for-review Review requests held until checks pass and bot comments are resolved label Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Ready for review. All checks pass and the review comments are resolved.

Re-requested review from ToniCorinne.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Correctness review — 4 finding(s).


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

Comment thread contrib/go/financial-advisor/agent.go Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Maintainability review — 3 finding(s).


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

Comment thread contrib/go/financial-advisor/agent.go Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Hygiene review — 3 finding(s).


Round 1 · 0 of this PR's 25 automated comments used · this round is capped at 20 across all reviewers.

Comment thread contrib/go/financial-advisor/agent.go Resolved
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.
@github-actions github-actions Bot removed the status/not-ready-for-review Review requests held until checks pass and bot comments are resolved label Oct 1, 2026
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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Hygiene review — 1 finding(s).


Round 2 · 11 of this PR's 25 automated comments used · this round is capped at 6 across all reviewers · after this round only Security and Correctness run.

@github-actions github-actions Bot added the status/not-ready-for-review Review requests held until checks pass and bot comments are resolved label Oct 1, 2026
@github-actions github-actions Bot removed the status/not-ready-for-review Review requests held until checks pass and bot comments are resolved label Oct 1, 2026
@happyhuman
happyhuman merged commit f372b66 into main Oct 1, 2026
26 checks passed
@happyhuman
happyhuman deleted the feat/go-financial-advisor branch October 1, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant