Skip to content

Message

角色

Message 是面向查询和 UI 的稳定读模型,不等同于 runtime 的原始输出事件。

消息分类

  • input
    • 用户或系统输入原文
  • projection
    • 由输出事件投影得到的 assistant、reasoning、tool、activity 视图

角色集合

  • system
  • user
  • assistant
  • reasoning
  • tool
  • activity

规范要求

  • 输入消息 MUST 保留原始意图,不可被投影覆盖
  • 输出消息 MUST 指向其来源事件范围或至少可追溯到事件流位置
  • 同一 run / thread 下,消息列表 MUST 提供稳定排序
  • 消息查询 MUST 支持按 runId 和可选 threadId 过滤

Message Record 最小字段

  • id
  • runId
  • threadId
  • messageId
  • role
  • source
  • sequence
  • sortAt
  • message
  • metadata

Generated from spec source.