{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elicit/json-schema/elicit-get-agent-session-artifact-content-response-schema.json",
  "title": "GetAgentSessionArtifactContentResponse",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elicit-openapi.json#/components/schemas/GetAgentSessionArtifactContentResponse",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "artifactId": {
          "type": "string",
          "description": "Opaque identifier for the interactive artifact, echoing the request. Can also be re-requested with ?format=<fmt> to download as a file (tables: csv/xlsx, prose: md)."
        },
        "title": {
          "type": "string",
          "description": "Human-readable title of the artifact."
        },
        "caption": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional caption describing the artifact."
        },
        "url": {
          "type": "string",
          "description": "URL to view the session in the Elicit web interface. Only the owner can continue it."
        },
        "kind": {
          "type": "string",
          "const": "table"
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Ordered column keys for the table, in first-seen order across the rows."
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "text": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Human-readable cell text with inline citation markup removed. Null when the cell has no text value."
                },
                "citations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "citationId": {
                        "type": "string",
                        "description": "Identifier for this citation within the agent message."
                      },
                      "reference": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The inline citation this entry resolves. It matches, character for character, a single reference token inside the `<citations>…</citations>` markup in the message text (one entry per token, after comma-separated tokens are split). Use it to map inline references in the text to this citation; use the `source` field to identify the underlying source. On artifact content it is the quote's index as it appears in the content's `<citations>` tokens (prose, presentation slides and figure descriptions expose these in `markdown`; table cells expose only stripped `text`, so their references can't be placed inline); trim whitespace around each token before matching, and ignore tokens with no matching citation (their quote was invalid). An artifact citation whose reference never appears in the markdown is not placed inline. `null` for citations with no inline reference (e.g. legacy quotes-array citations)."
                      },
                      "quote": {
                        "type": "string",
                        "description": "The passage from the source that supports the message."
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "sourceRef": {
                            "type": "string",
                            "description": "Opaque identifier for the underlying source, stable everywhere it appears in a session (message citations, table cells, and the cited-sources endpoint). Use it to deduplicate citations and to join a citation to its entry from the session's cited-sources endpoint, which additionally carries the abstract. Never a raw internal id; do not construct or decode it."
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Title of the cited work."
                          },
                          "authors": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Authors of the cited work, in display order."
                          },
                          "year": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Publication year."
                          },
                          "doi": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Digital Object Identifier (DOI), when available."
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Best available URL for the cited work."
                          },
                          "venue": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Journal, conference, repository, or other publication venue."
                          },
                          "citationCount": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Number of works citing this source, when known."
                          },
                          "fullTextAvailable": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "Whether the source's full text (rather than the abstract alone) is available. Null when the session recorded no verdict — most often on the events feed, which reports only what the session itself recorded. The cited-sources endpoint resolves those unknowns and is the reliable place to read this field."
                          },
                          "studyTypeTags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Study-design tags for the source, when classified (e.g. \"Randomized Controlled Trial\", \"Meta-Analysis\")."
                          },
                          "journalQuartile": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "minimum": 1,
                            "maximum": 4,
                            "description": "Journal ranking quartile from 1 (highest) to 4, when known."
                          },
                          "elicitId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Elicit's identifier for the source, when it is in the Elicit corpus."
                          }
                        },
                        "required": [
                          "sourceRef",
                          "title",
                          "authors",
                          "year",
                          "doi",
                          "url",
                          "venue",
                          "citationCount",
                          "fullTextAvailable",
                          "studyTypeTags",
                          "journalQuartile",
                          "elicitId"
                        ]
                      }
                    },
                    "required": [
                      "citationId",
                      "reference",
                      "quote",
                      "source"
                    ]
                  },
                  "description": "Citations backing this cell, resolved to the same shape as message citations."
                },
                "source": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "sourceRef": {
                      "type": "string",
                      "description": "Opaque identifier for the underlying source, stable everywhere it appears in a session (message citations, table cells, and the cited-sources endpoint). Use it to deduplicate citations and to join a citation to its entry from the session's cited-sources endpoint, which additionally carries the abstract. Never a raw internal id; do not construct or decode it."
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Title of the cited work."
                    },
                    "authors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Authors of the cited work, in display order."
                    },
                    "year": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Publication year."
                    },
                    "doi": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Digital Object Identifier (DOI), when available."
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best available URL for the cited work."
                    },
                    "venue": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Journal, conference, repository, or other publication venue."
                    },
                    "citationCount": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Number of works citing this source, when known."
                    },
                    "fullTextAvailable": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "Whether the source's full text (rather than the abstract alone) is available. Null when the session recorded no verdict — most often on the events feed, which reports only what the session itself recorded. The cited-sources endpoint resolves those unknowns and is the reliable place to read this field."
                    },
                    "studyTypeTags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Study-design tags for the source, when classified (e.g. \"Randomized Controlled Trial\", \"Meta-Analysis\")."
                    },
                    "journalQuartile": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1,
                      "maximum": 4,
                      "description": "Journal ranking quartile from 1 (highest) to 4, when known."
                    },
                    "elicitId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Elicit's identifier for the source, when it is in the Elicit corpus."
                    }
                  },
                  "required": [
                    "sourceRef",
                    "title",
                    "authors",
                    "year",
                    "doi",
                    "url",
                    "venue",
                    "citationCount",
                    "fullTextAvailable",
                    "studyTypeTags",
                    "journalQuartile",
                    "elicitId"
                  ],
                  "description": "The cited source when this cell is a resolved source reference; otherwise null."
                }
              },
              "required": [
                "text",
                "citations",
                "source"
              ]
            }
          },
          "description": "Table rows, each a mapping from column key to cell."
        }
      },
      "required": [
        "artifactId",
        "title",
        "caption",
        "url",
        "kind",
        "columns",
        "rows"
      ]
    },
    {
      "type": "object",
      "properties": {
        "artifactId": {
          "type": "string",
          "description": "Opaque identifier for the interactive artifact, echoing the request. Can also be re-requested with ?format=<fmt> to download as a file (tables: csv/xlsx, prose: md)."
        },
        "title": {
          "type": "string",
          "description": "Human-readable title of the artifact."
        },
        "caption": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional caption describing the artifact."
        },
        "url": {
          "type": "string",
          "description": "URL to view the session in the Elicit web interface. Only the owner can continue it."
        },
        "kind": {
          "type": "string",
          "const": "prose"
        },
        "content": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "description": "Human-readable content with inline citation markup removed."
            },
            "markdown": {
              "type": "string",
              "description": "The original markdown content, including inline `<citations>…</citations>` markup wrapping one or more comma-separated reference tokens; split them, trim whitespace, and match each token against `citations[].reference` to place the citation inline. Ignore tokens that match no citation."
            },
            "citations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "citationId": {
                    "type": "string",
                    "description": "Identifier for this citation within the agent message."
                  },
                  "reference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The inline citation this entry resolves. It matches, character for character, a single reference token inside the `<citations>…</citations>` markup in the message text (one entry per token, after comma-separated tokens are split). Use it to map inline references in the text to this citation; use the `source` field to identify the underlying source. On artifact content it is the quote's index as it appears in the content's `<citations>` tokens (prose, presentation slides and figure descriptions expose these in `markdown`; table cells expose only stripped `text`, so their references can't be placed inline); trim whitespace around each token before matching, and ignore tokens with no matching citation (their quote was invalid). An artifact citation whose reference never appears in the markdown is not placed inline. `null` for citations with no inline reference (e.g. legacy quotes-array citations)."
                  },
                  "quote": {
                    "type": "string",
                    "description": "The passage from the source that supports the message."
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "sourceRef": {
                        "type": "string",
                        "description": "Opaque identifier for the underlying source, stable everywhere it appears in a session (message citations, table cells, and the cited-sources endpoint). Use it to deduplicate citations and to join a citation to its entry from the session's cited-sources endpoint, which additionally carries the abstract. Never a raw internal id; do not construct or decode it."
                      },
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Title of the cited work."
                      },
                      "authors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Authors of the cited work, in display order."
                      },
                      "year": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Publication year."
                      },
                      "doi": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Digital Object Identifier (DOI), when available."
                      },
                      "url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Best available URL for the cited work."
                      },
                      "venue": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Journal, conference, repository, or other publication venue."
                      },
                      "citationCount": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Number of works citing this source, when known."
                      },
                      "fullTextAvailable": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Whether the source's full text (rather than the abstract alone) is available. Null when the session recorded no verdict — most often on the events feed, which reports only what the session itself recorded. The cited-sources endpoint resolves those unknowns and is the reliable place to read this field."
                      },
                      "studyTypeTags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Study-design tags for the source, when classified (e.g. \"Randomized Controlled Trial\", \"Meta-Analysis\")."
                      },
                      "journalQuartile": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 1,
                        "maximum": 4,
                        "description": "Journal ranking quartile from 1 (highest) to 4, when known."
                      },
                      "elicitId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Elicit's identifier for the source, when it is in the Elicit corpus."
                      }
                    },
                    "required": [
                      "sourceRef",
                      "title",
                      "authors",
                      "year",
                      "doi",
                      "url",
                      "venue",
                      "citationCount",
                      "fullTextAvailable",
                      "studyTypeTags",
                      "journalQuartile",
                      "elicitId"
                    ]
                  }
                },
                "required": [
                  "citationId",
                  "reference",
                  "quote",
                  "source"
                ]
              },
              "description": "Citations backing this content, resolved to the same shape as message citations."
            }
          },
          "required": [
            "text",
            "markdown",
            "citations"
          ]
        }
      },
      "required": [
        "artifactId",
        "title",
        "caption",
        "url",
        "kind",
        "content"
      ]
    },
    {
      "type": "object",
      "properties": {
        "artifactId": {
          "type": "string",
          "description": "Opaque identifier for the interactive artifact, echoing the request. Can also be re-requested with ?format=<fmt> to download as a file (tables: csv/xlsx, prose: md)."
        },
        "title": {
          "type": "string",
          "description": "Human-readable title of the artifact."
        },
        "caption": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional caption describing the artifact."
        },
        "url": {
          "type": "string",
          "description": "URL to view the session in the Elicit web interface. Only the owner can continue it."
        },
        "kind": {
          "type": "string",
          "const": "presentation"
        },
        "slides": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "Slide title."
              },
              "content": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Human-readable content with inline citation markup removed."
                  },
                  "markdown": {
                    "type": "string",
                    "description": "The original markdown content, including inline `<citations>…</citations>` markup wrapping one or more comma-separated reference tokens; split them, trim whitespace, and match each token against `citations[].reference` to place the citation inline. Ignore tokens that match no citation."
                  },
                  "citations": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "citationId": {
                          "type": "string",
                          "description": "Identifier for this citation within the agent message."
                        },
                        "reference": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The inline citation this entry resolves. It matches, character for character, a single reference token inside the `<citations>…</citations>` markup in the message text (one entry per token, after comma-separated tokens are split). Use it to map inline references in the text to this citation; use the `source` field to identify the underlying source. On artifact content it is the quote's index as it appears in the content's `<citations>` tokens (prose, presentation slides and figure descriptions expose these in `markdown`; table cells expose only stripped `text`, so their references can't be placed inline); trim whitespace around each token before matching, and ignore tokens with no matching citation (their quote was invalid). An artifact citation whose reference never appears in the markdown is not placed inline. `null` for citations with no inline reference (e.g. legacy quotes-array citations)."
                        },
                        "quote": {
                          "type": "string",
                          "description": "The passage from the source that supports the message."
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "sourceRef": {
                              "type": "string",
                              "description": "Opaque identifier for the underlying source, stable everywhere it appears in a session (message citations, table cells, and the cited-sources endpoint). Use it to deduplicate citations and to join a citation to its entry from the session's cited-sources endpoint, which additionally carries the abstract. Never a raw internal id; do not construct or decode it."
                            },
                            "title": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Title of the cited work."
                            },
                            "authors": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Authors of the cited work, in display order."
                            },
                            "year": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Publication year."
                            },
                            "doi": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Digital Object Identifier (DOI), when available."
                            },
                            "url": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Best available URL for the cited work."
                            },
                            "venue": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Journal, conference, repository, or other publication venue."
                            },
                            "citationCount": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "description": "Number of works citing this source, when known."
                            },
                            "fullTextAvailable": {
                              "type": [
                                "boolean",
                                "null"
                              ],
                              "description": "Whether the source's full text (rather than the abstract alone) is available. Null when the session recorded no verdict — most often on the events feed, which reports only what the session itself recorded. The cited-sources endpoint resolves those unknowns and is the reliable place to read this field."
                            },
                            "studyTypeTags": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Study-design tags for the source, when classified (e.g. \"Randomized Controlled Trial\", \"Meta-Analysis\")."
                            },
                            "journalQuartile": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "minimum": 1,
                              "maximum": 4,
                              "description": "Journal ranking quartile from 1 (highest) to 4, when known."
                            },
                            "elicitId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Elicit's identifier for the source, when it is in the Elicit corpus."
                            }
                          },
                          "required": [
                            "sourceRef",
                            "title",
                            "authors",
                            "year",
                            "doi",
                            "url",
                            "venue",
                            "citationCount",
                            "fullTextAvailable",
                            "studyTypeTags",
                            "journalQuartile",
                            "elicitId"
                          ]
                        }
                      },
                      "required": [
                        "citationId",
                        "reference",
                        "quote",
                        "source"
                      ]
                    },
                    "description": "Citations backing this content, resolved to the same shape as message citations."
                  }
                },
                "required": [
                  "text",
                  "markdown",
                  "citations"
                ]
              },
              "speakerNotes": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Speaker notes, when present."
              }
            },
            "required": [
              "title",
              "content",
              "speakerNotes"
            ]
          },
          "description": "Ordered slides, each with a title and supported content."
        }
      },
      "required": [
        "artifactId",
        "title",
        "caption",
        "url",
        "kind",
        "slides"
      ]
    },
    {
      "type": "object",
      "properties": {
        "artifactId": {
          "type": "string",
          "description": "Opaque identifier for the interactive artifact, echoing the request. Can also be re-requested with ?format=<fmt> to download as a file (tables: csv/xlsx, prose: md)."
        },
        "title": {
          "type": "string",
          "description": "Human-readable title of the artifact."
        },
        "caption": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional caption describing the artifact."
        },
        "url": {
          "type": "string",
          "description": "URL to view the session in the Elicit web interface. Only the owner can continue it."
        },
        "kind": {
          "type": "string",
          "const": "figure"
        },
        "description": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string",
              "description": "Human-readable content with inline citation markup removed."
            },
            "markdown": {
              "type": "string",
              "description": "The original markdown content, including inline `<citations>…</citations>` markup wrapping one or more comma-separated reference tokens; split them, trim whitespace, and match each token against `citations[].reference` to place the citation inline. Ignore tokens that match no citation."
            },
            "citations": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "citationId": {
                    "type": "string",
                    "description": "Identifier for this citation within the agent message."
                  },
                  "reference": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The inline citation this entry resolves. It matches, character for character, a single reference token inside the `<citations>…</citations>` markup in the message text (one entry per token, after comma-separated tokens are split). Use it to map inline references in the text to this citation; use the `source` field to identify the underlying source. On artifact content it is the quote's index as it appears in the content's `<citations>` tokens (prose, presentation slides and figure descriptions expose these in `markdown`; table cells expose only stripped `text`, so their references can't be placed inline); trim whitespace around each token before matching, and ignore tokens with no matching citation (their quote was invalid). An artifact citation whose reference never appears in the markdown is not placed inline. `null` for citations with no inline reference (e.g. legacy quotes-array citations)."
                  },
                  "quote": {
                    "type": "string",
                    "description": "The passage from the source that supports the message."
                  },
                  "source": {
                    "type": "object",
                    "properties": {
                      "sourceRef": {
                        "type": "string",
                        "description": "Opaque identifier for the underlying source, stable everywhere it appears in a session (message citations, table cells, and the cited-sources endpoint). Use it to deduplicate citations and to join a citation to its entry from the session's cited-sources endpoint, which additionally carries the abstract. Never a raw internal id; do not construct or decode it."
                      },
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Title of the cited work."
                      },
                      "authors": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Authors of the cited work, in display order."
                      },
                      "year": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Publication year."
                      },
                      "doi": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Digital Object Identifier (DOI), when available."
                      },
                      "url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Best available URL for the cited work."
                      },
                      "venue": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Journal, conference, repository, or other publication venue."
                      },
                      "citationCount": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "description": "Number of works citing this source, when known."
                      },
                      "fullTextAvailable": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Whether the source's full text (rather than the abstract alone) is available. Null when the session recorded no verdict — most often on the events feed, which reports only what the session itself recorded. The cited-sources endpoint resolves those unknowns and is the reliable place to read this field."
                      },
                      "studyTypeTags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Study-design tags for the source, when classified (e.g. \"Randomized Controlled Trial\", \"Meta-Analysis\")."
                      },
                      "journalQuartile": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 1,
                        "maximum": 4,
                        "description": "Journal ranking quartile from 1 (highest) to 4, when known."
                      },
                      "elicitId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Elicit's identifier for the source, when it is in the Elicit corpus."
                      }
                    },
                    "required": [
                      "sourceRef",
                      "title",
                      "authors",
                      "year",
                      "doi",
                      "url",
                      "venue",
                      "citationCount",
                      "fullTextAvailable",
                      "studyTypeTags",
                      "journalQuartile",
                      "elicitId"
                    ]
                  }
                },
                "required": [
                  "citationId",
                  "reference",
                  "quote",
                  "source"
                ]
              },
              "description": "Citations backing this content, resolved to the same shape as message citations."
            }
          },
          "required": [
            "text",
            "markdown",
            "citations"
          ]
        },
        "renderer": {
          "type": [
            "string",
            "null"
          ],
          "description": "Figure renderer, when known."
        },
        "spec": {
          "type": [
            "string",
            "null"
          ],
          "description": "Figure spec, when known."
        }
      },
      "required": [
        "artifactId",
        "title",
        "caption",
        "url",
        "kind",
        "description",
        "renderer",
        "spec"
      ]
    }
  ]
}