Conversations Overview
The Conversations API allows you to create, manage, and interact with conversation threads in the IndexSDK system. Conversations serve as the container for chat interactions between users and AI agents.
Architecture
Conversations are domain-scoped entities that track chat interactions. Each conversation is associated with:
- A
domain(group_name) that identifies the tenant - A
user_idthat identifies the user - A
conversation_idthat uniquely identifies the conversation - A
contextobject that stores user information and metadata - Messages exchanged within the conversation
Authentication Flow
Before creating conversations, you must authenticate using the Client Credentials API to obtain an auth token. This token is then used to authenticate requests to conversation endpoints.
Key Concepts
Conversation Creation
When you create a conversation using sync-conversation:
- A new conversation is created with a unique
conversation_id - If a
contextis provided, it's stored with the conversation - If a greeting message is configured for the domain, it's automatically created as the first message
- The greeting message can include personalized content based on user context (e.g., user's first name)
Conversation Context
The context object allows you to store user information and metadata with the conversation:
- User details (first_name, last_name, etc.)
- Custom metadata
- Session information
This context can be updated throughout the conversation lifecycle.
Conversation Deletion
Conversations can be deleted by setting is_delete: true in the sync-conversation request along with the conversation_id.
Next Steps
- Sync Conversation API - Complete API reference for creating and managing conversations
- Authentication Overview - Learn about authentication requirements