on_agent_finish() — langchain Function Reference
Architecture documentation for the on_agent_finish() function in stdout.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 515de6a0_4d8b_67cc_455a_065218e2e8c7["on_agent_finish()"] dcf2a9b2_8ab4_fbe0_5f57_ef548417d10e["StdOutCallbackHandler"] 515de6a0_4d8b_67cc_455a_065218e2e8c7 -->|defined in| dcf2a9b2_8ab4_fbe0_5f57_ef548417d10e style 515de6a0_4d8b_67cc_455a_065218e2e8c7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/callbacks/stdout.py lines 113–123
def on_agent_finish(
self, finish: AgentFinish, color: str | None = None, **kwargs: Any
) -> None:
"""Run on the agent end.
Args:
finish: The agent finish.
color: The color to use for the text.
**kwargs: Additional keyword arguments.
"""
print_text(finish.log, color=color or self.color, end="\n")
Domain
Subdomains
Defined In
Source
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/stdout.py.
Where is on_agent_finish() defined?
on_agent_finish() is defined in libs/core/langchain_core/callbacks/stdout.py at line 113.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free