Create Conversation
Generates a unique identifier for a conversation under which LLM history, target documents, user queries, and other data can be tracked.
Quick Start
To get started:
- Add the Create Conversation block to your flow
- The block will generate a unique
conversation_id - Use this ID in subsequent LLM blocks to maintain conversation context
Configuration
This block requires minimal configuration. It automatically generates a unique conversation identifier.
Common Input Format
No input payload is required. The block generates the conversation ID automatically.
Common Output Format
msg.payload (object)
msg.payload contains the generated conversation identifier.
Example: {"conversation_id": "conv_abc123xyz"}
Example
Input (msg.payload)
{}Output (msg.payload)
{
"conversation_id": "conv_abc123xyz"
}Usage in Flows
Use the generated conversation_id in downstream blocks:
- Pass it to LLM Query v2 via
msg.payload.conversation_idto track conversation history - Pass it to Fetch History to retrieve previous exchanges
- Use it to associate documents and queries with a specific conversation
Errors
When the block fails, it raises an error. Use a Catch block in your flow to handle failures and inspect the error payload.
Common mistakes
- Not passing conversation_id downstream: Ensure subsequent blocks receive the
conversation_idto maintain context. - Creating new conversations unnecessarily: Reuse existing
conversation_idvalues to continue conversations.
Best Practices
- Create a conversation at the start of a user session or chat flow
- Store the
conversation_idif you need to resume conversations later - Use meaningful flow variable names when storing the conversation ID