Skip to content

feat: add tool node to workflow agents#776

Merged
anFatum merged 6 commits into
google:wolo/workflowsfrom
anFatum:init-tool-nodes
May 5, 2026
Merged

feat: add tool node to workflow agents#776
anFatum merged 6 commits into
google:wolo/workflowsfrom
anFatum:init-tool-nodes

Conversation

@anFatum
Copy link
Copy Markdown
Contributor

@anFatum anFatum commented Apr 29, 2026

Added a new ToolNode to be used with workflow agents

  1. It could be created with 4 constructors - combinations with strongly typed tool node and overwritten validation schemas
  2. The tool node calls the tool if it's runnable and returns the output of the tool casted to the defined Output type.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces toolNode to the workflow package, enabling tool.Tool integration into workflows with automated schema resolution and conversion. It also includes comprehensive tests and updates to mock contexts. The reviewer identified opportunities to improve error handling by moving runnability checks to the constructor and ensuring that output conversion consistently applies schema validation during fallback paths.

Comment thread workflow/tool_node.go Outdated
Comment thread workflow/tool_node.go Outdated
@anFatum anFatum requested a review from wolo-lab April 29, 2026 17:20
Comment thread workflow/tool_node.go Outdated
Comment thread workflow/tool_node_test.go
Comment thread workflow/tool_node.go Outdated
Comment thread workflow/tool_node.go
Comment thread workflow/tool_node.go
Comment thread workflow/tool_node.go Outdated
@anFatum anFatum requested a review from hanorik April 30, 2026 11:30
Comment thread workflow/tool_node.go Outdated
Comment thread workflow/tool_node_test.go
@anFatum
Copy link
Copy Markdown
Contributor Author

anFatum commented May 4, 2026

/gemini review

@anFatum anFatum requested review from hanorik and wolo-lab May 4, 2026 11:25
Copy link
Copy Markdown

@wolo-lab wolo-lab left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread workflow/tool_node_test.go Outdated
Comment thread workflow/tool_node.go
Copy link
Copy Markdown
Contributor

@hanorik hanorik left a comment

Choose a reason for hiding this comment

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

LGTM

@anFatum anFatum merged commit a1b0c8b into google:wolo/workflows May 5, 2026
1 check passed
wolo-lab pushed a commit that referenced this pull request May 11, 2026
* feat: add tool node to worflow agents

* update tool node so it's not converting the output to the types, but only validates the schema

* check the tool is runnable inside constructor

* nit: fix node names in test
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.

3 participants