Home / Class/ ToolManagerMixin Class — langchain Architecture

ToolManagerMixin Class — langchain Architecture

Architecture documentation for the ToolManagerMixin class in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ce853a9e_20ff_60f1_d46b_e3de29d95f93["ToolManagerMixin"]
  aa78d849_32e0_cbe3_8323_1a62fafa0824["base.py"]
  ce853a9e_20ff_60f1_d46b_e3de29d95f93 -->|defined in| aa78d849_32e0_cbe3_8323_1a62fafa0824
  4f688869_0f74_66b4_5b9a_2f5d2bf43e4e["on_tool_end()"]
  ce853a9e_20ff_60f1_d46b_e3de29d95f93 -->|method| 4f688869_0f74_66b4_5b9a_2f5d2bf43e4e
  d173e3b9_fbae_2cf1_4f8e_b2c612e3fb45["on_tool_error()"]
  ce853a9e_20ff_60f1_d46b_e3de29d95f93 -->|method| d173e3b9_fbae_2cf1_4f8e_b2c612e3fb45

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 200–235

class ToolManagerMixin:
    """Mixin for tool callbacks."""

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

        Args:
            output: The output of the tool.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            **kwargs: Additional keyword arguments.
        """

    def on_tool_error(
        self,
        error: BaseException,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        **kwargs: Any,
    ) -> Any:
        """Run when tool errors.

        Args:
            error: The error that occurred.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            **kwargs: Additional keyword arguments.
        """

Frequently Asked Questions

What is the ToolManagerMixin class?
ToolManagerMixin is a class in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is ToolManagerMixin defined?
ToolManagerMixin is defined in libs/core/langchain_core/callbacks/base.py at line 200.

Analyze Your Own Codebase

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

Try Supermodel Free