LangChain 1 · Agents and tools
Stream agent steps
Print each step as the agent calls tools and answers.
for step in agent.stream(
{"messages": [{"role": "user", "content": "Weather in Paris?"}]},
stream_mode="updates",
):
print(step)
Official LangChain 1 documentation