weiqingy commented on code in PR #669:
URL: https://github.com/apache/flink-agents/pull/669#discussion_r3299682090
##########
docs/content/docs/development/tool_use.md:
##########
@@ -182,3 +182,9 @@ ReActAgent reviewAnalysisReactAgent = new ReActAgent(
## MCP Tool
See [MCP]({{< ref "docs/development/mcp" >}}) for details.
+
+## Built-in Events and Actions
+
+The built-in `tool_call_action` listens to `ToolRequestEvent`. For each tool
call, it looks up the tool resource by function name, executes it through
durable execution, and records whether it succeeded. After all tool calls in
the batch have been processed, it sends a `ToolResponseEvent`.
+
+When the tool request comes from `chat_model_action`, the emitted
`ToolResponseEvent` is automatically consumed by `chat_model_action` to
continue the chat. See [Built-in Events and Actions in Chat Models]({{< ref
"docs/development/chat_models#built-in-events-and-actions" >}}) for details on
how `chat_model_action` handles tool responses.Users can also send
`ToolRequestEvent` directly when they want to invoke tools programmatically.
Review Comment:
Two readability nits on this line: there's a missing space between "tool
responses." and "Users can also send…", and the topic shift from
"chat_model_action handles tool responses" to "you can also send
ToolRequestEvent directly" reads better as a separate sentence on its own
paragraph. Splitting them gives the "you can also invoke tools manually" hook a
clearer landing spot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]