Home / Function/ restart() — langchain Function Reference

restart() — langchain Function Reference

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

Function python LangChainCore Runnables calls 2 called by 2

Entity Profile

Dependency Diagram

graph TD
  376fc508_1bee_23a7_7de6_267e13821247["restart()"]
  cf4eeaa4_4bcc_69d9_a0f3_664b1eecb4e8["ShellSession"]
  376fc508_1bee_23a7_7de6_267e13821247 -->|defined in| cf4eeaa4_4bcc_69d9_a0f3_664b1eecb4e8
  89d586a2_0b74_ac5c_97da_a6a18a02f59d["_collect_output()"]
  89d586a2_0b74_ac5c_97da_a6a18a02f59d -->|calls| 376fc508_1bee_23a7_7de6_267e13821247
  8b644660_40e4_465a_3e51_e1a3166de4f9["_run_shell_tool()"]
  8b644660_40e4_465a_3e51_e1a3166de4f9 -->|calls| 376fc508_1bee_23a7_7de6_267e13821247
  8e7ca27f_5ba4_f43b_b7dd_ea19f14cf7c4["stop()"]
  376fc508_1bee_23a7_7de6_267e13821247 -->|calls| 8e7ca27f_5ba4_f43b_b7dd_ea19f14cf7c4
  a66768b0_c906_c61b_b24b_37fd445b1af9["start()"]
  376fc508_1bee_23a7_7de6_267e13821247 -->|calls| a66768b0_c906_c61b_b24b_37fd445b1af9
  style 376fc508_1bee_23a7_7de6_267e13821247 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/langchain/agents/middleware/shell_tool.py lines 186–189

    def restart(self) -> None:
        """Restart the shell process."""
        self.stop(self._policy.termination_timeout)
        self.start()

Domain

Subdomains

Frequently Asked Questions

What does restart() do?
restart() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/shell_tool.py.
Where is restart() defined?
restart() is defined in libs/langchain_v1/langchain/agents/middleware/shell_tool.py at line 186.
What does restart() call?
restart() calls 2 function(s): start, stop.
What calls restart()?
restart() is called by 2 function(s): _collect_output, _run_shell_tool.

Analyze Your Own Codebase

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

Try Supermodel Free