Implement real-time streaming of agent actions and responses
stream
method provides a clean interface for receiving intermediate steps during agent execution. Each step represents a tool call and its result.
stream_events
method to get real-time output events:
stream_events
method. For more details on event types and data structure, check the LangChain streaming documentation.