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