ZeroSDK

Session

Reference for the Session schema.

@packages/schema/session
export type  = {
  // required
  : string
  : string
  : string
  : "cancelled" | "completed" | "failed" | "idle" | "paused" | "pending" | "running" | "stuck" | "waiting"
  : number
  // optional
  ?: string
  ?: string
  ?: string
  ?: number
  // metadata
  ?: {
    ?: string
    ?: {
      : string
      : string
    }
    ?: {
      : number
      : string
    }
    ?: string
    ?: "build" | "data" | "debug" | "deploy" | "docs" | "explain" | "explore" | "plan" | "refactor" | "research" | "review" | "security" | "test"
    ?: string
  }
}

Sources

Each source's record of one agent's run. The OpenAI Agents SDK keeps a whole run, across the agents it hands off to, in RunState fields it marks internal, and the Vercel AI SDK keeps no record of a run.

Anomaly OpenCode

https://opencode.ai/v2/docs/api#session.get

@opencode/schema@2.1.3
type  = {
  ?: string
  : number
  ?: {
    readonly : string
    readonly :
      | { readonly : "before"; readonly : string }
      | { readonly : "through"; readonly : string }
  }
  : string
  : { readonly : string; readonly ?: string | undefined }
  ?: { readonly [: string]: Json }
  ?: {
    readonly : string
    readonly : string
    readonly ?: string | undefined
  }
  ?: "failed" | "interrupted" | "succeeded"
  ?: string
  ?: readonly {
    readonly : string
    readonly : string
    readonly : "allow" | "ask" | "deny"
  }[]
  : string
  ?: {
    readonly : string
    readonly ?: string | undefined
    readonly ?: string | undefined
    readonly ?:
      | readonly {
          readonly : string
          readonly : string
          readonly : number
          readonly : number
          readonly : "added" | "deleted" | "modified"
        }[]
      | undefined
  }
  ?: string
  : {
    readonly : number
    readonly : number
    readonly ?: number | undefined
    readonly ?: number | undefined
    readonly ?: number | undefined
  }
  ?: string
  : {
    readonly : number
    readonly : number
    readonly : number
    readonly : { readonly : number; readonly : number }
  }
}

Claude Agent SDK

https://code.claude.com/docs/en/agent-sdk/typescript#return-type-sdksessioninfo

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

https://code.claude.com/docs/en/agent-sdk/typescript#sdktaskstartedmessage

@anthropic-ai/claude-agent-sdk@0.3.308
type  = {
  ?: boolean
  : string
  ?: boolean
  ?: string
  ?: string
  ?: string
  : string
  ?: boolean
  ?: number
  ?: string
  : "task_started"
  : string
  ?: string
  ?: string
  : "system"
  : `${string}-${string}-${string}-${string}-${string}`
  ?: string
}

Claude Code

https://code.claude.com/docs/en/agent-view#list-sessions-as-json

@anthropic-ai/claude-code@2.1.308 · docs
type  = {
  
  ?
  
  ?
  ?
  ?
  
  ?
  ?
  ?
}

Cloudflare Agents

https://developers.cloudflare.com/agents/runtime/execution/agent-tools/#render-child-timelines-in-react

agents@0.30.0
type  = {
  : string
  ?: boolean
  ?: AgentToolDisplayMetadata
  ?: string
  ?: unknown
  ?: AgentToolMilestone[]
  : number
  ?: string
  : AgentToolRunPart[]
  ?: AgentToolProgressSnapshot
  ?: AgentToolInterruptedReason
  : string
  : "aborted" | "completed" | "error" | "interrupted" | "running"
  : { : string; : string }
  ?: string
}

Mastra

https://mastra.ai/reference/agent-controller/session#display-state

@mastra/core@1.79.0
type  = {
  : string
  ?: string
  ?: number
  ?: boolean
  ?: string
  ?: string
  ?: number
  : "completed" | "error" | "running"
  : string
  : string
  : { : string; : boolean }[]
}

OpenAI Codex

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

openai/codex@rust-v0.163.0 · schema
type  = {
  : string | null
  : string | null
  : string
  : number
  : string
  : boolean
  : string | null
  : GitInfo | null
  : ThreadHistoryMode
  : string
  : string | null
  : string
  : string | null
  : string | null
  : string | null
  : string | null
  : string
  : string | null
  : string | null
  : number | null
  : ThreadSection | null
  : number | null
  : string
  : SessionSource
  : ThreadStatus
  : string | null
  : Turn[]
  : number
}

Vercel eve

https://eve.dev/docs/reference/typescript-api#runtime-context-ctx

eve@0.82.0
type  = {
  : {
    readonly : string
    readonly : SessionAuth
    readonly : SessionTurn
    readonly ?: SessionParent | undefined
    readonly ?: SessionSchedule | undefined
    readonly ?: SessionPredecessor | undefined
  }
}

https://eve.dev/docs/reference/typescript-api#runtime-context-ctx

eve@0.82.0
type  = {
  : string
  : string
  : string
  : SessionTurn
}