{
  "components": {
    "schemas": {
      "ActionMessage": {
        "description": "Notification that the agent is invoking a tool.",
        "properties": {
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "tool_arguments": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Arguments passed to the tool.",
            "title": "Tool Arguments"
          },
          "tool_name": {
            "description": "Name of the tool being called.",
            "title": "Tool Name",
            "type": "string"
          },
          "type": {
            "const": "ACTION",
            "default": "ACTION",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "tool_name"
        ],
        "title": "ActionMessage",
        "type": "object"
      },
      "AnswerMessage": {
        "description": "A chunk of the agent's final answer text.",
        "properties": {
          "content": {
            "description": "Answer text content.",
            "title": "Content",
            "type": "string"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "ANSWER",
            "default": "ANSWER",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "title": "AnswerMessage",
        "type": "object"
      },
      "AuditMessage": {
        "description": "Detailed trace data from tool executions.",
        "properties": {
          "audit_traces": {
            "description": "Audit traces from tool executions.",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/SearchAuditV1"
                },
                {
                  "$ref": "#/components/schemas/MarkdownAuditV1"
                },
                {
                  "$ref": "#/components/schemas/StructuredReportAuditV1"
                },
                {
                  "$ref": "#/components/schemas/SubAgentStartedAuditV1"
                },
                {
                  "$ref": "#/components/schemas/SubAgentCompletedAuditV1"
                }
              ]
            },
            "title": "Audit Traces",
            "type": "array"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "AUDIT",
            "default": "AUDIT",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "audit_traces"
        ],
        "title": "AuditMessage",
        "type": "object"
      },
      "AuditTraceBigdataResult": {
        "description": "Search results from the Bigdata content platform.",
        "properties": {
          "type": {
            "const": "CQS",
            "default": "CQS",
            "description": "Result type identifier.",
            "title": "Type",
            "type": "string"
          },
          "values": {
            "description": "Matching documents.",
            "items": {
              "$ref": "#/components/schemas/BigdataDocument"
            },
            "title": "Values",
            "type": "array"
          }
        },
        "required": [
          "values"
        ],
        "title": "AuditTraceBigdataResult",
        "type": "object"
      },
      "AuditTraceExternalResult": {
        "description": "Search results from external web sources.",
        "properties": {
          "type": {
            "const": "EXTERNAL",
            "default": "EXTERNAL",
            "description": "Result type identifier.",
            "title": "Type",
            "type": "string"
          },
          "values": {
            "description": "Matching external results.",
            "items": {
              "$ref": "#/components/schemas/ExternalResult"
            },
            "title": "Values",
            "type": "array"
          }
        },
        "required": [
          "values"
        ],
        "title": "AuditTraceExternalResult",
        "type": "object"
      },
      "BigdataChunk": {
        "description": "A text chunk from a Bigdata document.",
        "properties": {
          "bounding_boxes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BoundingBox"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Spatial positions for PDF-sourced content.",
            "title": "Bounding Boxes"
          },
          "cnum": {
            "description": "Chunk number within the document.",
            "title": "Cnum",
            "type": "integer"
          },
          "id": {
            "description": "Chunk identifier.",
            "title": "Id",
            "type": "string"
          },
          "sentences": {
            "description": "Sentence positions within this chunk.",
            "items": {
              "$ref": "#/components/schemas/ChunkSentence"
            },
            "title": "Sentences",
            "type": "array"
          },
          "text": {
            "description": "Chunk text content.",
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "id",
          "cnum",
          "text",
          "sentences"
        ],
        "title": "BigdataChunk",
        "type": "object"
      },
      "BigdataDocument": {
        "description": "A document from the Bigdata content platform.",
        "properties": {
          "chunks": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BigdataChunk"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Text chunks with matched content.",
            "title": "Chunks"
          },
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Content type classification.",
            "title": "Content Type"
          },
          "document_scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scope or section of the document.",
            "title": "Document Scope"
          },
          "document_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document type classification.",
            "title": "Document Type"
          },
          "hd": {
            "description": "Document headline or title.",
            "title": "Hd",
            "type": "string"
          },
          "id": {
            "description": "Unique document identifier.",
            "title": "Id",
            "type": "string"
          },
          "language": {
            "description": "Document language code.",
            "title": "Language",
            "type": "string"
          },
          "rp_provider_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider identifier.",
            "title": "Rp Provider Id"
          },
          "source_rank": {
            "description": "Ranking weight of the source.",
            "title": "Source Rank",
            "type": "integer"
          },
          "src_key": {
            "description": "Source key identifier.",
            "title": "Src Key",
            "type": "string"
          },
          "src_name": {
            "description": "Source display name.",
            "title": "Src Name",
            "type": "string"
          },
          "ts": {
            "description": "Publication timestamp.",
            "title": "Ts",
            "type": "string"
          },
          "type": {
            "const": "BIGDATA",
            "default": "BIGDATA",
            "description": "Source type identifier.",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "URL of the original document.",
            "title": "Url"
          }
        },
        "required": [
          "hd",
          "id",
          "language",
          "src_key",
          "src_name",
          "source_rank",
          "ts"
        ],
        "title": "BigdataDocument",
        "type": "object"
      },
      "BoundingBox": {
        "description": "Spatial coordinates of content on a document page.",
        "properties": {
          "bottom": {
            "title": "Bottom",
            "type": "number"
          },
          "left": {
            "title": "Left",
            "type": "number"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "right": {
            "title": "Right",
            "type": "number"
          },
          "top": {
            "title": "Top",
            "type": "number"
          }
        },
        "required": [
          "bottom",
          "left",
          "page",
          "right",
          "top"
        ],
        "title": "BoundingBox",
        "type": "object"
      },
      "ChartMessage": {
        "description": "A chart the agent produced while running code.",
        "properties": {
          "caption": {
            "description": "Short description of the chart.",
            "title": "Caption",
            "type": "string"
          },
          "chart_id": {
            "description": "Unique identifier for the chart.",
            "title": "Chart Id",
            "type": "string"
          },
          "chart_type": {
            "description": "Chart shape, e.g. 'bar', 'line', 'scatter', 'area', or 'histogram'.",
            "title": "Chart Type",
            "type": "string"
          },
          "data_points": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Number of data points plotted in the chart.",
            "title": "Data Points"
          },
          "end": {
            "description": "End offset in the cumulative answer text (exclusive).",
            "title": "End",
            "type": "integer"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "start": {
            "description": "Start offset in the cumulative answer text.",
            "title": "Start",
            "type": "integer"
          },
          "title": {
            "description": "Chart title.",
            "title": "Title",
            "type": "string"
          },
          "type": {
            "const": "CHART",
            "default": "CHART",
            "title": "Type",
            "type": "string"
          },
          "vega_lite_spec": {
            "additionalProperties": true,
            "description": "A standard Vega-Lite specification for the chart. Render it with any Vega-Lite renderer: https://vega.github.io/vega-lite/docs/",
            "title": "Vega Lite Spec",
            "type": "object"
          }
        },
        "required": [
          "chart_id",
          "title",
          "caption",
          "chart_type",
          "vega_lite_spec",
          "start",
          "end"
        ],
        "title": "ChartMessage",
        "type": "object"
      },
      "ChunkSentence": {
        "description": "Position reference within a document chunk.",
        "properties": {
          "pnum": {
            "description": "Paragraph number.",
            "title": "Pnum",
            "type": "integer"
          },
          "snum": {
            "description": "Sentence number within the paragraph.",
            "title": "Snum",
            "type": "integer"
          }
        },
        "required": [
          "pnum",
          "snum"
        ],
        "title": "ChunkSentence",
        "type": "object"
      },
      "CloneWorkflowTemplateRequest": {
        "description": "Optional overrides when cloning a workflow template.",
        "properties": {
          "content_filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentFilter"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "expected_input": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/WorkflowInputSchema"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inputs the template expects. Each key is an abstract snake_case NAME, not a value. Reference a key as {{ key }} in the prompt to substitute its value inline; an unreferenced key is still provided to the model as attached context.",
            "title": "Expected Input"
          },
          "expected_output": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Output"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "ranking_parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RankingParameters"
              },
              {
                "type": "null"
              }
            ]
          },
          "research_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Plan"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools_configs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-tool configuration stored with the template, keyed by tool id. Two key families are supported: `python_code_execution` (toggles sandboxed Python and chart rendering for every run) and connector tool ids in the `<connector>__<tool>` form (e.g. `\"factset__FactSet_Fundamentals\": {\"enabled\": true}`). Search settings belong in `content_filter`, `ranking_parameters`, or the execution request \u2014 not here. See `GET /v1/tools` for each connector tool's config schema.",
            "examples": [
              {
                "factset__FactSet_Fundamentals": {
                  "enabled": true
                },
                "python_code_execution": {
                  "chart_generation_enabled": false,
                  "enabled": true
                }
              }
            ],
            "title": "Tools Configs"
          }
        },
        "title": "CloneWorkflowTemplateRequest",
        "type": "object"
      },
      "CompleteMessage": {
        "description": "Signals that the agent has finished processing the request.",
        "properties": {
          "checkpoint_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Checkpoint for continuing this conversation.",
            "title": "Checkpoint Id"
          },
          "consumption": {
            "description": "Resource usage breakdown for this request.",
            "items": {
              "discriminator": {
                "mapping": {
                  "base": "#/components/schemas/TokenTierConsumption",
                  "pro": "#/components/schemas/TokenTierConsumption",
                  "search": "#/components/schemas/SearchConsumption",
                  "search_endpoint": "#/components/schemas/SearchEndpointConsumption",
                  "structured_data": "#/components/schemas/StructuredDataConsumption"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TokenTierConsumption"
                },
                {
                  "$ref": "#/components/schemas/SearchConsumption"
                },
                {
                  "$ref": "#/components/schemas/StructuredDataConsumption"
                },
                {
                  "$ref": "#/components/schemas/SearchEndpointConsumption"
                }
              ]
            },
            "title": "Consumption",
            "type": "array"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "COMPLETE",
            "default": "COMPLETE",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "consumption"
        ],
        "title": "CompleteMessage",
        "type": "object"
      },
      "ComponentType": {
        "description": "Types of structured report components.",
        "enum": [
          "company_overview",
          "key_financial_highlights",
          "analyst_data",
          "forward_estimates",
          "price_performance",
          "latest_earnings",
          "financial_data",
          "additional_financial_metrics",
          "revenue_segmentation",
          "earnings_calendar"
        ],
        "title": "ComponentType",
        "type": "string"
      },
      "ContentFilter": {
        "description": "Composable content filter using logical operators.",
        "properties": {
          "all_of": {
            "description": "Match content satisfying all of these filters.",
            "items": {
              "discriminator": {
                "mapping": {
                  "DOCUMENT_ID": "#/components/schemas/DocumentIdFilter",
                  "SOURCE_TYPE": "#/components/schemas/SourceFilter"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/DocumentIdFilter"
                },
                {
                  "$ref": "#/components/schemas/SourceFilter"
                }
              ]
            },
            "title": "All Of",
            "type": "array"
          },
          "any_of": {
            "description": "Match content satisfying at least one of these filters.",
            "items": {
              "discriminator": {
                "mapping": {
                  "DOCUMENT_ID": "#/components/schemas/DocumentIdFilter",
                  "SOURCE_TYPE": "#/components/schemas/SourceFilter"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/DocumentIdFilter"
                },
                {
                  "$ref": "#/components/schemas/SourceFilter"
                }
              ]
            },
            "title": "Any Of",
            "type": "array"
          },
          "none_of": {
            "description": "Exclude content matching any of these filters.",
            "items": {
              "discriminator": {
                "mapping": {
                  "DOCUMENT_ID": "#/components/schemas/DocumentIdFilter",
                  "SOURCE_TYPE": "#/components/schemas/SourceFilter"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/DocumentIdFilter"
                },
                {
                  "$ref": "#/components/schemas/SourceFilter"
                }
              ]
            },
            "title": "None Of",
            "type": "array"
          }
        },
        "title": "ContentFilter",
        "type": "object"
      },
      "CreateWorkflowTemplate": {
        "description": "Inline workflow template definition.",
        "properties": {
          "content_filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentFilter"
              },
              {
                "type": "null"
              }
            ],
            "description": "Content filters applied to all searches."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Brief description of what this template does.",
            "title": "Description"
          },
          "expected_input": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/WorkflowInputSchema"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inputs the template expects. Each key is an abstract snake_case NAME, not a value. Reference a key as {{ key }} in the prompt to substitute its value inline; an unreferenced key is still provided to the model as attached context.",
            "title": "Expected Input"
          },
          "expected_output": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional guidance for the final answer's tone, structure, and format.",
            "title": "Expected Output"
          },
          "name": {
            "description": "Template display name.",
            "title": "Name",
            "type": "string"
          },
          "prompt": {
            "description": "The research prompt with optional placeholders.",
            "title": "Prompt",
            "type": "string"
          },
          "ranking_parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RankingParameters"
              },
              {
                "type": "null"
              }
            ],
            "description": "Search result ranking configuration."
          },
          "research_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Plan"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pre-defined research plan for the workflow."
          },
          "tools_configs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-tool configuration stored with the template, keyed by tool id. Two key families are supported: `python_code_execution` (toggles sandboxed Python and chart rendering for every run) and connector tool ids in the `<connector>__<tool>` form (e.g. `\"factset__FactSet_Fundamentals\": {\"enabled\": true}`). Search settings belong in `content_filter`, `ranking_parameters`, or the execution request \u2014 not here. See `GET /v1/tools` for each connector tool's config schema.",
            "examples": [
              {
                "factset__FactSet_Fundamentals": {
                  "enabled": true
                },
                "python_code_execution": {
                  "chart_generation_enabled": false,
                  "enabled": true
                }
              }
            ],
            "title": "Tools Configs"
          }
        },
        "required": [
          "name",
          "prompt"
        ],
        "title": "CreateWorkflowTemplate",
        "type": "object"
      },
      "DataTable": {
        "description": "A table of structured data.",
        "properties": {
          "caption": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional table description.",
            "title": "Caption"
          },
          "headers": {
            "description": "Column header names.",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Headers",
            "type": "array"
          },
          "rows": {
            "description": "Row data as key-value mappings.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Rows",
            "type": "array"
          }
        },
        "required": [
          "headers"
        ],
        "title": "DataTable",
        "type": "object"
      },
      "DateRange": {
        "description": "Absolute time range for filtering content.",
        "properties": {
          "end": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "End of the time range (ISO 8601 UTC, e.g. '2024-12-31T23:59:59Z').",
            "title": "End"
          },
          "start": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Start of the time range (ISO 8601 UTC, e.g. '2024-01-01T00:00:00Z').",
            "title": "Start"
          }
        },
        "title": "DateRange",
        "type": "object"
      },
      "DocumentIdFilter": {
        "description": "Filter by specific document identifiers.",
        "properties": {
          "document_ids": {
            "description": "Set of document IDs to match.",
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "minItems": 1,
            "title": "Document Ids",
            "type": "array",
            "uniqueItems": true
          },
          "type": {
            "const": "DOCUMENT_ID",
            "description": "Filter type identifier.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "document_ids"
        ],
        "title": "DocumentIdFilter",
        "type": "object"
      },
      "ErrorMessage": {
        "description": "An unrecoverable error during processing.",
        "properties": {
          "error": {
            "description": "Error description.",
            "title": "Error",
            "type": "string"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "ERROR",
            "default": "ERROR",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorMessage",
        "type": "object"
      },
      "ExecutionDetailResponse": {
        "description": "A stored workflow execution with its result stream replayed in order.",
        "properties": {
          "consumption": {
            "anyOf": [
              {
                "items": {
                  "discriminator": {
                    "mapping": {
                      "base": "#/components/schemas/TokenTierConsumption",
                      "pro": "#/components/schemas/TokenTierConsumption",
                      "search": "#/components/schemas/SearchConsumption",
                      "search_endpoint": "#/components/schemas/SearchEndpointConsumption",
                      "structured_data": "#/components/schemas/StructuredDataConsumption"
                    },
                    "propertyName": "type"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TokenTierConsumption"
                    },
                    {
                      "$ref": "#/components/schemas/SearchConsumption"
                    },
                    {
                      "$ref": "#/components/schemas/StructuredDataConsumption"
                    },
                    {
                      "$ref": "#/components/schemas/SearchEndpointConsumption"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Resource usage breakdown for the run.",
            "title": "Consumption"
          },
          "date_created": {
            "description": "When the execution was created.",
            "format": "date-time",
            "title": "Date Created",
            "type": "string"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "discriminator": {
                    "mapping": {
                      "ACTION": "#/components/schemas/ActionMessage",
                      "ANSWER": "#/components/schemas/AnswerMessage",
                      "AUDIT": "#/components/schemas/AuditMessage",
                      "CHART": "#/components/schemas/ChartMessage",
                      "COMPLETE": "#/components/schemas/CompleteMessage",
                      "ERROR": "#/components/schemas/ErrorMessage",
                      "GROUNDING": "#/components/schemas/GroundingMessage",
                      "LLM_RETRY": "#/components/schemas/LlmRetryMessage",
                      "PLANNING": "#/components/schemas/PlanningMessage",
                      "STRUCTURED_OUTPUT": "#/components/schemas/StructuredOutputMessage",
                      "THINKING": "#/components/schemas/ThinkingMessage",
                      "TOOL_ERROR": "#/components/schemas/ToolErrorMessage"
                    },
                    "propertyName": "type"
                  },
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ThinkingMessage"
                    },
                    {
                      "$ref": "#/components/schemas/ActionMessage"
                    },
                    {
                      "$ref": "#/components/schemas/AnswerMessage"
                    },
                    {
                      "$ref": "#/components/schemas/CompleteMessage"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorMessage"
                    },
                    {
                      "$ref": "#/components/schemas/AuditMessage"
                    },
                    {
                      "$ref": "#/components/schemas/GroundingMessage"
                    },
                    {
                      "$ref": "#/components/schemas/ChartMessage"
                    },
                    {
                      "$ref": "#/components/schemas/ToolErrorMessage"
                    },
                    {
                      "$ref": "#/components/schemas/PlanningMessage"
                    },
                    {
                      "$ref": "#/components/schemas/LlmRetryMessage"
                    },
                    {
                      "$ref": "#/components/schemas/StructuredOutputMessage"
                    }
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "The run's streamed messages, replayed in order \u2014 the same message types delivered live during execution (answer, grounding, charts, and so on). Null while the run is still in progress.",
            "title": "Events"
          },
          "execution_id": {
            "description": "Unique identifier for the execution.",
            "title": "Execution Id",
            "type": "string"
          },
          "is_owner": {
            "description": "Whether the authenticated caller owns this execution.",
            "title": "Is Owner",
            "type": "boolean"
          },
          "is_public": {
            "description": "Whether the execution is shared through a public link.",
            "title": "Is Public",
            "type": "boolean"
          },
          "last_updated": {
            "description": "When the execution was last updated.",
            "format": "date-time",
            "title": "Last Updated",
            "type": "string"
          },
          "name": {
            "description": "Human-readable name of the execution.",
            "title": "Name",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ExecutionStatus",
            "description": "Current lifecycle status of the run."
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ID of the template that ran, if any.",
            "title": "Template Id"
          }
        },
        "required": [
          "execution_id",
          "name",
          "status",
          "is_public",
          "is_owner",
          "date_created",
          "last_updated"
        ],
        "title": "ExecutionDetailResponse",
        "type": "object"
      },
      "ExecutionInputValue": {
        "description": "One input the run was executed with, paired with its template type.",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/WorkflowInputTypes",
            "description": "The input's declared type."
          },
          "value": {
            "description": "The value supplied for this input.",
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "title": "ExecutionInputValue",
        "type": "object"
      },
      "ExecutionListResponse": {
        "description": "A page of workflow executions owned by the authenticated user.",
        "properties": {
          "count": {
            "description": "Number of matching executions.",
            "title": "Count",
            "type": "integer"
          },
          "cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pagination cursor for the next page; null on the last page.",
            "title": "Cursor"
          },
          "results": {
            "description": "Executions in this page, newest first.",
            "items": {
              "$ref": "#/components/schemas/ExecutionSummary"
            },
            "title": "Results",
            "type": "array"
          }
        },
        "required": [
          "count",
          "results"
        ],
        "title": "ExecutionListResponse",
        "type": "object"
      },
      "ExecutionStatus": {
        "description": "Lifecycle status of a stored workflow execution.",
        "enum": [
          "pending",
          "running",
          "completed",
          "error",
          "cancelled"
        ],
        "title": "ExecutionStatus",
        "type": "string"
      },
      "ExecutionSummary": {
        "description": "Summary of a stored workflow execution.",
        "properties": {
          "date_created": {
            "description": "When the execution was created.",
            "format": "date-time",
            "title": "Date Created",
            "type": "string"
          },
          "execution_id": {
            "description": "Unique identifier for the execution.",
            "title": "Execution Id",
            "type": "string"
          },
          "inputs": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/ExecutionInputValue"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The inputs the run was executed with, keyed by input name.",
            "title": "Inputs"
          },
          "is_public": {
            "description": "Whether the execution is shared through a public link.",
            "title": "Is Public",
            "type": "boolean"
          },
          "last_updated": {
            "description": "When the execution was last updated.",
            "format": "date-time",
            "title": "Last Updated",
            "type": "string"
          },
          "name": {
            "description": "Human-readable name of the execution.",
            "title": "Name",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/ExecutionStatus",
            "description": "Current lifecycle status of the run."
          },
          "template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ID of the template that ran, if any.",
            "title": "Template Id"
          }
        },
        "required": [
          "execution_id",
          "name",
          "status",
          "is_public",
          "date_created",
          "last_updated"
        ],
        "title": "ExecutionSummary",
        "type": "object"
      },
      "ExternalResult": {
        "description": "A result from an external web source.",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/ExternalSourceAction",
            "description": "Source metadata and URL."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Brief summary.",
            "title": "Description"
          },
          "hd": {
            "description": "Headline or title.",
            "title": "Hd",
            "type": "string"
          },
          "id": {
            "description": "Unique identifier for this result.",
            "title": "Id",
            "type": "string"
          },
          "text": {
            "description": "Content text excerpt.",
            "title": "Text",
            "type": "string"
          },
          "ts": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Publication timestamp.",
            "title": "Ts"
          },
          "type": {
            "const": "EXTERNAL",
            "default": "EXTERNAL",
            "description": "Source type identifier.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "hd",
          "text",
          "action"
        ],
        "title": "ExternalResult",
        "type": "object"
      },
      "ExternalSourceAction": {
        "description": "Metadata for an external web source.",
        "properties": {
          "favicon_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "URL of the source's favicon.",
            "title": "Favicon Url"
          },
          "hd": {
            "description": "Headline or title.",
            "title": "Hd",
            "type": "string"
          },
          "name": {
            "description": "Display name of the source.",
            "title": "Name",
            "type": "string"
          },
          "type": {
            "const": "EXTERNAL",
            "default": "EXTERNAL",
            "description": "Source type identifier.",
            "title": "Type",
            "type": "string"
          },
          "url": {
            "description": "URL of the original content.",
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "name",
          "hd",
          "url"
        ],
        "title": "ExternalSourceAction",
        "type": "object"
      },
      "GroundingMessage": {
        "description": "Citations linking answer text spans to their sources.",
        "properties": {
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "references": {
            "description": "Source references for spans of the answer text.",
            "items": {
              "$ref": "#/components/schemas/GroundingReference"
            },
            "title": "References",
            "type": "array"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "GROUNDING",
            "default": "GROUNDING",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "references"
        ],
        "title": "GroundingMessage",
        "type": "object"
      },
      "GroundingReference": {
        "description": "A citation linking a span of answer text to its source.",
        "properties": {
          "audit_id": {
            "description": "Identifier linking this reference to its audit trace.",
            "title": "Audit Id",
            "type": "string"
          },
          "end": {
            "description": "End character offset (exclusive) in the answer text.",
            "title": "End",
            "type": "integer"
          },
          "source": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "BIGDATA": "#/components/schemas/BigdataDocument",
                    "EXTERNAL": "#/components/schemas/ExternalResult"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ExternalResult"
                  },
                  {
                    "$ref": "#/components/schemas/BigdataDocument"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The referenced source document or web result.",
            "title": "Source"
          },
          "start": {
            "description": "Start character offset in the answer text.",
            "title": "Start",
            "type": "integer"
          },
          "tool_name": {
            "description": "Name of the tool that produced this reference.",
            "title": "Tool Name",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end",
          "tool_name",
          "audit_id"
        ],
        "title": "GroundingReference",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HeaderBlock": {
        "description": "A heading block within a report section.",
        "properties": {
          "block_type": {
            "const": "header",
            "default": "header",
            "description": "Block type identifier.",
            "title": "Block Type",
            "type": "string"
          },
          "level": {
            "default": 2,
            "description": "Heading level (1-6).",
            "maximum": 6.0,
            "minimum": 1.0,
            "title": "Level",
            "type": "integer"
          },
          "text": {
            "description": "Heading text.",
            "minLength": 1,
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "HeaderBlock",
        "type": "object"
      },
      "LlmRetryMessage": {
        "description": "Notification that the agent is retrying a failed operation.",
        "properties": {
          "message": {
            "description": "Human-readable retry status.",
            "title": "Message",
            "type": "string"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "LLM_RETRY",
            "default": "LLM_RETRY",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "LlmRetryMessage",
        "type": "object"
      },
      "MarkdownAuditV1": {
        "description": "Audit trace for generated markdown content.",
        "properties": {
          "audit_type": {
            "const": "MarkdownAuditV1",
            "default": "MarkdownAuditV1",
            "title": "Audit Type",
            "type": "string"
          },
          "content": {
            "description": "The generated markdown content.",
            "title": "Content",
            "type": "string"
          },
          "title": {
            "description": "Title of the generated content.",
            "title": "Title",
            "type": "string"
          },
          "tool_id": {
            "description": "Identifier of the tool that produced this trace.",
            "title": "Tool Id",
            "type": "string"
          }
        },
        "required": [
          "tool_id",
          "title",
          "content"
        ],
        "title": "MarkdownAuditV1",
        "type": "object"
      },
      "ModelName": {
        "description": "Available models for execution.",
        "enum": [
          "base",
          "pro"
        ],
        "title": "ModelName",
        "type": "string"
      },
      "Plan": {
        "description": "A structured research plan with ordered steps.",
        "properties": {
          "steps": {
            "default": [],
            "description": "Ordered list of research steps.",
            "items": {
              "$ref": "#/components/schemas/Step"
            },
            "title": "Steps",
            "type": "array"
          },
          "title": {
            "description": "Short title summarizing the research objective.",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "Plan",
        "type": "object"
      },
      "PlanningMessage": {
        "description": "Updates to the agent's research plan.",
        "properties": {
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "plan": {
            "$ref": "#/components/schemas/Plan",
            "description": "Current state of the research plan."
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "PLANNING",
            "default": "PLANNING",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "plan"
        ],
        "title": "PlanningMessage",
        "type": "object"
      },
      "RankingParameters": {
        "description": "Parameters that influence how search results are ranked.",
        "properties": {
          "freshness_boost": {
            "anyOf": [
              {
                "maximum": 10.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Prioritize more recent content (1-10).",
            "title": "Freshness Boost"
          },
          "source_boost": {
            "anyOf": [
              {
                "maximum": 10.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Boost results from high-quality, authoritative sources (1-10).",
            "title": "Source Boost"
          }
        },
        "title": "RankingParameters",
        "type": "object"
      },
      "ReportComponent": {
        "description": "A section of a structured report.",
        "properties": {
          "blocks": {
            "description": "Content blocks within this section.",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/HeaderBlock"
                },
                {
                  "$ref": "#/components/schemas/TextBlock"
                },
                {
                  "$ref": "#/components/schemas/StructuredBlock"
                }
              ]
            },
            "title": "Blocks",
            "type": "array"
          },
          "component_type": {
            "$ref": "#/components/schemas/ComponentType",
            "description": "Type of report section."
          },
          "title": {
            "description": "Section title.",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "component_type",
          "title"
        ],
        "title": "ReportComponent",
        "type": "object"
      },
      "RollingTimeRange": {
        "description": "Predefined rolling time windows for filtering data.",
        "enum": [
          "last_24_hours",
          "last_7_days",
          "last_30_days",
          "last_60_days",
          "last_90_days",
          "last_180_days",
          "last_365_days"
        ],
        "title": "RollingTimeRange",
        "type": "string"
      },
      "SearchAuditV1": {
        "description": "Audit trace for a search operation.",
        "properties": {
          "audit_type": {
            "const": "SearchAuditV1",
            "default": "SearchAuditV1",
            "title": "Audit Type",
            "type": "string"
          },
          "query": {
            "$ref": "#/components/schemas/TraceQuery",
            "description": "The query that was executed."
          },
          "results": {
            "description": "Search results grouped by source type.",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AuditTraceBigdataResult"
                },
                {
                  "$ref": "#/components/schemas/AuditTraceExternalResult"
                }
              ]
            },
            "title": "Results",
            "type": "array"
          },
          "tool_id": {
            "description": "Identifier of the tool that produced this trace.",
            "title": "Tool Id",
            "type": "string"
          }
        },
        "required": [
          "tool_id",
          "query",
          "results"
        ],
        "title": "SearchAuditV1",
        "type": "object"
      },
      "SearchConsumption": {
        "description": "Search tokens consumed against a content tier.",
        "properties": {
          "content_tier": {
            "description": "Content tier the search ran against.",
            "title": "Content Tier",
            "type": "string"
          },
          "mode": {
            "const": "fast",
            "default": "fast",
            "description": "Search mode the tokens were consumed in.",
            "title": "Mode",
            "type": "string"
          },
          "tokens_count": {
            "description": "Number of search tokens consumed.",
            "title": "Tokens Count",
            "type": "integer"
          },
          "type": {
            "const": "search",
            "default": "search",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "content_tier",
          "tokens_count"
        ],
        "title": "SearchConsumption",
        "type": "object"
      },
      "SearchEndpointConsumption": {
        "description": "Search tokens consumed against a specific search endpoint.",
        "properties": {
          "endpoint": {
            "description": "Search endpoint the tokens were consumed against.",
            "enum": [
              "comentions",
              "volume",
              "knowledge-graph"
            ],
            "title": "Endpoint",
            "type": "string"
          },
          "tokens_count": {
            "description": "Number of search tokens consumed.",
            "title": "Tokens Count",
            "type": "integer"
          },
          "type": {
            "const": "search_endpoint",
            "default": "search_endpoint",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "endpoint",
          "tokens_count"
        ],
        "title": "SearchEndpointConsumption",
        "type": "object"
      },
      "SourceFilter": {
        "description": "Filter by content source identifiers.",
        "properties": {
          "sources_ids": {
            "description": "Set of source IDs to match.",
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "minItems": 1,
            "title": "Sources Ids",
            "type": "array",
            "uniqueItems": true
          },
          "type": {
            "const": "SOURCE_TYPE",
            "description": "Filter type identifier.",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "sources_ids"
        ],
        "title": "SourceFilter",
        "type": "object"
      },
      "Step": {
        "description": "A single step within a research plan.",
        "properties": {
          "description": {
            "description": "What this step will investigate or produce.",
            "title": "Description",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/StepStatus",
            "default": "NOT_STARTED",
            "description": "Current status of this step."
          }
        },
        "required": [
          "description"
        ],
        "title": "Step",
        "type": "object"
      },
      "StepStatus": {
        "description": "Status of a research plan step.",
        "enum": [
          "NOT_STARTED",
          "IN_PROGRESS",
          "COMPLETED",
          "SKIPPED",
          "FAILED"
        ],
        "title": "StepStatus",
        "type": "string"
      },
      "StructuredBlock": {
        "description": "A structured data block (e.g., table) within a report section.",
        "properties": {
          "block_type": {
            "const": "structured",
            "default": "structured",
            "description": "Block type identifier.",
            "title": "Block Type",
            "type": "string"
          },
          "structured_type": {
            "$ref": "#/components/schemas/StructuredType",
            "default": "table",
            "description": "Type of structured data."
          },
          "table": {
            "$ref": "#/components/schemas/DataTable",
            "description": "Table data."
          }
        },
        "required": [
          "table"
        ],
        "title": "StructuredBlock",
        "type": "object"
      },
      "StructuredDataConsumption": {
        "description": "Structured-data tokens consumed against a content tier.",
        "properties": {
          "content_tier": {
            "description": "Content tier the structured-data read ran against.",
            "title": "Content Tier",
            "type": "string"
          },
          "tokens_count": {
            "description": "Number of structured-data tokens consumed.",
            "title": "Tokens Count",
            "type": "integer"
          },
          "type": {
            "const": "structured_data",
            "default": "structured_data",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "content_tier",
          "tokens_count"
        ],
        "title": "StructuredDataConsumption",
        "type": "object"
      },
      "StructuredOutputMessage": {
        "description": "Structured data extracted from the research results.",
        "properties": {
          "content": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "items": {},
                "type": "array"
              }
            ],
            "description": "Extracted structured data matching the requested schema.",
            "title": "Content"
          },
          "json_schema": {
            "additionalProperties": true,
            "description": "The JSON Schema used to produce this output.",
            "title": "Json Schema",
            "type": "object"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "STRUCTURED_OUTPUT",
            "default": "STRUCTURED_OUTPUT",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "json_schema",
          "content"
        ],
        "title": "StructuredOutputMessage",
        "type": "object"
      },
      "StructuredReport": {
        "description": "A structured report with multiple sections.",
        "properties": {
          "components": {
            "description": "Report sections.",
            "items": {
              "$ref": "#/components/schemas/ReportComponent"
            },
            "title": "Components",
            "type": "array"
          },
          "title": {
            "description": "Report title.",
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "StructuredReport",
        "type": "object"
      },
      "StructuredReportAuditV1": {
        "description": "Audit trace for a structured data report.",
        "properties": {
          "audit_type": {
            "const": "StructuredReportAuditV1",
            "default": "StructuredReportAuditV1",
            "title": "Audit Type",
            "type": "string"
          },
          "structured_report": {
            "$ref": "#/components/schemas/StructuredReport",
            "description": "The generated structured report."
          },
          "tool_id": {
            "description": "Identifier of the tool that produced this trace.",
            "title": "Tool Id",
            "type": "string"
          }
        },
        "required": [
          "tool_id",
          "structured_report"
        ],
        "title": "StructuredReportAuditV1",
        "type": "object"
      },
      "StructuredType": {
        "description": "Types of structured data blocks.",
        "enum": [
          "table"
        ],
        "title": "StructuredType",
        "type": "string"
      },
      "SubAgentCompletedAuditV1": {
        "description": "Audit trace emitted when a sub-agent finishes its research task.",
        "properties": {
          "audit_type": {
            "const": "SubAgentCompletedAuditV1",
            "default": "SubAgentCompletedAuditV1",
            "title": "Audit Type",
            "type": "string"
          },
          "consumption": {
            "description": "Resource usage for this sub-agent's execution.",
            "items": {
              "discriminator": {
                "mapping": {
                  "base": "#/components/schemas/TokenTierConsumption",
                  "pro": "#/components/schemas/TokenTierConsumption",
                  "search": "#/components/schemas/SearchConsumption",
                  "search_endpoint": "#/components/schemas/SearchEndpointConsumption",
                  "structured_data": "#/components/schemas/StructuredDataConsumption"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TokenTierConsumption"
                },
                {
                  "$ref": "#/components/schemas/SearchConsumption"
                },
                {
                  "$ref": "#/components/schemas/StructuredDataConsumption"
                },
                {
                  "$ref": "#/components/schemas/SearchEndpointConsumption"
                }
              ]
            },
            "title": "Consumption",
            "type": "array"
          },
          "success": {
            "description": "Whether the sub-agent completed successfully.",
            "title": "Success",
            "type": "boolean"
          },
          "tool_id": {
            "description": "Identifier of the tool that produced this trace.",
            "title": "Tool Id",
            "type": "string"
          }
        },
        "required": [
          "tool_id",
          "success"
        ],
        "title": "SubAgentCompletedAuditV1",
        "type": "object"
      },
      "SubAgentStartedAuditV1": {
        "description": "Audit trace emitted when a sub-agent begins its research task.",
        "properties": {
          "agent_role": {
            "description": "Role name of the sub-agent.",
            "title": "Agent Role",
            "type": "string"
          },
          "audit_type": {
            "const": "SubAgentStartedAuditV1",
            "default": "SubAgentStartedAuditV1",
            "title": "Audit Type",
            "type": "string"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Plan"
              },
              {
                "type": "null"
              }
            ],
            "description": "The sub-agent's research plan, if available."
          },
          "plan_title": {
            "description": "Title of the sub-agent's research plan.",
            "title": "Plan Title",
            "type": "string"
          },
          "step_index": {
            "description": "Index of the plan step this sub-agent is executing.",
            "title": "Step Index",
            "type": "integer"
          },
          "tool_id": {
            "description": "Identifier of the tool that produced this trace.",
            "title": "Tool Id",
            "type": "string"
          }
        },
        "required": [
          "tool_id",
          "agent_role",
          "plan_title",
          "step_index"
        ],
        "title": "SubAgentStartedAuditV1",
        "type": "object"
      },
      "TextBlock": {
        "description": "A plain text block within a report section.",
        "properties": {
          "block_type": {
            "const": "text",
            "default": "text",
            "description": "Block type identifier.",
            "title": "Block Type",
            "type": "string"
          },
          "content": {
            "description": "Text content.",
            "title": "Content",
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "title": "TextBlock",
        "type": "object"
      },
      "ThinkingMessage": {
        "description": "The agent's intermediate reasoning while researching.",
        "properties": {
          "content": {
            "description": "The agent's reasoning text.",
            "title": "Content",
            "type": "string"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "type": {
            "const": "THINKING",
            "default": "THINKING",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "title": "ThinkingMessage",
        "type": "object"
      },
      "TokenTierConsumption": {
        "description": "Token usage for a specific model tier.",
        "properties": {
          "cached_tokens": {
            "default": 0,
            "description": "Number of tokens served from cache.",
            "title": "Cached Tokens",
            "type": "integer"
          },
          "input_tokens": {
            "description": "Number of input tokens consumed.",
            "title": "Input Tokens",
            "type": "integer"
          },
          "output_tokens": {
            "description": "Number of output tokens generated.",
            "title": "Output Tokens",
            "type": "integer"
          },
          "type": {
            "description": "Model tier this consumption applies to.",
            "enum": [
              "base",
              "pro"
            ],
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "input_tokens",
          "output_tokens"
        ],
        "title": "TokenTierConsumption",
        "type": "object"
      },
      "ToolErrorMessage": {
        "description": "A recoverable error from a specific tool.",
        "properties": {
          "error": {
            "description": "Error description.",
            "title": "Error",
            "type": "string"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Groups related message chunks that belong to the same logical unit.",
            "title": "Message Id"
          },
          "role": {
            "default": "assistant",
            "description": "Message source: 'assistant' for the main agent, or a sub-agent role name.",
            "title": "Role",
            "type": "string"
          },
          "tool_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the tool that encountered the error.",
            "title": "Tool Name"
          },
          "type": {
            "const": "TOOL_ERROR",
            "default": "TOOL_ERROR",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "title": "ToolErrorMessage",
        "type": "object"
      },
      "TraceQuery": {
        "description": "A search query executed by the agent.",
        "properties": {
          "text": {
            "description": "The search query text.",
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "text"
        ],
        "title": "TraceQuery",
        "type": "object"
      },
      "UpdateWorkflowTemplateRequest": {
        "description": "Fields to update on an existing workflow template. All fields are optional.",
        "properties": {
          "content_filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentFilter"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "expected_input": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/WorkflowInputSchema"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inputs the template expects. Each key is an abstract snake_case NAME, not a value. Reference a key as {{ key }} in the prompt to substitute its value inline; an unreferenced key is still provided to the model as attached context.",
            "title": "Expected Input"
          },
          "expected_output": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Output"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt"
          },
          "ranking_parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RankingParameters"
              },
              {
                "type": "null"
              }
            ]
          },
          "research_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Plan"
              },
              {
                "type": "null"
              }
            ]
          },
          "tools_configs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-tool configuration stored with the template, keyed by tool id. Two key families are supported: `python_code_execution` (toggles sandboxed Python and chart rendering for every run) and connector tool ids in the `<connector>__<tool>` form (e.g. `\"factset__FactSet_Fundamentals\": {\"enabled\": true}`). Search settings belong in `content_filter`, `ranking_parameters`, or the execution request \u2014 not here. See `GET /v1/tools` for each connector tool's config schema.",
            "examples": [
              {
                "factset__FactSet_Fundamentals": {
                  "enabled": true
                },
                "python_code_execution": {
                  "chart_generation_enabled": false,
                  "enabled": true
                }
              }
            ],
            "title": "Tools Configs"
          }
        },
        "title": "UpdateWorkflowTemplateRequest",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WorkflowExecuteRequest": {
        "description": "Request to execute a workflow.",
        "properties": {
          "execution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provide a previous execution ID to resume a workflow conversation.",
            "title": "Execution Id"
          },
          "input": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Input values for template placeholders.",
            "title": "Input"
          },
          "model_name": {
            "$ref": "#/components/schemas/ModelName",
            "default": "base",
            "description": "Selects the model capability tier. Use \"base\" for the default routing strategy, or \"pro\" to allow the most capable available model when higher reasoning or accuracy is required. Model selection is dynamic and may vary based on task type, availability, and failover."
          },
          "template": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/CreateWorkflowTemplate"
              }
            ],
            "description": "Template ID (string) or inline template definition (object).",
            "title": "Template"
          },
          "time_range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RollingTimeRange"
              },
              {
                "$ref": "#/components/schemas/DateRange"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time range filter for the workflow. Omit for unconstrained.",
            "title": "Time Range"
          }
        },
        "required": [
          "template"
        ],
        "title": "WorkflowExecuteRequest",
        "type": "object"
      },
      "WorkflowInputSchema": {
        "description": "Defines an input placeholder in a workflow template.",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/WorkflowInputTypes",
            "description": "Expected input type for this placeholder."
          }
        },
        "required": [
          "type"
        ],
        "title": "WorkflowInputSchema",
        "type": "object"
      },
      "WorkflowInputTypes": {
        "description": "Supported input types for workflow template placeholders.",
        "enum": [
          "rp_entity_id",
          "string"
        ],
        "title": "WorkflowInputTypes",
        "type": "string"
      },
      "WorkflowStreamingDelta": {
        "description": "A single streaming event from a workflow execution.",
        "properties": {
          "delta": {
            "description": "The streamed message event.",
            "discriminator": {
              "mapping": {
                "ACTION": "#/components/schemas/ActionMessage",
                "ANSWER": "#/components/schemas/AnswerMessage",
                "AUDIT": "#/components/schemas/AuditMessage",
                "CHART": "#/components/schemas/ChartMessage",
                "COMPLETE": "#/components/schemas/CompleteMessage",
                "ERROR": "#/components/schemas/ErrorMessage",
                "GROUNDING": "#/components/schemas/GroundingMessage",
                "LLM_RETRY": "#/components/schemas/LlmRetryMessage",
                "PLANNING": "#/components/schemas/PlanningMessage",
                "STRUCTURED_OUTPUT": "#/components/schemas/StructuredOutputMessage",
                "THINKING": "#/components/schemas/ThinkingMessage",
                "TOOL_ERROR": "#/components/schemas/ToolErrorMessage"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/components/schemas/ThinkingMessage"
              },
              {
                "$ref": "#/components/schemas/ActionMessage"
              },
              {
                "$ref": "#/components/schemas/AnswerMessage"
              },
              {
                "$ref": "#/components/schemas/CompleteMessage"
              },
              {
                "$ref": "#/components/schemas/ErrorMessage"
              },
              {
                "$ref": "#/components/schemas/AuditMessage"
              },
              {
                "$ref": "#/components/schemas/GroundingMessage"
              },
              {
                "$ref": "#/components/schemas/ChartMessage"
              },
              {
                "$ref": "#/components/schemas/ToolErrorMessage"
              },
              {
                "$ref": "#/components/schemas/PlanningMessage"
              },
              {
                "$ref": "#/components/schemas/LlmRetryMessage"
              },
              {
                "$ref": "#/components/schemas/StructuredOutputMessage"
              }
            ],
            "title": "Delta"
          },
          "execution_id": {
            "description": "Workflow conversation identifier. Use this to resume the conversation.",
            "title": "Execution Id",
            "type": "string"
          },
          "request_id": {
            "description": "Unique identifier for this request.",
            "title": "Request Id",
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "execution_id",
          "delta"
        ],
        "title": "WorkflowStreamingDelta",
        "type": "object"
      },
      "WorkflowTemplate": {
        "description": "A complete workflow template with all metadata.",
        "properties": {
          "content_filter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentFilter"
              },
              {
                "type": "null"
              }
            ],
            "description": "Content filters applied to all searches."
          },
          "created_at": {
            "description": "When the template was created.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Brief description of what this template does.",
            "title": "Description"
          },
          "expected_input": {
            "anyOf": [
              {
                "additionalProperties": {
                  "$ref": "#/components/schemas/WorkflowInputSchema"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inputs keyed by abstract snake_case NAME. Reference a key as {{ key }} in the prompt to substitute its value inline; an unreferenced key is still provided to the model as attached context.",
            "title": "Expected Input"
          },
          "expected_output": {
            "anyOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional guidance for the final answer's tone, structure, and format.",
            "title": "Expected Output"
          },
          "id": {
            "description": "Unique template identifier.",
            "title": "Id",
            "type": "string"
          },
          "is_community": {
            "description": "Whether this is a community-shared template.",
            "title": "Is Community",
            "type": "boolean"
          },
          "name": {
            "description": "Template display name.",
            "title": "Name",
            "type": "string"
          },
          "prompt": {
            "description": "The research prompt with optional placeholders.",
            "title": "Prompt",
            "type": "string"
          },
          "ranking_parameters": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RankingParameters"
              },
              {
                "type": "null"
              }
            ],
            "description": "Search result ranking configuration."
          },
          "research_plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Plan"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pre-defined research plan."
          },
          "tools_configs": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-tool configuration stored with the template, keyed by tool id. Two key families are supported: `python_code_execution` (toggles sandboxed Python and chart rendering for every run) and connector tool ids in the `<connector>__<tool>` form (e.g. `\"factset__FactSet_Fundamentals\": {\"enabled\": true}`). Search settings belong in `content_filter`, `ranking_parameters`, or the execution request \u2014 not here. See `GET /v1/tools` for each connector tool's config schema.",
            "examples": [
              {
                "factset__FactSet_Fundamentals": {
                  "enabled": true
                },
                "python_code_execution": {
                  "chart_generation_enabled": false,
                  "enabled": true
                }
              }
            ],
            "title": "Tools Configs"
          },
          "updated_at": {
            "description": "When the template was last modified.",
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "prompt",
          "is_community",
          "created_at",
          "updated_at"
        ],
        "title": "WorkflowTemplate",
        "type": "object"
      },
      "WorkflowTemplatesResponse": {
        "description": "List of workflow templates.",
        "properties": {
          "templates": {
            "description": "Available templates.",
            "items": {
              "$ref": "#/components/schemas/WorkflowTemplate"
            },
            "title": "Templates",
            "type": "array"
          }
        },
        "required": [
          "templates"
        ],
        "title": "WorkflowTemplatesResponse",
        "type": "object"
      }
    },
    "securitySchemes": {
      "API Key Authentication": {
        "description": "API key for authentication.",
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "HTTP API for Bigdata Research Agent and Deep-Research capabilities",
    "title": "Bigdata Research Agent API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/workflow/execute": {
      "post": {
        "description": "Execute a workflow with an inline template definition or a stored template ID. Returns a streaming response via Server-Sent Events.",
        "operationId": "execute_workflow_v1_workflow_execute_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowExecuteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowStreamingDelta"
                }
              },
              "text/event-stream": {}
            },
            "description": "Streaming SSE response with workflow results."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "Execute Workflow",
        "tags": [
          "Workflows"
        ]
      }
    },
    "/v1/workflow/executions": {
      "get": {
        "description": "List stored workflow executions owned by the authenticated user, newest first. Only runs executed with `persistence_mode=enabled` are stored and returned.",
        "operationId": "list_executions_v1_workflow_executions_get",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "template_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Template Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionListResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "List Executions",
        "tags": [
          "Workflow Executions"
        ]
      }
    },
    "/v1/workflow/executions/{execution_id}": {
      "get": {
        "description": "Retrieve a stored workflow execution by ID, including its status, resource consumption, and the full result stream replayed in order. This is how you read a run's result after the streaming connection has closed.",
        "operationId": "get_execution_v1_workflow_executions__execution_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "execution_id",
            "required": true,
            "schema": {
              "title": "Execution Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "Get Execution",
        "tags": [
          "Workflow Executions"
        ]
      }
    },
    "/v1/workflow/templates": {
      "get": {
        "description": "List all workflow templates owned by the authenticated user.",
        "operationId": "list_templates_v1_workflow_templates_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTemplatesResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "List Templates",
        "tags": [
          "Workflow Templates"
        ]
      },
      "post": {
        "description": "Create a new workflow template.",
        "operationId": "create_template_v1_workflow_templates_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkflowTemplate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTemplate"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "Create Template",
        "tags": [
          "Workflow Templates"
        ]
      }
    },
    "/v1/workflow/templates/community": {
      "get": {
        "description": "List publicly available community workflow templates.",
        "operationId": "list_community_templates_v1_workflow_templates_community_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTemplatesResponse"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "List Community Templates",
        "tags": [
          "Workflow Templates"
        ]
      }
    },
    "/v1/workflow/templates/{template_id}": {
      "delete": {
        "description": "Permanently delete a workflow template.",
        "operationId": "delete_template_v1_workflow_templates__template_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "template_id",
            "required": true,
            "schema": {
              "title": "Template Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "Delete Template",
        "tags": [
          "Workflow Templates"
        ]
      },
      "get": {
        "description": "Retrieve a specific workflow template by ID.",
        "operationId": "get_template_v1_workflow_templates__template_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "template_id",
            "required": true,
            "schema": {
              "title": "Template Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTemplate"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "Get Template",
        "tags": [
          "Workflow Templates"
        ]
      },
      "put": {
        "description": "Update an existing workflow template. Only provided fields are modified.",
        "operationId": "update_template_v1_workflow_templates__template_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "template_id",
            "required": true,
            "schema": {
              "title": "Template Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkflowTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTemplate"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "Update Template",
        "tags": [
          "Workflow Templates"
        ]
      }
    },
    "/v1/workflow/templates/{template_id}/clone": {
      "post": {
        "description": "Create a copy of an existing template with optional field overrides.",
        "operationId": "clone_template_v1_workflow_templates__template_id__clone_post",
        "parameters": [
          {
            "in": "path",
            "name": "template_id",
            "required": true,
            "schema": {
              "title": "Template Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CloneWorkflowTemplateRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowTemplate"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "API Key Authentication": []
          }
        ],
        "summary": "Clone Template",
        "tags": [
          "Workflow Templates"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Production server",
      "url": "https://agents.bigdata.com"
    }
  ]
}
