Skip to content

The agent engineering platform.

core: docs: clarify where the kwargs in on_tool_start and on_tool_end go (#31909)

Chris G65b098325be5
diff --git a/libs/core/langchain_core/callbacks/manager.py b/libs/core/langchain_core/callbacks/manager.py
index 24e42994b1..3b4f1f6e30 100644
--- a/libs/core/langchain_core/callbacks/manager.py
+++ b/libs/core/langchain_core/callbacks/manager.py
@@ -1066,7 +1066,7 @@ class CallbackManagerForToolRun(ParentRunManager, ToolManagerMixin):
Args:
output (Any): The output of the tool.
- **kwargs (Any): Additional keyword arguments.
+ **kwargs (Any): The keyword arguments to pass to the event handler
"""
if not self.handlers:
return
@@ -1470,7 +1470,7 @@ class CallbackManager(BaseCallbackManager):
input is needed.
If provided, the inputs are expected to be formatted as a dict.
The keys will correspond to the named-arguments in the tool.
- **kwargs (Any): Additional keyword arguments.
+ **kwargs (Any): The keyword arguments to pass to the event handler
Returns:
CallbackManagerForToolRun: The callback manager for the tool run.
diff --git a/libs/core/langchain_core/tools/base.py b/libs/core/langchain_core/tools/base.py
index 11fc5014c5..3840429255 100644
--- a/libs/core/langchain_core/tools/base.py
+++ b/libs/core/langchain_core/tools/base.py
@@ -803,7 +803,7 @@ class ChildTool(BaseTool):
run_id: The id of the run. Defaults to None.
config: The configuration for the tool. Defaults to None.
tool_call_id: The id of the tool call. Defaults to None.
- kwargs: Keyword arguments to be passed to tool callbacks
+ kwargs: Keyword arguments to be passed to tool callbacks (event handler)
Returns:
The output of the tool.