Home / Function/ _stop() — langchain Function Reference

_stop() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  1a20b7eb_9ee7_092d_f4a2_82f48788bfae["_stop()"]
  37fcc3f3_2798_3648_915c_2bffdd19bff7["Agent"]
  1a20b7eb_9ee7_092d_f4a2_82f48788bfae -->|defined in| 37fcc3f3_2798_3648_915c_2bffdd19bff7
  style 1a20b7eb_9ee7_092d_f4a2_82f48788bfae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/agents/agent.py lines 736–740

    def _stop(self) -> list[str]:
        return [
            f"\n{self.observation_prefix.rstrip()}",
            f"\n\t{self.observation_prefix.rstrip()}",
        ]

Subdomains

Frequently Asked Questions

What does _stop() do?
_stop() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/agents/agent.py.
Where is _stop() defined?
_stop() is defined in libs/langchain/langchain_classic/agents/agent.py at line 736.

Analyze Your Own Codebase

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

Try Supermodel Free