Create conversation

createConversation(input: CreateConversationInput!): Conversation!

Requires project.conversations.create.

Arguments

ArgumentTypeRequired
inputCreateConversationInput!Yes

Input fields

input

CreateConversationInput

FieldTypeRequiredDescription
projectReferenceStringNo
typeStringNo
titleStringNo
metadataJSONNo
idempotencyKeyStringNoRetrying with the same key and the same input returns the same conversation; a different input fails with IDEMPOTENCY_CONFLICT.
initialMessageCreateConversationInitialMessageInputNoA first user message stored atomically with the conversation.

Response

Returns Conversation!. Open the type for its fields and nested types.

FieldTypeDescription
idID!
projectIdID
respondingAgentIdStringAgent currently responding in the conversation, or null when no agent has responded.
typeString!
titleString
summaryString
statusString!
currentNodeID

All fields of Conversation.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateConversation($input: CreateConversationInput!) {
  createConversation(input: $input) {
    id
    projectId
    status
    createdAt
    updatedAt
  }
}
json
{
  "input": {
    "projectReference": "example-project"
  }
}