Home / Function/ on_agent_action() — langchain Function Reference

on_agent_action() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  a7622353_dcf5_ac78_fd57_28ffd50ec79f["on_agent_action()"]
  59331c5d_55fc_8bfa_35c9_66bba01f8813["ChainManagerMixin"]
  a7622353_dcf5_ac78_fd57_28ffd50ec79f -->|defined in| 59331c5d_55fc_8bfa_35c9_66bba01f8813
  7d671a13_f889_08e0_3ee6_d2698520f58a["on_agent_action()"]
  7d671a13_f889_08e0_3ee6_d2698520f58a -->|calls| a7622353_dcf5_ac78_fd57_28ffd50ec79f
  7d671a13_f889_08e0_3ee6_d2698520f58a["on_agent_action()"]
  a7622353_dcf5_ac78_fd57_28ffd50ec79f -->|calls| 7d671a13_f889_08e0_3ee6_d2698520f58a
  style a7622353_dcf5_ac78_fd57_28ffd50ec79f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 165–180

    def on_agent_action(
        self,
        action: AgentAction,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        **kwargs: Any,
    ) -> Any:
        """Run on agent action.

        Args:
            action: The agent action.
            run_id: The ID of the current run.
            parent_run_id: The ID of the parent run.
            **kwargs: Additional keyword arguments.
        """

Domain

Subdomains

Called By

Frequently Asked Questions

What does on_agent_action() do?
on_agent_action() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is on_agent_action() defined?
on_agent_action() is defined in libs/core/langchain_core/callbacks/base.py at line 165.
What does on_agent_action() call?
on_agent_action() calls 1 function(s): on_agent_action.
What calls on_agent_action()?
on_agent_action() is called by 1 function(s): on_agent_action.

Analyze Your Own Codebase

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

Try Supermodel Free