← All types
Ob Object

ChatMessageState

A single message in a chat session

Fields

Unique message identifier

Message role (user, assistant, system)

Possible values (4)
USER

Message from the user

ASSISTANT

Message from the AI assistant

SYSTEM

System message (instructions)

TOOL

Tool results returned to the model (hidden from the conversation)

Plain text content

Structured custom app content (for app dev context)

Tool calls made during this message (assistant messages only)

Input tokens used for this message (assistant messages only)

Output tokens generated for this message (assistant messages only)

OPS: the tools the assistant ran in this message, in call order

OPS: the tool calls this message proposed, in call order

OPS: the personal to-dos this message suggested, in call order

OPS: the outcome this message suggested for the conversation's task (the latest, when there were several)

Message creation timestamp (ISO8601)

Referenced by (2)
Exact type SDL
"""A single message in a chat session"""
type ChatMessageState {
  """Unique message identifier"""
  id: ChatMessageID!
  """Message role (user, assistant, system)"""
  role: ChatMessageRole!
  """Plain text content"""
  content: String
  """Structured custom app content (for app dev context)"""
  customAppContent: CustomAppContent
  """Tool calls made during this message (assistant messages only)"""
  toolCalls: [ChatToolCall!]
  """Input tokens used for this message (assistant messages only)"""
  inputTokens: Int
  """Output tokens generated for this message (assistant messages only)"""
  outputTokens: Int
  """OPS: the tools the assistant ran in this message, in call order"""
  toolSteps: [ChatToolStep!]
  """OPS: the tool calls this message proposed, in call order"""
  toolProposals: [ToolCallProposal!]
  """OPS: the personal to-dos this message suggested, in call order"""
  todoSuggestions: [TodoSuggestion!]
  """
  OPS: the outcome this message suggested for the conversation's task (the latest, when there were several)
  """
  outcomeSuggestion: OutcomeSuggestion
  """Message creation timestamp (ISO8601)"""
  createdAt: ISO8601!
}