Home / Function/ _on_tool_start() — langchain Function Reference

_on_tool_start() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  d8d4c973_937d_41b6_3e71_1c12004709bc["_on_tool_start()"]
  178590bb_85ff_b79e_979a_46e5c3c5389f["LangChainTracer"]
  d8d4c973_937d_41b6_3e71_1c12004709bc -->|defined in| 178590bb_85ff_b79e_979a_46e5c3c5389f
  cf43defe_cb35_deb4_9782_55f973cdf6ca["_persist_run_single()"]
  d8d4c973_937d_41b6_3e71_1c12004709bc -->|calls| cf43defe_cb35_deb4_9782_55f973cdf6ca
  style d8d4c973_937d_41b6_3e71_1c12004709bc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tracers/langchain.py lines 346–350

    def _on_tool_start(self, run: Run) -> None:
        """Process the Tool Run upon start."""
        if run.parent_run_id is None:
            run.reference_example_id = self.example_id
        self._persist_run_single(run)

Domain

Subdomains

Frequently Asked Questions

What does _on_tool_start() do?
_on_tool_start() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/langchain.py.
Where is _on_tool_start() defined?
_on_tool_start() is defined in libs/core/langchain_core/tracers/langchain.py at line 346.
What does _on_tool_start() call?
_on_tool_start() calls 1 function(s): _persist_run_single.

Analyze Your Own Codebase

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

Try Supermodel Free