> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperspell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query memories

> Retrieves documents matching the query.



## OpenAPI

````yaml https://app.stainlessapi.com/api/spec/documented/hyperspell.yaml post /memories/query
openapi: 3.1.0
info:
  title: Hyperspell API
  summary: >-
    Hyperspell is the memory layer for AI apps and agents. Through the API, you
    can add memories, connect data sources to index them in real-time, and
    search memories with our natural language query engine.
  termsOfService: https://hyperspell.com/blog/tos
  contact:
    name: Hyperspell
    url: https://hyperspell.com/
    email: hello@hyperspell.com
  version: 0.32.1
servers:
  - url: https://api.hyperspell.com
    description: Production
security:
  - APIKey: []
    AsUser: []
paths:
  /memories/query:
    post:
      tags:
        - Memories
      summary: Query memories
      description: Retrieves documents matching the query.
      operationId: query_memories_memories_query_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKey: []
        - AsUser: []
        - FlagOverride: []
        - DefaultSources: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Hyperspell from '@hyperspell/hyperspell';


            const client = new Hyperspell({
              apiKey: process.env['HYPERSPELL_API_KEY'], // This is the default and can be omitted
            });


            const queryResult = await client.memories.search({ query: 'What does
            Hyperspell do?' });


            console.log(queryResult.query_id);
        - lang: Python
          source: |-
            import os
            from hyperspell import Hyperspell

            client = Hyperspell(
                api_key=os.environ.get("HYPERSPELL_API_KEY"),  # This is the default and can be omitted
            )
            query_result = client.memories.search(
                query="What does Hyperspell do?",
            )
            print(query_result.query_id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/hyperspell/hyperspell-go\"\n\t\"github.com/hyperspell/hyperspell-go/option\"\n)\n\nfunc main() {\n\tclient := hyperspell.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tqueryResult, err := client.Memories.Search(context.TODO(), hyperspell.MemorySearchParams{\n\t\tQuery: \"What does Hyperspell do?\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", queryResult.QueryID)\n}\n"
        - lang: CLI
          source: |-
            hyperspell memories search \
              --api-key 'My API Key' \
              --query 'What does Hyperspell do?'
components:
  schemas:
    QueryRequest:
      properties:
        query:
          type: string
          title: Query
          description: Query to run.
        answer:
          type: boolean
          title: Answer
          description: >-
            If true, the query will be answered along with matching source
            documents.
          default: false
        provenance:
          type: boolean
          title: Provenance
          description: >-
            If true (effort='very_high' only), attach a provenance record to the
            response: the source documents and entities the answer was grounded
            in, the agent's search trajectory, and any sources that failed. Adds
            one indexed lookup; intended for auditability / compliance use
            cases.
          default: false
        cross_user:
          type: boolean
          title: Cross User
          description: >-
            Alpha: opt this agentic query into cross-user scope. Requires the
            app admin to have enabled cross-user retrieval in the app's
            settings, the 'brain-cross-user-agentic-alpha' flag on the app, a
            per-user token, an agentic effort tier ('medium' or 'high'), and
            answer=true. Matching documents are never returned in this mode —
            the only output is the synthesized answer, passed through the app's
            category filter and accompanied by a privacy disclaimer. If any
            requirement is missing the query runs user-scoped and a notice is
            added to errors.
          default: false
        effort:
          $ref: '#/components/schemas/EffortLevel'
          description: >-
            How much compute to spend on retrieval. Mirrors the dial popularized
            by frontier-model APIs (OpenAI reasoning_effort, etc.). 'minimal' =
            verbatim single-shot retrieval (fastest). 'low' = LLM rewrites the
            query for better retrieval and extracts date filters. 'medium' =
            rewrite + agentic refinement loop (the answer LLM may request
            additional retrieval rounds, up to 3). 'high' = rewrite + extended
            refinement (up to 6 rounds). Higher = better recall, more latency,
            more cost.
          default: minimal
        sources:
          items:
            $ref: '#/components/schemas/DocumentProviders'
          type: array
          title: Sources
          description: >-
            Only query documents from these sources. Names are case-insensitive
            and accept either separator, so `Google Drive`'s provider may be
            given as `google_drive`, `google-drive`, or `GOOGLE_DRIVE`.
        options:
          $ref: '#/components/schemas/QueryOptions'
          description: Search options for the query.
        max_results:
          type: integer
          maximum: 200
          minimum: 1
          title: Max Results
          description: Maximum number of results to return.
          default: 10
          deprecated: true
      type: object
      required:
        - query
      title: QueryRequest
      examples:
        - answer: true
          options:
            filter: {}
          query: What does Hyperspell do?
          sources:
            - vault
    QueryResult:
      properties:
        query_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Query Id
          description: >-
            The ID of the query. This can be used to retrieve the query later,
            or add feedback to it. If the query failed, this will be None.
        errors:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          title: Errors
          description: >-
            Errors that occurred during the query. These are meant to help the
            developer debug the query, and are not meant to be shown to the
            user.
        documents:
          items:
            $ref: '#/components/schemas/ScoredDocumentResponse'
          type: array
          title: Documents
          description: >-
            The matching documents, each carrying its hyperdoc tree plus
            query-path score/highlights/summary (ENG-2479 Phase 4).
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
          description: The answer to the query, if the request was set to answer.
        disclaimer:
          anyOf:
            - type: string
            - type: 'null'
          title: Disclaimer
          description: >-
            Privacy notice, set when the query ran in cross-user alpha mode: the
            answer may draw on other members' data and category filtering is
            best-effort. Show this to the end user alongside the answer.
        provenance:
          anyOf:
            - $ref: '#/components/schemas/Provenance'
            - type: 'null'
          description: >-
            Auditability record (source documents, entities, search trajectory,
            failed sources), if the request set provenance=True on a very_high
            query.
        citations:
          anyOf:
            - items:
                $ref: '#/components/schemas/CitationCandidate'
              type: array
            - type: 'null'
          title: Citations
          description: >-
            Sources the answer cites, in first-mention order. Each entry
            resolves an inline [SRC-n] marker in the answer text to the source
            document it refers to. Present only when the answer-citations flag
            is on for the app and the answer actually cited something.
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
          description: The average score of the query feedback, if any.
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: The query string that was issued.
      type: object
      title: QueryResult
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EffortLevel:
      type: string
      enum:
        - minimal
        - low
        - medium
        - high
        - very_high
      title: EffortLevel
      description: |-
        How much compute the retrieval pipeline should spend on this query.

        Mirrors the convention popularized by OpenAI's reasoning_effort and
        similar dials on Anthropic / Gemini APIs. ``minimal`` is the cheapest
        and fastest path; ``high`` does the most. Tiers map to behavior via
        ``EFFORT_CONFIG``.
    DocumentProviders:
      type: string
      enum:
        - reddit
        - notion
        - slack
        - google_calendar
        - google_mail
        - google_meet
        - box
        - dropbox
        - github
        - gitlab
        - google_drive
        - vault
        - web_crawler
        - trace
        - microsoft_teams
        - granola
        - fathom
        - fireflies
        - linear
        - hubspot
        - salesforce
        - coda
        - confluence
        - jira
        - lightfield
        - gong
        - pylon
        - clickup
      title: DocumentProviders
    QueryOptions:
      properties:
        after:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: After
          description: Only query documents created on or after this date.
        before:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Before
          description: Only query documents created before this date.
        filter:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Filter
          description: >-
            Metadata filters using MongoDB-style operators. Example: {'status':
            'published', 'priority': {'$gt': 3}}
        resource_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Resource Ids
          description: >-
            Only return results from these specific resource IDs. Useful for
            scoping searches to specific documents (e.g., a specific email
            thread or uploaded file).
        memory_types:
          items:
            $ref: '#/components/schemas/MemoryType'
          type: array
          title: Memory Types
          description: >-
            Filter by memory type. Defaults to generic memories only. Pass
            multiple types to include procedures, etc.
        recency_half_life_days:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Recency Half Life Days
          description: >-
            When set, multiplies each result's score by an exponential-decay
            factor based on the document's most recent activity timestamp
            (source-reported last_modified, falling back to document_date). A
            document one half-life old gets its score halved. Resources with no
            recency timestamp are passed through unchanged. Leave unset to
            disable.
        vault:
          $ref: '#/components/schemas/VaultSearchOptions'
          description: Search options for vault
        notion:
          $ref: '#/components/schemas/NotionSearchOptions'
          description: Search options for Notion
        web_crawler:
          $ref: '#/components/schemas/WebCrawlerSearchOptions'
          description: Search options for Web Crawler
        slack:
          $ref: '#/components/schemas/SlackSearchOptions'
          description: Search options for Slack
        google_drive:
          $ref: '#/components/schemas/GoogleDriveSearchOptions'
          description: Search options for Google Drive
        google_mail:
          $ref: '#/components/schemas/GmailSearchOptions'
          description: Search options for Gmail
        max_results:
          type: integer
          maximum: 200
          minimum: 1
          title: Max Results
          description: Maximum number of results to return.
          default: 10
        answer_model:
          $ref: '#/components/schemas/AnswerModel'
          description: Model to use for answer generation when answer=True
      type: object
      title: QueryOptions
    ScoredDocumentResponse:
      properties:
        resource_id:
          type: string
          title: Resource Id
        source:
          $ref: '#/components/schemas/DocumentProviders'
        type:
          type: string
          title: Type
          description: >-
            Hyperdoc document type discriminator (document, message, file,
            event, ...).
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Human-readable document title.
        status:
          anyOf:
            - $ref: '#/components/schemas/DocumentStatus'
            - type: 'null'
          description: Indexing status of the document.
        collection:
          anyOf:
            - type: string
            - type: 'null'
          title: Collection
          description: The document's collection, if any.
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Filterable custom metadata attached to the document.
        ingested_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ingested At
          description: When Hyperspell first indexed the document.
        last_modified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Modified At
          description: When the source document was last modified.
        document_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Document Date
          description: The document's own date (e.g. email sent date, event date).
        document:
          oneOf:
            - $ref: '#/components/schemas/Document'
            - $ref: '#/components/schemas/Website'
            - $ref: '#/components/schemas/Task'
            - $ref: '#/components/schemas/Person'
            - $ref: '#/components/schemas/Message'
            - $ref: '#/components/schemas/Event'
            - $ref: '#/components/schemas/File'
            - $ref: '#/components/schemas/Conversation'
            - $ref: '#/components/schemas/Trace'
            - $ref: '#/components/schemas/Transcript'
            - $ref: '#/components/schemas/Company'
            - $ref: '#/components/schemas/Deal'
          title: Document
          description: >-
            The full hyperdoc tree. Switch on `type` for the document frame and
            recurse `children` for the body — see the `<Hyperdoc />` renderer.
          discriminator:
            propertyName: type
            mapping:
              company:
                $ref: '#/components/schemas/Company'
              conversation:
                $ref: '#/components/schemas/Conversation'
              deal:
                $ref: '#/components/schemas/Deal'
              document:
                $ref: '#/components/schemas/Document'
              event:
                $ref: '#/components/schemas/Event'
              file:
                $ref: '#/components/schemas/File'
              message:
                $ref: '#/components/schemas/Message'
              person:
                $ref: '#/components/schemas/Person'
              task:
                $ref: '#/components/schemas/Task'
              trace:
                $ref: '#/components/schemas/Trace'
              transcript:
                $ref: '#/components/schemas/Transcript'
              website:
                $ref: '#/components/schemas/Website'
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
          description: Relevance of the document to the query.
        highlights:
          items:
            $ref: '#/components/schemas/Highlight'
          type: array
          title: Highlights
          description: >-
            The matched chunks that made this document a hit, with per-chunk
            scores.
        summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Summary
          description: Concatenated text of the matched highlights.
      type: object
      required:
        - resource_id
        - source
        - type
        - document
      title: ScoredDocumentResponse
      description: >-
        A `DocumentResponse` plus the query-path fields a `ScoredDocument`
        carries

        (ENG-2479): relevance score, matched highlights, and the concatenated

        summary of those highlights.
    Provenance:
      properties:
        sources:
          items:
            $ref: '#/components/schemas/ProvenanceSource'
          type: array
          title: Sources
        entities:
          items:
            $ref: '#/components/schemas/ProvenanceEntity'
          type: array
          title: Entities
        failed_sources:
          items:
            type: string
          type: array
          title: Failed Sources
        steps:
          items:
            $ref: '#/components/schemas/ProvenanceStep'
          type: array
          title: Steps
      type: object
      title: Provenance
      description: >-
        Auditability record attached to an agentic answer.


        Gated behind ``provenance=true`` on the request: the cheap parts
        (sources,

        steps, failed_sources) are derived from in-memory loop state, but
        ``entities``

        costs one indexed DB lookup, so the whole record is only built on
        request.
    CitationCandidate:
      properties:
        source:
          $ref: '#/components/schemas/DocumentProviders'
        resource_id:
          type: string
          minLength: 1
          title: Resource Id
        owner:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner
        chunk_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chunk Id
        span:
          anyOf:
            - prefixItems:
                - type: integer
                - type: integer
              type: array
              maxItems: 2
              minItems: 2
            - type: 'null'
          title: Span
        content_sha256:
          anyOf:
            - type: string
              pattern: ^[0-9a-f]{64}$
            - type: 'null'
          title: Content Sha256
        ref:
          type: string
          title: Ref
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        speakers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Speakers
      type: object
      required:
        - source
        - resource_id
        - ref
      title: CitationCandidate
      description: >-
        One manifest entry: a source reference plus its `SRC-N` label.


        ``title`` is display text for rendering the citation; ``speakers`` is
        the

        connector-attested ``speakers_observed`` list when the cited document is
        a

        speaker-attested transcript (None otherwise — absence fails closed).
        Like

        every field here they come verbatim from stored resource fields —

        synthesis does zero provenance work (see the spec rule of that name).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    MemoryType:
      type: string
      enum:
        - procedure
        - memory
        - mood
      title: MemoryType
    VaultSearchOptions:
      properties:
        weight:
          type: number
          minimum: 0
          title: Weight
          description: >-
            Weight of results from this source. A weight greater than 1.0 means
            more results from this source will be returned, a weight less than
            1.0 means fewer results will be returned. This will only affect
            results if multiple sources are queried at the same time.
          default: 1
      type: object
      title: VaultSearchOptions
    NotionSearchOptions:
      properties:
        weight:
          type: number
          minimum: 0
          title: Weight
          description: >-
            Weight of results from this source. A weight greater than 1.0 means
            more results from this source will be returned, a weight less than
            1.0 means fewer results will be returned. This will only affect
            results if multiple sources are queried at the same time.
          default: 1
        notion_page_ids:
          items:
            type: string
          type: array
          title: Notion Page Ids
          description: >-
            List of Notion page IDs to search. If not provided, all pages in the
            workspace will be searched.
      type: object
      title: NotionSearchOptions
    WebCrawlerSearchOptions:
      properties:
        weight:
          type: number
          minimum: 0
          title: Weight
          description: >-
            Weight of results from this source. A weight greater than 1.0 means
            more results from this source will be returned, a weight less than
            1.0 means fewer results will be returned. This will only affect
            results if multiple sources are queried at the same time.
          default: 1
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: The URL to crawl
        max_depth:
          type: integer
          title: Max Depth
          description: Maximum depth to crawl from the starting URL
          default: 2
      type: object
      title: WebCrawlerSearchOptions
      description: Options for the WebCrawler integration.
    SlackSearchOptions:
      properties:
        weight:
          type: number
          minimum: 0
          title: Weight
          description: >-
            Weight of results from this source. A weight greater than 1.0 means
            more results from this source will be returned, a weight less than
            1.0 means fewer results will be returned. This will only affect
            results if multiple sources are queried at the same time.
          default: 1
        channels:
          items:
            type: string
          type: array
          title: Channels
          description: 'List of Slack channels to include (by id, name, or #name).'
        include_private:
          type: boolean
          title: Include Private
          description: >-
            Include private channels when constructing Slack 'types'. Defaults
            to False to preserve existing cassette query params.
          default: false
        include_dms:
          type: boolean
          title: Include Dms
          description: Include direct messages (im) when listing conversations.
          default: false
        include_group_dms:
          type: boolean
          title: Include Group Dms
          description: Include group DMs (mpim) when listing conversations.
          default: false
        exclude_archived:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Exclude Archived
          description: If set, pass 'exclude_archived' to Slack. If None, omit the param.
      type: object
      title: SlackSearchOptions
    GoogleDriveSearchOptions:
      properties:
        weight:
          type: number
          minimum: 0
          title: Weight
          description: >-
            Weight of results from this source. A weight greater than 1.0 means
            more results from this source will be returned, a weight less than
            1.0 means fewer results will be returned. This will only affect
            results if multiple sources are queried at the same time.
          default: 1
      type: object
      title: GoogleDriveSearchOptions
    GmailSearchOptions:
      properties:
        weight:
          type: number
          minimum: 0
          title: Weight
          description: >-
            Weight of results from this source. A weight greater than 1.0 means
            more results from this source will be returned, a weight less than
            1.0 means fewer results will be returned. This will only affect
            results if multiple sources are queried at the same time.
          default: 1
        label_ids:
          items:
            type: string
          type: array
          title: Label Ids
          description: >-
            List of label IDs to filter messages (e.g., ['INBOX', 'SENT',
            'DRAFT']). Multiple labels are combined with OR logic - messages
            matching ANY specified label will be returned. If empty, no label
            filtering is applied (searches all accessible messages).
      type: object
      title: GmailSearchOptions
      description: Search options specific to Gmail integration.
    AnswerModel:
      type: string
      enum:
        - llama-3.1
        - gemma2
        - qwen-qwq
        - mistral-saba
        - llama-4-scout
        - deepseek-r1
        - gpt-oss-20b
        - gpt-oss-120b
        - claude-sonnet-4-6
        - claude-opus-4-7
        - claude-opus-4-8
      title: AnswerModel
      description: |-
        Logical model ids for answer generation.

        Only short, user-friendly names are accepted in API requests. Provider
        model ids (Bedrock Converse / Anthropic) are resolved internally from
        these logical names.
    DocumentStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
        - pending_review
        - skipped
        - filtered
      title: DocumentStatus
    Document:
      properties:
        type:
          type: string
          const: document
          title: Type
          default: document
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      type: object
      title: Document
    Website:
      properties:
        type:
          type: string
          const: website
          title: Type
          default: website
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        url:
          type: string
          title: Url
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          chunkable: false
          index: true
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        favicon:
          anyOf:
            - type: string
            - type: 'null'
          title: Favicon
      type: object
      required:
        - url
      title: Website
    Task:
      properties:
        type:
          type: string
          const: task
          title: Type
          default: task
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        comments:
          anyOf:
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - type: 'null'
          title: Comments
          chunkable: true
          index: false
        due_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Due At
        status:
          anyOf:
            - $ref: '#/components/schemas/Status'
            - type: 'null'
        priority:
          anyOf:
            - $ref: '#/components/schemas/Priority'
            - type: 'null'
      type: object
      title: Task
    Person:
      properties:
        type:
          type: string
          const: person
          title: Type
          default: person
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          chunkable: false
          index: true
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        alt_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Alt Names
        job_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Title
          chunkable: false
          index: true
        company:
          anyOf:
            - type: string
            - type: 'null'
          title: Company
          chunkable: false
          index: true
        emails:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Emails
          description: All known email addresses; `email` holds the primary one
          chunkable: false
          index: false
        phone_numbers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Phone Numbers
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        date_of_birth:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Of Birth
        deal_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Deal Ids
        company_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Company Ids
        link_urls:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Link Urls
      type: object
      title: Person
    Message:
      properties:
        type:
          type: string
          const: message
          title: Type
          default: message
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        sender:
          $ref: '#/components/schemas/Person'
        date:
          type: string
          format: date-time
          title: Date
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The subject or title of the message
          chunkable: false
          index: false
        upvotes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Upvotes
          description: The number of upvotes, likes, or reactions on the message
          chunkable: false
          index: false
        replies:
          anyOf:
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - type: 'null'
          title: Replies
          description: The replies or comments to the message
          chunkable: true
          index: false
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
          description: >-
            The channel or platform where the message was posted, if this
            Message is not explicitly part of a conversation
          chunkable: false
          index: false
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: >-
            Provider message id (e.g. Slack ts, Gmail message id) — merge-dedup
            key
          chunkable: false
          index: false
        is_self:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Self
          chunkable: false
          index: false
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          chunkable: false
          index: false
        num_replies:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Replies
          chunkable: false
          index: false
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
          chunkable: false
          index: false
        mentioned_users:
          anyOf:
            - items:
                $ref: '#/components/schemas/Person'
              type: array
            - type: 'null'
          title: Mentioned Users
          chunkable: false
          index: false
      type: object
      required:
        - sender
        - date
      title: Message
    Event:
      properties:
        type:
          type: string
          const: event
          title: Type
          default: event
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          chunkable: false
          index: true
        start_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start At
        end_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End At
        meeting_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Meeting Url
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          chunkable: false
          index: true
        attendees:
          items:
            $ref: '#/components/schemas/Person'
          type: array
          title: Attendees
          chunkable: true
          index: false
      type: object
      title: Event
    File:
      properties:
        type:
          type: string
          const: file
          title: Type
          default: file
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        filename:
          type: string
          title: Filename
        content_type:
          type: string
          title: Content Type
        path:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Path
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          chunkable: false
          index: true
      type: object
      required:
        - filename
        - content_type
      title: File
    Conversation:
      properties:
        type:
          type: string
          const: conversation
          title: Type
          default: conversation
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            $ref: '#/components/schemas/Message'
          type: array
          title: Children
          chunkable: true
          index: false
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          chunkable: false
          index: false
      type: object
      title: Conversation
    Trace:
      properties:
        type:
          type: string
          const: trace
          title: Type
          default: trace
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
            discriminator:
              propertyName: type
              mapping:
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
          type: array
          title: Children
          chunkable: true
          index: false
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          chunkable: false
          index: true
      type: object
      title: Trace
      description: |-
        An agent trace/transcript containing a sequence of steps.

        Steps can be TraceMessage (user/assistant messages or thinking),
        ToolCall (function calls), or ToolResult (tool responses).
    Transcript:
      properties:
        type:
          type: string
          const: transcript
          title: Type
          default: transcript
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          chunkable: false
          index: true
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        participants:
          items:
            $ref: '#/components/schemas/Person'
          type: array
          title: Participants
          chunkable: false
          index: false
      type: object
      title: Transcript
      description: >-
        A time-anchored, speaker-attributed transcript — meetings, calls

        (ENG-2476/D10; mirrors the Trace+TraceStep precedent).


        Utterance timestamps are relative offsets from `started_at`, which is
        the

        absolute wall-clock anchor.
    Company:
      properties:
        type:
          type: string
          const: company
          title: Type
          default: company
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          chunkable: false
          index: true
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          chunkable: false
          index: true
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
          chunkable: false
          index: true
        employees:
          anyOf:
            - type: integer
            - type: 'null'
          title: Employees
        websites:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Websites
        emails:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Emails
        phone_numbers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Phone Numbers
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Active
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        timezone:
          anyOf:
            - type: string
            - type: 'null'
          title: Timezone
        deal_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Deal Ids
        contact_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Contact Ids
      type: object
      title: Company
      description: A CRM company/account record (ENG-2476/D10).
    Deal:
      properties:
        type:
          type: string
          const: deal
          title: Type
          default: deal
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: true
          index: false
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          chunkable: false
          index: true
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        stage:
          anyOf:
            - type: string
            - type: 'null'
          title: Stage
          chunkable: false
          index: true
        pipeline:
          anyOf:
            - type: string
            - type: 'null'
          title: Pipeline
        probability:
          anyOf:
            - type: number
            - type: 'null'
          title: Probability
        closed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Closed At
        won_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Won Reason
        lost_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Lost Reason
        deal_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Deal Source
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        company_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Company Ids
        contact_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Contact Ids
      type: object
      title: Deal
      description: A CRM deal/opportunity record (ENG-2476/D10).
    Highlight: {}
    ProvenanceSource:
      properties:
        source:
          $ref: '#/components/schemas/DocumentProviders'
        resource_id:
          type: string
          minLength: 1
          title: Resource Id
        owner:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner
        chunk_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Chunk Id
        span:
          anyOf:
            - prefixItems:
                - type: integer
                - type: integer
              type: array
              maxItems: 2
              minItems: 2
            - type: 'null'
          title: Span
        content_sha256:
          anyOf:
            - type: string
              pattern: ^[0-9a-f]{64}$
            - type: 'null'
          title: Content Sha256
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
      type: object
      required:
        - source
        - resource_id
      title: ProvenanceSource
      description: >-
        A source document that informed the final answer (the post-rank result
        set).


        First adopter of the unified source-reference contract: inherits the
        shared

        identity fields (and optional chunk/owner/span/sha granularity, unset
        here

        today) and adds the retrieval-surface extras.
    ProvenanceEntity:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
      type: object
      required:
        - id
        - name
        - type
      title: ProvenanceEntity
      description: A canonical entity referenced by the answer's source documents.
    ProvenanceStep:
      properties:
        iteration:
          type: integer
          title: Iteration
        tool:
          type: string
          title: Tool
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        result_count:
          type: integer
          title: Result Count
          default: 0
        status:
          type: string
          title: Status
      type: object
      required:
        - iteration
        - tool
        - status
      title: ProvenanceStep
      description: One tool invocation in the agent's search trajectory (audit trail).
    Metadata:
      properties:
        sources:
          anyOf:
            - items:
                $ref: '#/components/schemas/SourceRef'
              type: array
            - type: 'null'
          title: Sources
        edited_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Edited By
      type: object
      title: Metadata
      description: >-
        Per-block annotations carried by any Hyperdoc node (ENG-1390).


        Out-of-band annotations that travel with a block but aren't part of its
        content:

        provenance (`sources`) and human edit attribution (`edited_by`). New
        annotation

        types get added here as typed fields as the need arises.


        Empty by default. Because `Node.model_dump` forces `exclude_none=True`,
        an unset

        `metadata` (None) is dropped from serialization entirely, and within a
        populated

        `Metadata` only the set keys survive.
    Blob:
      properties:
        type:
          type: string
          const: blob
          title: Type
          default: blob
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        mimetype:
          type: string
          title: Mimetype
        data:
          type: string
          title: Data
      type: object
      required:
        - mimetype
        - data
      title: Blob
      description: |-
        Represents embedded binary data using data URI scheme.

        Format: data:[<media type>][;base64],<data>
        Example: data:text/html;base64,PGh0bWw+...
    Callout:
      properties:
        type:
          type: string
          const: callout
          title: Type
          default: callout
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      type: object
      title: Callout
    Chunk:
      properties:
        type:
          type: string
          const: chunk
          title: Type
          default: chunk
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/Blob'
              - $ref: '#/components/schemas/Callout'
              - $ref: '#/components/schemas/Chunk'
              - $ref: '#/components/schemas/Code'
              - $ref: '#/components/schemas/Comment'
              - $ref: '#/components/schemas/Divider'
              - $ref: '#/components/schemas/Equation'
              - $ref: '#/components/schemas/Footnote'
              - $ref: '#/components/schemas/Heading'
              - $ref: '#/components/schemas/Image'
              - $ref: '#/components/schemas/Link'
              - $ref: '#/components/schemas/LineBreak'
              - $ref: '#/components/schemas/List'
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/Paragraph'
              - $ref: '#/components/schemas/Quote'
              - $ref: '#/components/schemas/Table'
              - $ref: '#/components/schemas/TableCell'
              - $ref: '#/components/schemas/TableRow'
              - $ref: '#/components/schemas/Text'
              - $ref: '#/components/schemas/ToDo'
              - $ref: '#/components/schemas/ToolCall'
              - $ref: '#/components/schemas/ToolResult'
              - $ref: '#/components/schemas/TraceMessage'
              - $ref: '#/components/schemas/Utterance'
            discriminator:
              propertyName: type
              mapping:
                blob:
                  $ref: '#/components/schemas/Blob'
                callout:
                  $ref: '#/components/schemas/Callout'
                chunk:
                  $ref: '#/components/schemas/Chunk'
                code:
                  $ref: '#/components/schemas/Code'
                comment:
                  $ref: '#/components/schemas/Comment'
                divider:
                  $ref: '#/components/schemas/Divider'
                equation:
                  $ref: '#/components/schemas/Equation'
                footnote:
                  $ref: '#/components/schemas/Footnote'
                heading:
                  $ref: '#/components/schemas/Heading'
                image:
                  $ref: '#/components/schemas/Image'
                line_break:
                  $ref: '#/components/schemas/LineBreak'
                link:
                  $ref: '#/components/schemas/Link'
                list:
                  $ref: '#/components/schemas/List'
                list_item:
                  $ref: '#/components/schemas/ListItem'
                paragraph:
                  $ref: '#/components/schemas/Paragraph'
                quote:
                  $ref: '#/components/schemas/Quote'
                table:
                  $ref: '#/components/schemas/Table'
                table_cell:
                  $ref: '#/components/schemas/TableCell'
                table_row:
                  $ref: '#/components/schemas/TableRow'
                text:
                  $ref: '#/components/schemas/Text'
                todo:
                  $ref: '#/components/schemas/ToDo'
                tool_call:
                  $ref: '#/components/schemas/ToolCall'
                tool_result:
                  $ref: '#/components/schemas/ToolResult'
                trace_message:
                  $ref: '#/components/schemas/TraceMessage'
                utterance:
                  $ref: '#/components/schemas/Utterance'
          type: array
          title: Children
          chunkable: false
          index: false
      type: object
      title: Chunk
    Code:
      properties:
        type:
          type: string
          const: code
          title: Type
          default: code
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          type: string
          title: Text
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
      type: object
      required:
        - text
      title: Code
    Comment:
      properties:
        type:
          type: string
          const: comment
          title: Type
          default: comment
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          type: string
          title: Text
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
      type: object
      required:
        - text
      title: Comment
    Divider:
      properties:
        type:
          type: string
          const: divider
          title: Type
          default: divider
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
      type: object
      title: Divider
    Equation:
      properties:
        type:
          type: string
          const: equation
          title: Type
          default: equation
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
      type: object
      title: Equation
    Footnote:
      properties:
        type:
          type: string
          const: footnote
          title: Type
          default: footnote
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
      type: object
      title: Footnote
    Heading:
      properties:
        type:
          type: string
          const: heading
          title: Type
          default: heading
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
        level:
          type: integer
          title: Level
      type: object
      required:
        - level
      title: Heading
    Image:
      properties:
        type:
          type: string
          const: image
          title: Type
          default: image
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          type: string
          title: Text
        src:
          type: string
          title: Src
      type: object
      required:
        - text
        - src
      title: Image
    Link:
      properties:
        type:
          type: string
          const: link
          title: Type
          default: link
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          type: string
          title: Text
        url:
          type: string
          title: Url
      type: object
      required:
        - text
        - url
      title: Link
    LineBreak:
      properties:
        type:
          type: string
          const: line_break
          title: Type
          default: line_break
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
      type: object
      title: LineBreak
    List:
      properties:
        type:
          type: string
          const: list
          title: Type
          default: list
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            oneOf:
              - $ref: '#/components/schemas/ListItem'
              - $ref: '#/components/schemas/ToDo'
            discriminator:
              propertyName: type
              mapping:
                list_item:
                  $ref: '#/components/schemas/ListItem'
                todo:
                  $ref: '#/components/schemas/ToDo'
          type: array
          title: Children
          chunkable: false
          index: false
        ordered:
          type: boolean
          title: Ordered
          default: false
      type: object
      title: List
    ListItem:
      properties:
        type:
          type: string
          const: list_item
          title: Type
          default: list_item
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
      type: object
      title: ListItem
    Paragraph:
      properties:
        type:
          type: string
          const: paragraph
          title: Type
          default: paragraph
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
      type: object
      title: Paragraph
    Quote:
      properties:
        type:
          type: string
          const: quote
          title: Type
          default: quote
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
      type: object
      title: Quote
    Table:
      properties:
        type:
          type: string
          const: table
          title: Type
          default: table
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            $ref: '#/components/schemas/TableRow'
          type: array
          title: Children
          chunkable: false
          index: false
        has_header:
          type: boolean
          title: Has Header
          description: Whether the first row should be treated as a header
          default: true
          chunkable: false
          index: false
      type: object
      title: Table
    TableCell:
      properties:
        type:
          type: string
          const: table_cell
          title: Type
          default: table_cell
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
        align:
          $ref: '#/components/schemas/Alignment'
          default: left
      type: object
      title: TableCell
    TableRow:
      properties:
        type:
          type: string
          const: table_row
          title: Type
          default: table_row
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          items:
            $ref: '#/components/schemas/TableCell'
          type: array
          title: Children
          chunkable: false
          index: false
      type: object
      title: TableRow
    Text:
      properties:
        type:
          type: string
          const: text
          title: Type
          default: text
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          type: string
          title: Text
        marks:
          anyOf:
            - items:
                $ref: '#/components/schemas/Markup'
              type: array
            - type: 'null'
          title: Marks
      type: object
      required:
        - text
      title: Text
    ToDo:
      properties:
        type:
          type: string
          const: todo
          title: Type
          default: todo
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          anyOf:
            - type: string
            - type: 'null'
          title: Text
        children:
          anyOf:
            - items:
                oneOf:
                  - $ref: '#/components/schemas/Blob'
                  - $ref: '#/components/schemas/Callout'
                  - $ref: '#/components/schemas/Chunk'
                  - $ref: '#/components/schemas/Code'
                  - $ref: '#/components/schemas/Comment'
                  - $ref: '#/components/schemas/Divider'
                  - $ref: '#/components/schemas/Equation'
                  - $ref: '#/components/schemas/Footnote'
                  - $ref: '#/components/schemas/Heading'
                  - $ref: '#/components/schemas/Image'
                  - $ref: '#/components/schemas/Link'
                  - $ref: '#/components/schemas/LineBreak'
                  - $ref: '#/components/schemas/List'
                  - $ref: '#/components/schemas/ListItem'
                  - $ref: '#/components/schemas/Paragraph'
                  - $ref: '#/components/schemas/Quote'
                  - $ref: '#/components/schemas/Table'
                  - $ref: '#/components/schemas/TableCell'
                  - $ref: '#/components/schemas/TableRow'
                  - $ref: '#/components/schemas/Text'
                  - $ref: '#/components/schemas/ToDo'
                  - $ref: '#/components/schemas/ToolCall'
                  - $ref: '#/components/schemas/ToolResult'
                  - $ref: '#/components/schemas/TraceMessage'
                  - $ref: '#/components/schemas/Utterance'
                discriminator:
                  propertyName: type
                  mapping:
                    blob:
                      $ref: '#/components/schemas/Blob'
                    callout:
                      $ref: '#/components/schemas/Callout'
                    chunk:
                      $ref: '#/components/schemas/Chunk'
                    code:
                      $ref: '#/components/schemas/Code'
                    comment:
                      $ref: '#/components/schemas/Comment'
                    divider:
                      $ref: '#/components/schemas/Divider'
                    equation:
                      $ref: '#/components/schemas/Equation'
                    footnote:
                      $ref: '#/components/schemas/Footnote'
                    heading:
                      $ref: '#/components/schemas/Heading'
                    image:
                      $ref: '#/components/schemas/Image'
                    line_break:
                      $ref: '#/components/schemas/LineBreak'
                    link:
                      $ref: '#/components/schemas/Link'
                    list:
                      $ref: '#/components/schemas/List'
                    list_item:
                      $ref: '#/components/schemas/ListItem'
                    paragraph:
                      $ref: '#/components/schemas/Paragraph'
                    quote:
                      $ref: '#/components/schemas/Quote'
                    table:
                      $ref: '#/components/schemas/Table'
                    table_cell:
                      $ref: '#/components/schemas/TableCell'
                    table_row:
                      $ref: '#/components/schemas/TableRow'
                    text:
                      $ref: '#/components/schemas/Text'
                    todo:
                      $ref: '#/components/schemas/ToDo'
                    tool_call:
                      $ref: '#/components/schemas/ToolCall'
                    tool_result:
                      $ref: '#/components/schemas/ToolResult'
                    trace_message:
                      $ref: '#/components/schemas/TraceMessage'
                    utterance:
                      $ref: '#/components/schemas/Utterance'
              type: array
            - type: 'null'
          title: Children
        checked:
          type: boolean
          title: Checked
          default: false
      type: object
      title: ToDo
    ToolCall:
      properties:
        type:
          type: string
          const: tool_call
          title: Type
          default: tool_call
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        tool_call_id:
          type: string
          title: Tool Call Id
        tool_name:
          type: string
          title: Tool Name
        args:
          additionalProperties: true
          type: object
          title: Args
          chunkable: false
          index: false
      type: object
      required:
        - tool_call_id
        - tool_name
      title: ToolCall
      description: A tool/function call made by the assistant.
    ToolResult:
      properties:
        type:
          type: string
          const: tool_result
          title: Type
          default: tool_result
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        tool_call_id:
          type: string
          title: Tool Call Id
        tool_name:
          type: string
          title: Tool Name
        output:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
          title: Output
        is_error:
          type: boolean
          title: Is Error
          default: false
      type: object
      required:
        - tool_call_id
        - tool_name
        - output
      title: ToolResult
      description: The result of a tool call.
    TraceMessage:
      properties:
        type:
          type: string
          const: trace_message
          title: Type
          default: trace_message
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          type: string
          title: Text
        role:
          type: string
          enum:
            - user
            - assistant
          title: Role
          default: assistant
        message_type:
          type: string
          enum:
            - message
            - thinking
          title: Message Type
          default: message
        timestamp:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Timestamp
      type: object
      required:
        - text
      title: TraceMessage
      description: >-
        A message in an agent trace (user message, assistant message, or
        thinking).
    Utterance:
      properties:
        type:
          type: string
          const: utterance
          title: Type
          default: utterance
        id:
          type: string
          title: Id
          chunkable: false
          index: false
        metadata:
          anyOf:
            - $ref: '#/components/schemas/Metadata'
            - type: 'null'
        text:
          type: string
          title: Text
        speaker:
          anyOf:
            - $ref: '#/components/schemas/Person'
            - type: 'null'
        start:
          anyOf:
            - type: number
            - type: 'null'
          title: Start
        end:
          anyOf:
            - type: number
            - type: 'null'
          title: End
      type: object
      required:
        - text
      title: Utterance
      description: >-
        A speaker-attributed segment of a transcript (ENG-2476/D10).


        "Utterance" is the standard name for this across transcription providers

        (AssemblyAI, Deepgram, Rev). Timestamps are relative offsets in seconds
        —

        provider-native; absolute times derive from `Transcript.started_at`.
    Status:
      type: string
      enum:
        - completed
        - not_started
        - in_progress
        - cancelled
      title: Status
    Priority:
      type: string
      enum:
        - urgent
        - high
        - medium
        - low
      title: Priority
    SourceRef:
      properties:
        chunk_id:
          type: string
          title: Chunk Id
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
      type: object
      required:
        - chunk_id
      title: SourceRef
      description: >-
        A reference to a memory/chunk that a block's content is grounded in
        (ENG-1390).


        Chunks are the unit persisted to the DB — extracted memories become
        chunks when

        indexed — so `chunk_id` is the stable pointer back to the source.
        `resource_id`

        and `source` locate the originating document; `score` carries optional
        retrieval

        relevance. Kept deliberately self-contained (plain `str` for `source`
        rather than

        the `DocumentProviders` enum) so the hyperdoc format stays free of
        app-layer imports.
    Alignment:
      type: string
      enum:
        - left
        - center
        - right
      title: Alignment
    Markup:
      type: string
      enum:
        - bold
        - italic
        - underline
        - strikethrough
        - code
        - math
      title: Markup
  securitySchemes:
    APIKey:
      type: http
      description: >-
        API Key or JWT User Token. If using an API Key, set the X-As-User header
        to act as a specific user. A JWT User Token is always scoped to a
        specific user.
      scheme: bearer
      bearerFormat: Bearer <token>
    AsUser:
      type: apiKey
      description: >-
        Optionally set this header to act as a specific user when using an API
        Key, equivalent to first exchanging the API Key for a User Token
      in: header
      name: X-As-User
    FlagOverride:
      type: apiKey
      description: >-
        Benchmark-only (staging/dev): request-scoped feature-flag overrides,
        e.g. 'retrieval-diversity-fixes=false'. Rejected on environments without
        allow_flag_overrides, for external-tier keys, and for any flag outside
        the overridable allow-list.
      in: header
      name: X-Hyperspell-Flag-Override
    DefaultSources:
      type: apiKey
      description: >-
        Set to 'connected' to let the server pick the source set when the
        request body names no `sources`: it resolves the calling identity's
        connected integrations instead of falling back to the vault. Used by the
        Hyperspell MCP transports and the hyperbrain CLI, whose `ask`/`search`
        callers cannot enumerate sources themselves. Ignored when the body names
        `sources` — an explicit list always wins.
      in: header
      name: X-Hyperspell-Default-Sources

````