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

More agents and tools commands

All agents and tools commands · LangChain 1 cheatsheet

Was this page helpful?