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

Relationship Graph

Source Code

libs/core/langchain_core/callbacks/base.py lines 794–811

    async def on_agent_finish(
        self,
        finish: AgentFinish,
        *,
        run_id: UUID,
        parent_run_id: UUID | None = None,
        tags: list[str] | None = None,
        **kwargs: Any,
    ) -> None:
        """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.
            tags: The tags.
            **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 794.
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