langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Add native support for LangChain-style message history in the Chat Input component

Open lice-reis opened this issue 1 year ago • 1 comments

Feature Request

Enable the Chat Input component to accept LangChain-style message objects, preserving roles and message order automatically. Example format:

{ "messages": [ { "role": "user", "content": "Hi!" }, { "role": "assistant", "content": "Hello! How are you?" }, { "role": "user", "content": "I'm fine, thanks!" } ] }

Langflow should be able to parse and manage this structure internally, so users can build multi-turn chat flows without custom parsers or manual splitting between history and current message.

Motivation

Currently, the Chat Input component only supports plain text input, which makes it incompatible with LangChain’s message format. Users must implement custom parsers to separate historical messages from the active one — breaking the playground and adding unnecessary complexity. Native support would make conversational agent design simpler, more robust, and fully compatible with LangChain-style multi-turn architectures.

Your Contribution

No response

lice-reis avatar Oct 16 '25 15:10 lice-reis

I would appreciate both an input and output that supports the chat history. That would solve another problem I'm having where I there's no way to create a dependency between two prompts in a chain (if chat history is externalized). It would also make it easier to implement internal (to an agent) logic to correctly manage chat history in e.g. Claude's thinking mode.

Image

claytondaley avatar Nov 18 '25 13:11 claytondaley