ZeroSDK

Message

Reference for the Message schema.

@packages/schema/message
export type  = {
  // required
  : 
  : string
  : string
  : number
  : string
  // optional
  ?: string
  ?: string
  ?: number
}

Sources

Each source's record of one message in a conversation. Claude Code keeps its own as lines of a transcript file whose format it calls internal, and Vercel eve keeps no public record of one.

Anomaly OpenCode

https://opencode.ai/v2/docs/api

@opencode/schema@2.1.3
type  = {
  : string & <"Session.Message.ID">
  ?: { readonly [: string]: unknown }
  :
    | { readonly : Utc }
    | {
        readonly : Utc
        readonly ?: Utc | undefined
        readonly ?: Utc | undefined
      }
    | { readonly : Utc }
    | { readonly : Utc }
    | { readonly : Utc }
    | { readonly : Utc }
    | { readonly : Utc }
    | { readonly : Utc }
    | { readonly : Utc; readonly ?: Utc | undefined }
    | { readonly : Utc }
    | { readonly : Utc }
    | { readonly : Utc }
    | { readonly : Utc }
  :
    | "agent-switched"
    | "assistant"
    | "compaction"
    | "idle"
    | "location-switched"
    | "model-switched"
    | "shell"
    | "skill"
    | "synthetic"
    | "system"
    | "user"
}

Claude Agent SDK

https://code.claude.com/docs/en/agent-sdk/session-storage#the-sessionstore-interface

@anthropic-ai/claude-agent-sdk@0.3.308
type  = {
  ?: string
  : string
  ?: string
}

Cloudflare Agents

https://developers.cloudflare.com/agents/

agents@0.30.0
type  = {
  ?: 
  : string
  ?: unknown
  : SessionMessagePart[]
  : string
}

Mastra

https://mastra.ai/docs/memory/overview

@mastra/core@1.79.0
type  = {
  : MastraMessageContentV2
  : 
  : string
  ?: string
  : "assistant" | "signal" | "system" | "user"
  ?: string
  ?: string
}

OpenAI Agents SDK

https://openai.github.io/openai-agents-js/guides/sessions/

@openai/agents-core@0.21.0
type  = {
  ?: string
  ?: <string, any>
  ?:
    | "apply_patch_call"
    | "apply_patch_call_output"
    | "compaction"
    | "computer_call"
    | "computer_call_result"
    | "function_call"
    | "function_call_result"
    | "hosted_tool_call"
    | "message"
    | "program"
    | "program_output"
    | "reasoning"
    | "shell_call"
    | "shell_call_output"
    | "tool_search_call"
    | "tool_search_output"
    | "unknown"
}

OpenAI Codex

https://learn.chatgpt.com/docs/app-server#threads

openai/codex@rust-v0.163.0 · schema
type  = {
  : number | null
  : ThreadItem
  : number | null
  : string
}

Vercel AI SDK

https://ai-sdk.dev/docs/ai-sdk-ui/chatbot-message-persistence

ai@7.0.148
type  = {
  : string
  ?: unknown
  : <UIDataTypes, UITools>[]
  : "assistant" | "system" | "user"
}