Home / Class/ Action Class — langchain Architecture

Action Class — langchain Architecture

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

Entity Profile

Dependency Diagram

graph TD
  c1fd81be_ad2e_5a16_1981_1fdcb768b5dc["Action"]
  23036d87_b616_3e6b_013c_17cd312d2a62["human_in_the_loop.py"]
  c1fd81be_ad2e_5a16_1981_1fdcb768b5dc -->|defined in| 23036d87_b616_3e6b_013c_17cd312d2a62

Relationship Graph

Source Code

libs/langchain_v1/langchain/agents/middleware/human_in_the_loop.py lines 19–26

class Action(TypedDict):
    """Represents an action with a name and args."""

    name: str
    """The type or name of action being requested (e.g., `'add_numbers'`)."""

    args: dict[str, Any]
    """Key-value pairs of args needed for the action (e.g., `{"a": 1, "b": 2}`)."""

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free