Home / Function/ on_tool_end() — langchain Function Reference

on_tool_end() — langchain Function Reference

Architecture documentation for the on_tool_end() function in manager.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b9e1e1b1_29a3_f8f4_77f9_b2d38254e1c6["on_tool_end()"]
  aff7625c_33b8_6f74_3aba_89e8a85fa229["CallbackManagerForToolRun"]
  b9e1e1b1_29a3_f8f4_77f9_b2d38254e1c6 -->|defined in| aff7625c_33b8_6f74_3aba_89e8a85fa229
  73c64fa8_8671_57c1_b764_0e1ee3c5a51b["on_tool_end()"]
  73c64fa8_8671_57c1_b764_0e1ee3c5a51b -->|calls| b9e1e1b1_29a3_f8f4_77f9_b2d38254e1c6
  73c64fa8_8671_57c1_b764_0e1ee3c5a51b["on_tool_end()"]
  b9e1e1b1_29a3_f8f4_77f9_b2d38254e1c6 -->|calls| 73c64fa8_8671_57c1_b764_0e1ee3c5a51b
  8964b4e9_440e_18a7_2a15_a54a0b2b733c["handle_event()"]
  b9e1e1b1_29a3_f8f4_77f9_b2d38254e1c6 -->|calls| 8964b4e9_440e_18a7_2a15_a54a0b2b733c
  style b9e1e1b1_29a3_f8f4_77f9_b2d38254e1c6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/manager.py lines 1057–1080

    def on_tool_end(
        self,
        output: Any,
        **kwargs: Any,
    ) -> None:
        """Run when the tool ends running.

        Args:
            output: The output of the tool.
            **kwargs: The keyword arguments to pass to the event handler

        """
        if not self.handlers:
            return
        handle_event(
            self.handlers,
            "on_tool_end",
            "ignore_agent",
            output,
            run_id=self.run_id,
            parent_run_id=self.parent_run_id,
            tags=self.tags,
            **kwargs,
        )

Domain

Subdomains

Called By

Frequently Asked Questions

What does on_tool_end() do?
on_tool_end() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/manager.py.
Where is on_tool_end() defined?
on_tool_end() is defined in libs/core/langchain_core/callbacks/manager.py at line 1057.
What does on_tool_end() call?
on_tool_end() calls 2 function(s): handle_event, on_tool_end.
What calls on_tool_end()?
on_tool_end() is called by 1 function(s): on_tool_end.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free