Home / Function/ on_agent_finish() — langchain Function Reference

on_agent_finish() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  20347e86_d4a9_ba67_7065_477c2b811ca9["on_agent_finish()"]
  59331c5d_55fc_8bfa_35c9_66bba01f8813["ChainManagerMixin"]
  20347e86_d4a9_ba67_7065_477c2b811ca9 -->|defined in| 59331c5d_55fc_8bfa_35c9_66bba01f8813
  a07e8a2c_2334_6d3f_0b3f_ec4d080d63e6["on_agent_finish()"]
  a07e8a2c_2334_6d3f_0b3f_ec4d080d63e6 -->|calls| 20347e86_d4a9_ba67_7065_477c2b811ca9
  a07e8a2c_2334_6d3f_0b3f_ec4d080d63e6["on_agent_finish()"]
  20347e86_d4a9_ba67_7065_477c2b811ca9 -->|calls| a07e8a2c_2334_6d3f_0b3f_ec4d080d63e6
  style 20347e86_d4a9_ba67_7065_477c2b811ca9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 182–197

    def on_agent_finish(
        self,
        finish: AgentFinish,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        **kwargs: Any,
    ) -> Any:
        """Run on the agent end.

        Args:
            finish: The agent finish.
            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_finish() do?
on_agent_finish() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/base.py.
Where is on_agent_finish() defined?
on_agent_finish() is defined in libs/core/langchain_core/callbacks/base.py at line 182.
What does on_agent_finish() call?
on_agent_finish() calls 1 function(s): on_agent_finish.
What calls on_agent_finish()?
on_agent_finish() is called by 1 function(s): on_agent_finish.

Analyze Your Own Codebase

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

Try Supermodel Free