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
  7d671a13_f889_08e0_3ee6_d2698520f58a["on_agent_action()"]
  64513429_d001_87b1_5f19_cc17a3f3577b["AsyncCallbackHandler"]
  7d671a13_f889_08e0_3ee6_d2698520f58a -->|defined in| 64513429_d001_87b1_5f19_cc17a3f3577b
  a7622353_dcf5_ac78_fd57_28ffd50ec79f["on_agent_action()"]
  a7622353_dcf5_ac78_fd57_28ffd50ec79f -->|calls| 7d671a13_f889_08e0_3ee6_d2698520f58a
  a7622353_dcf5_ac78_fd57_28ffd50ec79f["on_agent_action()"]
  7d671a13_f889_08e0_3ee6_d2698520f58a -->|calls| a7622353_dcf5_ac78_fd57_28ffd50ec79f
  style 7d671a13_f889_08e0_3ee6_d2698520f58a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 775–792

    async def on_agent_action(
        self,
        action: AgentAction,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        tags: list[str] | None = None,
        **kwargs: Any,
    ) -> None:
        """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.
            tags: The tags.
            **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 775.
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