{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/plusai-com/json-schema/plusai-com-agent-session-schema.json",
  "title": "AgentSession",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/plusai-com-openapi.json#/components/schemas/AgentSession",
  "properties": {
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "lastAssistantMessage": {
      "description": "The agent's latest reply in the current turn, once it has ended. Null for sessions not created through this API (e.g. the web app's or the PowerPoint add-in's chats).",
      "type": [
        "string",
        "null"
      ]
    },
    "pdfUrl": {
      "description": "Download URL for the generated PDF (populated when finished).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "pptxUrl": {
      "description": "Download URL for the generated PPTX (populated when finished).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "sessionId": {
      "type": "string"
    },
    "stalled": {
      "description": "The current turn can no longer finish (it never started, or stopped\nmaking progress). Stop polling it; posting a new message replaces\nthe stalled turn.\n",
      "type": "boolean"
    },
    "status": {
      "description": "The status of the current turn: `READY`, `RUNNING` and\n`PENDING_TOOL_CALLS` are in progress; `IDLE` means the turn\nfinished and the session is waiting for the next message.\n",
      "enum": [
        "READY",
        "IDLE",
        "RUNNING",
        "PENDING_TOOL_CALLS",
        "DONE",
        "INTERRUPTED",
        "FAILED"
      ],
      "type": "string"
    },
    "statusMessage": {
      "description": "A description of the current status, e.g. why the turn failed.",
      "type": [
        "string",
        "null"
      ]
    },
    "thumbnailUrl": {
      "description": "Download URL for a thumbnail image (populated when finished).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "turn": {
      "description": "The conversation turn the session is on: 0 for the prompt it was\ncreated with, then one more for each message posted to it.\n",
      "minimum": 0,
      "type": "integer"
    },
    "turnCreditsUsed": {
      "description": "AI agent credits the current turn has used so far.",
      "type": [
        "number",
        "null"
      ]
    },
    "turnPptxUrl": {
      "description": "Download URL for the presentation as of the end of the current\nturn (populated once the turn is finished). `pptxUrl` is always the\nlatest version.\n",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "sessionId",
    "status",
    "turn",
    "stalled"
  ],
  "type": "object"
}