{
  "components": {
    "schemas": {
      "data_catalog": {
        "additionalProperties": false,
        "properties": {
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/data_catalog__ResourceKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "default": 20,
            "format": "uint32",
            "maximum": 50.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "query": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "title": "CatalogInput",
        "type": "object"
      },
      "data_catalog__ResourceKind": {
        "enum": [
          "dataset",
          "recipe",
          "action",
          "entity",
          "host_template"
        ],
        "type": "string"
      },
      "data_describe": {
        "additionalProperties": false,
        "properties": {
          "installation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/data_describe__ResourceKind"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "name"
        ],
        "title": "DescribeInput",
        "type": "object"
      },
      "data_describe__ResourceKind": {
        "enum": [
          "dataset",
          "recipe",
          "action",
          "entity",
          "host_template"
        ],
        "type": "string"
      },
      "data_query": {
        "additionalProperties": false,
        "properties": {
          "dataset": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "limits": {
            "allOf": [
              {
                "$ref": "#/components/schemas/data_query__EngineLimits"
              }
            ],
            "default": {
              "max_charge_microusd": 100000,
              "max_connector_microusd": 0,
              "max_memory_bytes": 67108864,
              "max_output_bytes": 262144,
              "max_output_rows": 50,
              "max_scan_bytes": 8388608,
              "max_scan_rows": 10000,
              "max_storage_bytes": 1048576,
              "timeout_ms": 30000
            }
          },
          "sql": {
            "description": "One bounded SELECT of the named dataset. Joins and arbitrary code are unsupported.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "dataset",
          "idempotency_key"
        ],
        "title": "QueryInput",
        "type": "object"
      },
      "data_query__EngineLimits": {
        "additionalProperties": false,
        "properties": {
          "max_charge_microusd": {
            "default": 100000,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_connector_microusd": {
            "default": 0,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_memory_bytes": {
            "default": 67108864,
            "description": "Cooperative invocation memory allowance, checked at future poll boundaries.",
            "format": "uint64",
            "maximum": 268435456.0,
            "minimum": 1048576.0,
            "type": "integer"
          },
          "max_output_bytes": {
            "default": 262144,
            "format": "uint64",
            "maximum": 1048576.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_output_rows": {
            "default": 50,
            "format": "uint32",
            "maximum": 1000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_scan_bytes": {
            "default": 8388608,
            "format": "uint64",
            "maximum": 33554432.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_scan_rows": {
            "default": 10000,
            "format": "uint32",
            "maximum": 100000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_storage_bytes": {
            "default": 1048576,
            "format": "uint64",
            "maximum": 4194304.0,
            "minimum": 0.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "timeout_ms": {
            "default": 30000,
            "format": "uint32",
            "maximum": 120000.0,
            "minimum": 100.0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "data_write": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "$ref": "#/components/schemas/data_write__WriteAction"
          },
          "entity_id": {
            "type": "string"
          },
          "entity_type": {
            "type": "string"
          },
          "fields": true,
          "idempotency_key": {
            "type": "string"
          },
          "installation_id": {
            "type": "string"
          },
          "limits": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/data_write__EngineLimits"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "action",
          "entity_id",
          "entity_type",
          "fields",
          "idempotency_key",
          "installation_id"
        ],
        "title": "WriteInput",
        "type": "object"
      },
      "data_write__EngineLimits": {
        "additionalProperties": false,
        "properties": {
          "max_charge_microusd": {
            "default": 100000,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_connector_microusd": {
            "default": 0,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_memory_bytes": {
            "default": 67108864,
            "description": "Cooperative invocation memory allowance, checked at future poll boundaries.",
            "format": "uint64",
            "maximum": 268435456.0,
            "minimum": 1048576.0,
            "type": "integer"
          },
          "max_output_bytes": {
            "default": 262144,
            "format": "uint64",
            "maximum": 1048576.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_output_rows": {
            "default": 50,
            "format": "uint32",
            "maximum": 1000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_scan_bytes": {
            "default": 8388608,
            "format": "uint64",
            "maximum": 33554432.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_scan_rows": {
            "default": 10000,
            "format": "uint32",
            "maximum": 100000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_storage_bytes": {
            "default": 1048576,
            "format": "uint64",
            "maximum": 4194304.0,
            "minimum": 0.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "timeout_ms": {
            "default": 30000,
            "format": "uint32",
            "maximum": 120000.0,
            "minimum": 100.0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "data_write__WriteAction": {
        "enum": [
          "create",
          "set_fields"
        ],
        "type": "string"
      },
      "list_storage_datasets": {
        "additionalProperties": false,
        "properties": {
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/list_storage_datasets__ResourceKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "default": 20,
            "format": "uint32",
            "maximum": 50.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "query": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "title": "CatalogInput",
        "type": "object"
      },
      "list_storage_datasets__ResourceKind": {
        "enum": [
          "dataset",
          "recipe",
          "action",
          "entity",
          "host_template"
        ],
        "type": "string"
      },
      "load_storage_dataset": {
        "additionalProperties": false,
        "properties": {
          "columns": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "filter": {
            "type": [
              "string",
              "null"
            ]
          },
          "idempotency_key": {
            "description": "Paid reads need a stable task key; retry the same key after a lost reply.",
            "type": "string"
          },
          "limit": {
            "format": "uint32",
            "minimum": 0.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "limits": {
            "allOf": [
              {
                "$ref": "#/components/schemas/load_storage_dataset__EngineLimits"
              }
            ],
            "default": {
              "max_charge_microusd": 100000,
              "max_connector_microusd": 0,
              "max_memory_bytes": 67108864,
              "max_output_bytes": 262144,
              "max_output_rows": 50,
              "max_scan_bytes": 8388608,
              "max_scan_rows": 10000,
              "max_storage_bytes": 1048576,
              "timeout_ms": 30000
            }
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "idempotency_key",
          "name"
        ],
        "title": "LegacyLoadInput",
        "type": "object"
      },
      "load_storage_dataset__EngineLimits": {
        "additionalProperties": false,
        "properties": {
          "max_charge_microusd": {
            "default": 100000,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_connector_microusd": {
            "default": 0,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_memory_bytes": {
            "default": 67108864,
            "description": "Cooperative invocation memory allowance, checked at future poll boundaries.",
            "format": "uint64",
            "maximum": 268435456.0,
            "minimum": 1048576.0,
            "type": "integer"
          },
          "max_output_bytes": {
            "default": 262144,
            "format": "uint64",
            "maximum": 1048576.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_output_rows": {
            "default": 50,
            "format": "uint32",
            "maximum": 1000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_scan_bytes": {
            "default": 8388608,
            "format": "uint64",
            "maximum": 33554432.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_scan_rows": {
            "default": 10000,
            "format": "uint32",
            "maximum": 100000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_storage_bytes": {
            "default": 1048576,
            "format": "uint64",
            "maximum": 4194304.0,
            "minimum": 0.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "timeout_ms": {
            "default": 30000,
            "format": "uint32",
            "maximum": 120000.0,
            "minimum": 100.0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "pipeline_host": {
        "additionalProperties": false,
        "description": "A single management tool keeps recurring operations out of ordinary reads.",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/pipeline_host__HostAction"
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "daily_budget_microusd": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "host_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "idempotency_key": {
            "description": "Required for prepare, deploy, activate, pause and rollback. Reuse on retries.",
            "type": [
              "string",
              "null"
            ]
          },
          "interval_seconds": {
            "description": "Whole minutes, 60..2592000 seconds. Activation is always explicit.",
            "format": "uint32",
            "minimum": 0.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "limit": {
            "description": "Results pages contain at most 100 rows; omitted means 20.",
            "format": "uint32",
            "maximum": 100.0,
            "minimum": 1.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "monthly_budget_microusd": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "prepared_ref": {
            "type": [
              "string",
              "null"
            ]
          },
          "template": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/pipeline_host__HostedTemplate"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional reviewed hosting behavior; fixed when the host is prepared."
          }
        },
        "required": [
          "action"
        ],
        "title": "HostInput",
        "type": "object"
      },
      "pipeline_host__HostAction": {
        "enum": [
          "prepare",
          "deploy",
          "status",
          "activate",
          "pause",
          "rollback",
          "export",
          "results"
        ],
        "type": "string"
      },
      "pipeline_host__HostedTemplate": {
        "oneOf": [
          {
            "description": "Compare complete dataset-read snapshots; partial scans never advance the baseline.",
            "enum": [
              "change-monitor"
            ],
            "type": "string"
          },
          {
            "description": "Serve the latest complete committed run through the authenticated host results action.",
            "enum": [
              "research-endpoint"
            ],
            "type": "string"
          }
        ]
      },
      "pipeline_prepare": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "type": [
              "string",
              "null"
            ]
          },
          "input_dataset": {
            "type": [
              "string",
              "null"
            ]
          },
          "installation_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "limits": {
            "allOf": [
              {
                "$ref": "#/components/schemas/pipeline_prepare__EngineLimits"
              }
            ],
            "default": {
              "max_charge_microusd": 100000,
              "max_connector_microusd": 0,
              "max_memory_bytes": 67108864,
              "max_output_bytes": 262144,
              "max_output_rows": 50,
              "max_scan_bytes": 8388608,
              "max_scan_rows": 10000,
              "max_storage_bytes": 1048576,
              "timeout_ms": 30000
            }
          },
          "output_dataset": {
            "description": "Registered sink_ summary dataset or native agent_search_result_v1 output.",
            "type": [
              "string",
              "null"
            ]
          },
          "parameters": {
            "default": {}
          },
          "recipe": {
            "description": "dataset-read, dataset-summary or search-to-dataset; mutually exclusive with an installed action.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "title": "PrepareInput",
        "type": "object"
      },
      "pipeline_prepare__EngineLimits": {
        "additionalProperties": false,
        "properties": {
          "max_charge_microusd": {
            "default": 100000,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_connector_microusd": {
            "default": 0,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_memory_bytes": {
            "default": 67108864,
            "description": "Cooperative invocation memory allowance, checked at future poll boundaries.",
            "format": "uint64",
            "maximum": 268435456.0,
            "minimum": 1048576.0,
            "type": "integer"
          },
          "max_output_bytes": {
            "default": 262144,
            "format": "uint64",
            "maximum": 1048576.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_output_rows": {
            "default": 50,
            "format": "uint32",
            "maximum": 1000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_scan_bytes": {
            "default": 8388608,
            "format": "uint64",
            "maximum": 33554432.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_scan_rows": {
            "default": 10000,
            "format": "uint32",
            "maximum": 100000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_storage_bytes": {
            "default": 1048576,
            "format": "uint64",
            "maximum": 4194304.0,
            "minimum": 0.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "timeout_ms": {
            "default": 30000,
            "format": "uint32",
            "maximum": 120000.0,
            "minimum": 100.0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "pipeline_results": {
        "additionalProperties": false,
        "properties": {
          "columns": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "limit": {
            "default": 20,
            "format": "uint32",
            "maximum": 100.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "run_ref": {
            "type": "string"
          }
        },
        "required": [
          "run_ref"
        ],
        "title": "ResultsInput",
        "type": "object"
      },
      "pipeline_run": {
        "additionalProperties": false,
        "properties": {
          "idempotency_key": {
            "type": "string"
          },
          "prepared_ref": {
            "type": "string"
          }
        },
        "required": [
          "idempotency_key",
          "prepared_ref"
        ],
        "title": "RunInput",
        "type": "object"
      },
      "pipeline_status": {
        "additionalProperties": false,
        "properties": {
          "run_ref": {
            "type": "string"
          }
        },
        "required": [
          "run_ref"
        ],
        "title": "StatusInput",
        "type": "object"
      },
      "query_data": {
        "additionalProperties": false,
        "properties": {
          "dataset": {
            "type": "string"
          },
          "idempotency_key": {
            "type": "string"
          },
          "limits": {
            "allOf": [
              {
                "$ref": "#/components/schemas/query_data__EngineLimits"
              }
            ],
            "default": {
              "max_charge_microusd": 100000,
              "max_connector_microusd": 0,
              "max_memory_bytes": 67108864,
              "max_output_bytes": 262144,
              "max_output_rows": 50,
              "max_scan_bytes": 8388608,
              "max_scan_rows": 10000,
              "max_storage_bytes": 1048576,
              "timeout_ms": 30000
            }
          },
          "sql": {
            "description": "One bounded SELECT of the named dataset. Joins and arbitrary code are unsupported.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "dataset",
          "idempotency_key"
        ],
        "title": "QueryInput",
        "type": "object"
      },
      "query_data__EngineLimits": {
        "additionalProperties": false,
        "properties": {
          "max_charge_microusd": {
            "default": 100000,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_connector_microusd": {
            "default": 0,
            "format": "int64",
            "minimum": 0.0,
            "type": "integer"
          },
          "max_memory_bytes": {
            "default": 67108864,
            "description": "Cooperative invocation memory allowance, checked at future poll boundaries.",
            "format": "uint64",
            "maximum": 268435456.0,
            "minimum": 1048576.0,
            "type": "integer"
          },
          "max_output_bytes": {
            "default": 262144,
            "format": "uint64",
            "maximum": 1048576.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_output_rows": {
            "default": 50,
            "format": "uint32",
            "maximum": 1000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_scan_bytes": {
            "default": 8388608,
            "format": "uint64",
            "maximum": 33554432.0,
            "minimum": 1024.0,
            "type": "integer"
          },
          "max_scan_rows": {
            "default": 10000,
            "format": "uint32",
            "maximum": 100000.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "max_storage_bytes": {
            "default": 1048576,
            "format": "uint64",
            "maximum": 4194304.0,
            "minimum": 0.0,
            "type": [
              "integer",
              "null"
            ]
          },
          "timeout_ms": {
            "default": 30000,
            "format": "uint32",
            "maximum": 120000.0,
            "minimum": 100.0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "query_datasets": {
        "additionalProperties": false,
        "properties": {
          "cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/query_datasets__ResourceKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "default": 20,
            "format": "uint32",
            "maximum": 50.0,
            "minimum": 1.0,
            "type": "integer"
          },
          "query": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "title": "CatalogInput",
        "type": "object"
      },
      "query_datasets__ResourceKind": {
        "enum": [
          "dataset",
          "recipe",
          "action",
          "entity",
          "host_template"
        ],
        "type": "string"
      },
      "query_schema": {
        "additionalProperties": false,
        "description": "Compatibility names use the same DES boundary, never a process-local cache.",
        "properties": {
          "dataset": {
            "type": "string"
          }
        },
        "required": [
          "dataset"
        ],
        "title": "LegacyDescribeInput",
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "description": "An sk-rg API key. Authorization: Bearer is preferred.",
        "in": "header",
        "name": "X-Api-Key",
        "type": "apiKey"
      },
      "bearerAuth": {
        "description": "Send an sk-rg API key or account token as a bearer token.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Public reference for authenticated agent access. Use the installation's application origin and your own credential. Discover live schemas and grants before acting. Prepare an action, run with a stable idempotency_key, then inspect its run_ref with pipeline_status and pipeline_results. An accepted run is not a succeeded operation.",
    "title": "Redgold Agent API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/agent/data/data_catalog": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "data_catalog",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/data_catalog"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Discover accessible registered dataset schemas, reviewed recipes and installed actions; no row scan.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/data_describe": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "data_describe",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/data_describe"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Inspect native schema, exact callable revision, defaults and supported parameters.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/data_query": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "data_query",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/data_query"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Run a prepaid bounded SELECT of one registered dataset. Use a stable idempotency key.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/data_write": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "data_write",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/data_write"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Apply create or set_fields to an installed typed entity. Validates current grants and server-owned fields.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/list_storage_datasets": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "list_storage_datasets",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/list_storage_datasets"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Compatibility alias for paged accessible DES dataset discovery; no row scan or loading.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/load_storage_dataset": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "load_storage_dataset",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/load_storage_dataset"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Compatibility alias for a bounded DES read; no cache is created. Supply a stable idempotency_key, then inspect the returned run.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/pipeline_host": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "pipeline_host",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pipeline_host"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Manage a budgeted hosted plan or inspect its latest committed results. Discover host_template for change-monitor and research-endpoint. Deployment starts ready-paused after a paid smoke run; activation is explicit.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/pipeline_prepare": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "pipeline_prepare",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pipeline_prepare"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Statically validate a recipe or exact installed action and quote its hard allowance; executes no effects.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/pipeline_results": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "pipeline_results",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pipeline_results"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read a small persisted result page with provenance, completeness and cost.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/pipeline_run": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "pipeline_run",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pipeline_run"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Accept one durable run from a prepared reference and stable idempotency key; retries reuse its identity.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/pipeline_status": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "pipeline_status",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pipeline_status"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read the existing run and billing state. Polling never starts another execution.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/query_data": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "query_data",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/query_data"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Compatibility alias for a bounded DES SELECT of one required dataset. Paid admission requires a stable idempotency_key.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/query_datasets": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "query_datasets",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/query_datasets"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Compatibility alias for accessible DES dataset discovery; no process-local cache required.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/agent/data/query_schema": {
      "post": {
        "description": "Bounded authenticated data and pipeline tools backed by DES.",
        "operationId": "query_schema",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/query_schema"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Compatibility alias for data_describe of one named accessible dataset.",
        "tags": [
          "agent",
          "data-engine"
        ]
      }
    },
    "/api/apps/agent-directory": {
      "get": {
        "description": "Read release-pinned application guidance in the authenticated workspace.",
        "operationId": "app-agent-directory",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "GET /api/apps/agent-directory",
        "tags": [
          "app-runtime",
          "catalog"
        ]
      }
    },
    "/api/apps/installations/{installation_id}/describe": {
      "get": {
        "description": "Read release-pinned application guidance in the authenticated workspace.",
        "operationId": "app-agent-describe",
        "parameters": [
          {
            "description": "path segment",
            "in": "path",
            "name": "installation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "GET /api/apps/installations/{installation_id}/describe",
        "tags": [
          "app-runtime",
          "catalog"
        ]
      }
    },
    "/api/apps/installations/{installation_id}/docs": {
      "get": {
        "description": "Read release-pinned application guidance in the authenticated workspace.",
        "operationId": "app-agent-docs",
        "parameters": [
          {
            "description": "path segment",
            "in": "path",
            "name": "installation_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "topic",
            "required": false,
            "schema": {
              "default": "guide",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "GET /api/apps/installations/{installation_id}/docs",
        "tags": [
          "app-runtime",
          "catalog"
        ]
      }
    },
    "/api/mcp": {
      "post": {
        "description": "Streamable HTTP MCP. Initialize, then tools/list for native input schemas and tools/call for the same DES-backed operations as HTTP. Send application/json requests. JSON-RPC errors and tool isError/structuredContent must be inspected even after HTTP 200.",
        "operationId": "mcp-tenant",
        "parameters": [
          {
            "description": "Authorized workspace claim. Omit for personal scope; use tenantClaim from app discovery.",
            "in": "header",
            "name": "x-redgold-tenant",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Accept",
            "required": true,
            "schema": {
              "const": "application/json, text/event-stream",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "id": {
                    "type": [
                      "string",
                      "integer",
                      "null"
                    ]
                  },
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                },
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "description": "Invalid arguments, state or idempotency conflict. Inspect the structured error before retrying."
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Current account, workspace or installation grants deny access."
          },
          "503": {
            "description": "Service unavailable; an uncertain reply is not proof that effects did not execute. Preserve the original retry key."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "POST /api/mcp",
        "tags": [
          "API"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://redgold.ai"
    }
  ],
  "x-redgold-ui-revision": "60f7ce3a1cd8196cf7c7fb6ebb1c3c8143f0fec4"
}