Structure the conversation so the model knows who said what and what it should do.
LangChain represents conversations using messages rather than treating everything as one large string. Different message types can represent instructions from the system, requests from the user, responses from the model, and information returned by tools.
This structure becomes especially important when building agents because a single workflow may contain several model and tool interactions. Keeping these messages organized gives the model the context it needs to understand what has already happened.
What you'll walk away knowing