LangChain 1 · Agents and tools
Run an agent
Send a conversation to the agent. The result holds the full list of messages.
result = agent.invoke({"messages": [{"role": "user", "content": "What is the weather in Paris?"}]})
print(result["messages"][-1].content)
Official LangChain 1 documentation