Home / Class/ _DescriptionFactory Class — langchain Architecture

_DescriptionFactory Class — langchain Architecture

Architecture documentation for the _DescriptionFactory class in human_in_the_loop.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  2d94a030_06fd_9c42_9c78_19544d494627["_DescriptionFactory"]
  23036d87_b616_3e6b_013c_17cd312d2a62["human_in_the_loop.py"]
  2d94a030_06fd_9c42_9c78_19544d494627 -->|defined in| 23036d87_b616_3e6b_013c_17cd312d2a62
  0da3a597_00c9_cfe9_dfcb_c56fac9b75c0["__call__()"]
  2d94a030_06fd_9c42_9c78_19544d494627 -->|method| 0da3a597_00c9_cfe9_dfcb_c56fac9b75c0

Relationship Graph

Source Code

libs/langchain_v1/langchain/agents/middleware/human_in_the_loop.py lines 108–115

class _DescriptionFactory(Protocol):
    """Callable that generates a description for a tool call."""

    def __call__(
        self, tool_call: ToolCall, state: AgentState[Any], runtime: Runtime[ContextT]
    ) -> str:
        """Generate a description for a tool call."""
        ...

Frequently Asked Questions

What is the _DescriptionFactory class?
_DescriptionFactory is a class in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/human_in_the_loop.py.
Where is _DescriptionFactory defined?
_DescriptionFactory is defined in libs/langchain_v1/langchain/agents/middleware/human_in_the_loop.py at line 108.

Analyze Your Own Codebase

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

Try Supermodel Free