[Set up threads | 🦜️🛠️ LangSmith](https://docs.smith.langchain.com/observability/how_to_guides/threads): LLM should read this page when it needs to track multi-turn conversations or chatbot-like interactions, it needs to group related traces into threads, it needs to continue an existing conversation thread. This page explains how to associate traces together into threads using metadata keys like 'session_id' or 'thread_id', provides code examples for setting up threads in Python and TypeScript, and shows how to view conversation histories grouped into threads in the LangSmith UI.

