You construct conversation history as a list of BaseMessage objects and pass it as the messages parameter when invoking the chat model, optionally using a MessagesPlaceholder in a prompt template for flexibility [citation:1][citation:9].
Constructing a conversation history is a fundamental skill in LangChain. You create a standard Python list where each element is an instance of a message class (e.g., HumanMessage, AIMessage). This list represents the full history of the conversation from the very first message (system prompt) to the most recent user input. This list is then passed directly to the chat model's invoke method as the messages argument, or it can be passed to a ChatPromptTemplate to format a prompt for a model that doesn't natively support the messages format [citation:1][citation:9].