[DO NOT MERGE] ADK Go v2.0.0#1870
Conversation
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
koverholt
left a comment
There was a problem hiding this comment.
Thanks for all of these updates! I reviewed the docs and Go snippets against the adk-go v2 branch and confirmed the APIs and examples line up.
I left a handful of minor in-line comments, plus two worth fixing before merge: the @v2 install command won't resolve after release, and there's some committed that might be accidental and should be removed and gitignored. Thanks again!
| const ( | ||
| appName = "hitl_demo" | ||
| userID = "demo_user" | ||
| modelName = "gemini-2.5-flash" |
There was a problem hiding this comment.
Use gemini-flash-latest.
| "google.golang.org/adk/tool/functiontool" | ||
| ) | ||
|
|
||
| const modelName = "gemini-2.5-flash" |
There was a problem hiding this comment.
Use gemini-flash-latest.
| func newHITLWorkflow() (agent.Agent, error) { | ||
| rerun := true | ||
|
|
||
| // greetNode pauses for the user's name on the first pass and produces a |
There was a problem hiding this comment.
This is the Yes/No approval node, but the comment calls it "greetNode" pausing for a name, and the Python pseudocode says rerun_on_resume=False while the Go uses true. Suggest renaming greetNode to approvalNode and updating the comment to describe a Yes/No approval node instead of greeting/pausing for a name.
There was a problem hiding this comment.
Were these binaries committed intentionally; are they needed? If not would be good to remove and add to a .gitignore.
There was a problem hiding this comment.
Were these binaries committed intentionally; are they needed? If not would be good to remove and add to a .gitignore.
| !!! caution "Caution: Workflow agent limitations" | ||
|
|
||
| You can add ***LlmAgents*** to graph-based workflows, however they must | ||
| be configured for single-turn (task) mode. For more information about |
There was a problem hiding this comment.
"single-turn (task) mode" reads like single-turn and task are the same mode, but they're two distinct modes. The older wording "a task or single-turn mode" was clearer. Suggest "single-turn or task mode."
| // report_text = await ctx.run_node(city_report_agent, city_time) | ||
| // return report_text | ||
| func newDataHandlingWorkflow(ctx context.Context) (agent.Agent, error) { | ||
| model, err := gemini.NewModel(ctx, "gemini-2.5-flash", &genai.ClientConfig{}) |
There was a problem hiding this comment.
Use gemini-flash-latest.
| // check_resp = await ctx.run_node(compile_lint_check, code) | ||
| // return code | ||
| func newLoopWorkflow(ctx context.Context) (agent.Agent, error) { | ||
| model, err := gemini.NewModel(ctx, "gemini-2.5-flash", &genai.ClientConfig{}) |
There was a problem hiding this comment.
Use gemini-flash-latest.
|
|
||
| ```shell | ||
| go get google.golang.org/adk | ||
| go get google.golang.org/adk@v2 |
There was a problem hiding this comment.
go get ...adk@v2 won't resolve once the module adopts the /v2 path (v2 releases live under google.golang.org/adk/v2, not as a @v2 tag on the bare path). Suggest matching the form used on the 2.0 release page: go get google.golang.org/adk/v2.
| ADK Go 2.0 introduces new fields `node_info` and `output` to the core | ||
| ***Event*** schema to track graph state and workflow outputs. |
There was a problem hiding this comment.
In the Go event model these fields serialize as Output (no JSON tag) and nodeInfo (json:"nodeInfo"), not node_info/output (that's the Python naming). Since this section is about updating custom storage schemas, worth using the names that a Go session.Service actually emits, or clarifying which serialization you mean.
Includes:
Does not include: