Thread
Use LangDB Threads to group messages, maintain conversation context, and enable seamless multi-turn interactions.
A Thread is simply a grouping of Message History that maintains context in a conversation or workflow. Threads are useful for keeping track of past messages and ensuring continuity across multiple exchanges.

Core Features:
- Contextual Continuity: Ensures all related Runs are grouped for better observability. 
- Multi-Turn Support: Simplifies managing interactions that require maintaining state across multiple Runs. 
Example:
A user interacting with a chatbot over multiple turns (e.g., asking follow-up questions) generates several messages, but all are grouped under a single Thread to maintain continuity.
Headers for Thread:
- x-thread-id: Links all Runs in the same context or conversations.
- x-thread-title: Assigns a custom, human-readable title to the thread, making it easier to identify.
- x-thread-public: Makes the thread publicly accessible via a shareable link by setting its value to- 1or- true.
Last updated
Was this helpful?