{
  "openapi": "3.1.0",
  "info": {
    "title": "FastAPI",
    "version": "0.1.0"
  },
  "paths": {
    "/api/login": {
      "post": {
        "summary": "Api Login",
        "operationId": "api_login_api_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/refresh": {
      "post": {
        "summary": "Api Refresh",
        "operationId": "api_refresh_api_refresh_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/session": {
      "get": {
        "summary": "Api Session",
        "operationId": "api_session_api_session_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/logout": {
      "post": {
        "summary": "Api Logout",
        "operationId": "api_logout_api_logout_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/health/auth": {
      "get": {
        "summary": "Auth Health",
        "operationId": "auth_health_health_auth_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "summary": "Serve Index",
        "operationId": "serve_index__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/health/live": {
      "get": {
        "summary": "Liveness",
        "operationId": "liveness_health_live_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/telemetry": {
      "get": {
        "summary": "Get Telemetry",
        "operationId": "get_telemetry_telemetry_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/monitor/synthetic": {
      "get": {
        "summary": "Synthetic Monitor History",
        "operationId": "synthetic_monitor_history_api_monitor_synthetic_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/monitor/synthetic/latest": {
      "get": {
        "summary": "Synthetic Monitor Latest",
        "operationId": "synthetic_monitor_latest_api_monitor_synthetic_latest_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/queue/status": {
      "get": {
        "summary": "Get Queue Status",
        "operationId": "get_queue_status_queue_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/agents": {
      "get": {
        "summary": "Get Agents List",
        "operationId": "get_agents_list_api_agents_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "summary": "Create New Agent",
        "operationId": "create_new_agent_api_agents_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentCreatePayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/chat/agents": {
      "get": {
        "summary": "Chat List Agents Route",
        "description": "Return the published Factory catalog in the minimal shape required by Chat.",
        "operationId": "chat_list_agents_route_api_chat_agents_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/factory/tools": {
      "get": {
        "summary": "Factory List Tools Route",
        "operationId": "factory_list_tools_route_api_factory_tools_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/factory/policy-preview": {
      "post": {
        "summary": "Factory Policy Preview Route",
        "operationId": "factory_policy_preview_route_api_factory_policy_preview_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FactoryPolicyPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/factory/simulate": {
      "post": {
        "summary": "Factory Simulate Route",
        "operationId": "factory_simulate_route_api_factory_simulate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FactorySimulationPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/factory/agents": {
      "get": {
        "summary": "Factory List Agents Route",
        "operationId": "factory_list_agents_route_api_factory_agents_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "summary": "Factory Create Agent Route",
        "operationId": "factory_create_agent_route_api_factory_agents_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentFactoryPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/factory/agents/{agent_id}": {
      "get": {
        "summary": "Factory Get Agent Route",
        "operationId": "factory_get_agent_route_api_factory_agents__agent_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Factory Update Agent Route",
        "operationId": "factory_update_agent_route_api_factory_agents__agent_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPatchPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Factory Delete Agent Route",
        "operationId": "factory_delete_agent_route_api_factory_agents__agent_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/factory/agents/{agent_id}/versions": {
      "get": {
        "summary": "Factory Agent Versions Route",
        "operationId": "factory_agent_versions_route_api_factory_agents__agent_id__versions_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/factory/agents/{agent_id}/diff/{from_version}/{to_version}": {
      "get": {
        "summary": "Factory Agent Version Diff Route",
        "operationId": "factory_agent_version_diff_route_api_factory_agents__agent_id__diff__from_version___to_version__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          },
          {
            "name": "from_version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "From Version"
            }
          },
          {
            "name": "to_version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "To Version"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/factory/agents/{agent_id}/rollback/{version}": {
      "post": {
        "summary": "Factory Rollback Agent Route",
        "operationId": "factory_rollback_agent_route_api_factory_agents__agent_id__rollback__version__post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "agent_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Agent Id"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Version"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/factory/skills": {
      "get": {
        "summary": "Factory List Skills Route",
        "operationId": "factory_list_skills_route_api_factory_skills_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "summary": "Factory Create Skill Route",
        "operationId": "factory_create_skill_route_api_factory_skills_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/cron/overview": {
      "get": {
        "summary": "Cron Overview",
        "operationId": "cron_overview_api_cron_overview_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/cron/jobs": {
      "post": {
        "summary": "Cron Create Job",
        "operationId": "cron_create_job_api_cron_jobs_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CronJobPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/cron/jobs/{job_id}/review": {
      "post": {
        "summary": "Cron Review Job",
        "operationId": "cron_review_job_api_cron_jobs__job_id__review_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CronReviewPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/cron/jobs/{job_id}": {
      "put": {
        "summary": "Cron Update Job",
        "operationId": "cron_update_job_api_cron_jobs__job_id__put",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CronJobUpdatePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Cron Delete Job",
        "operationId": "cron_delete_job_api_cron_jobs__job_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/cron/jobs/{job_id}/status": {
      "patch": {
        "summary": "Cron Set Job Status",
        "operationId": "cron_set_job_status_api_cron_jobs__job_id__status_patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CronStatusPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/cron/jobs/{job_id}/runs": {
      "get": {
        "summary": "Cron Job Runs",
        "operationId": "cron_job_runs_api_cron_jobs__job_id__runs_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Readiness",
        "operationId": "readiness_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "summary": "Readiness",
        "operationId": "readiness_health_ready_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/webhook": {
      "post": {
        "summary": "Trigger Webhook",
        "operationId": "trigger_webhook_webhook_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/workflow/status/{run_id}": {
      "get": {
        "summary": "Get Workflow Status",
        "operationId": "get_workflow_status_api_workflow_status__run_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/invoke/stream": {
      "post": {
        "summary": "Api Invoke Agent Stream",
        "description": "Versão SSE do invoke direto: tokens conforme chegam + evento final com governança.",
        "operationId": "api_invoke_agent_stream_api_agent_invoke_stream_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentInvokePayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/agent/invoke": {
      "post": {
        "summary": "Api Invoke Agent",
        "operationId": "api_invoke_agent_api_agent_invoke_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentInvokePayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/v1/consulting/diagnose": {
      "post": {
        "summary": "Api Consulting Diagnose",
        "description": "Run a bounded, read-only consulting diagnosis for an external site.",
        "operationId": "api_consulting_diagnose_api_v1_consulting_diagnose_post",
        "parameters": [
          {
            "name": "x-obot-integration-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Obot-Integration-Key"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsultingDiagnosisPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/integrations/linkedin/status": {
      "get": {
        "summary": "Linkedin Status",
        "operationId": "linkedin_status_api_integrations_linkedin_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/integrations/linkedin/connect": {
      "get": {
        "summary": "Linkedin Connect",
        "operationId": "linkedin_connect_api_integrations_linkedin_connect_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/integrations/linkedin/callback": {
      "get": {
        "summary": "Linkedin Callback",
        "operationId": "linkedin_callback_api_integrations_linkedin_callback_get",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "State"
            }
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Error"
            }
          },
          {
            "name": "error_description",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Error Description"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/invoke/multipart": {
      "post": {
        "summary": "Api Invoke Agent Multipart",
        "operationId": "api_invoke_agent_multipart_api_agent_invoke_multipart_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_api_invoke_agent_multipart_api_agent_invoke_multipart_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/workspaces": {
      "get": {
        "summary": "Get Workspaces",
        "operationId": "get_workspaces_api_workspaces_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "summary": "Create Workspace",
        "operationId": "create_workspace_api_workspaces_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceCreatePayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/workspaces/{workspace_id}": {
      "patch": {
        "summary": "Update Workspace",
        "operationId": "update_workspace_api_workspaces__workspace_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceUpdatePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Workspace",
        "operationId": "delete_workspace_api_workspaces__workspace_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/pin": {
      "post": {
        "summary": "Pin Workspace",
        "operationId": "pin_workspace_api_workspaces__workspace_id__pin_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/archive": {
      "post": {
        "summary": "Archive Workspace",
        "operationId": "archive_workspace_api_workspaces__workspace_id__archive_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/duplicate": {
      "post": {
        "summary": "Duplicate Workspace",
        "operationId": "duplicate_workspace_api_workspaces__workspace_id__duplicate_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/export": {
      "get": {
        "summary": "Export Workspace",
        "operationId": "export_workspace_api_workspaces__workspace_id__export_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "json",
              "title": "Format"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/workspaces/{workspace_id}/invoke": {
      "post": {
        "summary": "Invoke Workspace",
        "operationId": "invoke_workspace_api_workspaces__workspace_id__invoke_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "workspace_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Workspace Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceInvokePayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/logs": {
      "get": {
        "summary": "Get Logs",
        "operationId": "get_logs_logs_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/metrics": {
      "get": {
        "summary": "Get Metrics",
        "description": "Retorna métricas operacionais do cache em memória (O(1)). O cache é atualizado\nincrementalmente a cada workflow concluído via _update_metrics_on_completion().\nElimina o antipadrão anterior de re-leitura total do worker.log a cada request.",
        "operationId": "get_metrics_metrics_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/approvals": {
      "get": {
        "summary": "Get Approvals",
        "operationId": "get_approvals_approvals_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/approvals/decide": {
      "post": {
        "summary": "Decide Approval",
        "operationId": "decide_approval_approvals_decide_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionPayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v2/workflows/execute": {
      "post": {
        "summary": "Execute Workflow V2",
        "operationId": "execute_workflow_v2_v2_workflows_execute_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkflowExecutePayload"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v2/runs/{run_id}": {
      "get": {
        "summary": "Get Run Status",
        "operationId": "get_run_status_v2_runs__run_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/metrics": {
      "get": {
        "summary": "Get V2 Metrics",
        "operationId": "get_v2_metrics_v2_metrics_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v2/llm/budget": {
      "get": {
        "summary": "Get Llm Budget",
        "operationId": "get_llm_budget_v2_llm_budget_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/v2/runs/{run_id}/events": {
      "get": {
        "summary": "Get Run Events",
        "operationId": "get_run_events_v2_runs__run_id__events_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v2/runs/{run_id}/governance": {
      "get": {
        "summary": "Get Run Governance",
        "operationId": "get_run_governance_v2_runs__run_id__governance_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentCreatePayload": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "department_id": {
            "type": "string",
            "title": "Department Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "system_prompt": {
            "type": "string",
            "title": "System Prompt"
          },
          "tools_allowed": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tools Allowed"
          },
          "requires_human_approval": {
            "type": "boolean",
            "title": "Requires Human Approval",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "department_id",
          "role",
          "system_prompt",
          "tools_allowed"
        ],
        "title": "AgentCreatePayload"
      },
      "AgentFactoryPayload": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "department_id": {
            "type": "string",
            "title": "Department Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "system_prompt": {
            "type": "string",
            "title": "System Prompt"
          },
          "tools": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tools"
          },
          "specialty": {
            "type": "string",
            "title": "Specialty",
            "default": ""
          },
          "can_execute_external_actions": {
            "type": "boolean",
            "title": "Can Execute External Actions",
            "default": false
          },
          "requires_human_approval": {
            "type": "boolean",
            "title": "Requires Human Approval",
            "default": false
          },
          "requires_policy_check_for": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Requires Policy Check For"
          },
          "requires_human_approval_for": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Requires Human Approval For"
          },
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "department_id",
          "role",
          "system_prompt"
        ],
        "title": "AgentFactoryPayload"
      },
      "AgentInvokePayload": {
        "properties": {
          "agent": {
            "type": "string",
            "title": "Agent"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "history": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "History"
          },
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id",
            "default": "oconnector"
          }
        },
        "type": "object",
        "required": [
          "agent",
          "message"
        ],
        "title": "AgentInvokePayload"
      },
      "AgentPatchPayload": {
        "properties": {
          "patch": {
            "additionalProperties": true,
            "type": "object",
            "title": "Patch"
          },
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "patch"
        ],
        "title": "AgentPatchPayload"
      },
      "Body_api_invoke_agent_multipart_api_agent_invoke_multipart_post": {
        "properties": {
          "agent": {
            "type": "string",
            "title": "Agent"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id",
            "default": "oconnector"
          },
          "history": {
            "type": "string",
            "title": "History",
            "default": "[]"
          },
          "files": {
            "items": {
              "type": "string",
              "contentMediaType": "application/octet-stream"
            },
            "type": "array",
            "title": "Files",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "agent",
          "message"
        ],
        "title": "Body_api_invoke_agent_multipart_api_agent_invoke_multipart_post"
      },
      "ConsultingDiagnosisPayload": {
        "properties": {
          "segmento": {
            "type": "string",
            "maxLength": 160,
            "minLength": 2,
            "title": "Segmento"
          },
          "faturamento": {
            "type": "string",
            "maxLength": 120,
            "title": "Faturamento",
            "default": ""
          },
          "tamanhoEquipe": {
            "type": "string",
            "maxLength": 120,
            "title": "Tamanhoequipe",
            "default": ""
          },
          "desafios": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 10,
            "title": "Desafios"
          },
          "ferramentasAtuais": {
            "type": "string",
            "maxLength": 1500,
            "title": "Ferramentasatuais",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "segmento",
          "desafios"
        ],
        "title": "ConsultingDiagnosisPayload"
      },
      "CronJobPayload": {
        "properties": {
          "team_id": {
            "type": "string",
            "maxLength": 120,
            "minLength": 3,
            "title": "Team Id"
          },
          "title": {
            "type": "string",
            "maxLength": 180,
            "minLength": 3,
            "title": "Title"
          },
          "objective": {
            "type": "string",
            "maxLength": 12000,
            "minLength": 3,
            "title": "Objective"
          },
          "artifact": {
            "type": "string",
            "maxLength": 30000,
            "title": "Artifact",
            "default": ""
          },
          "channel": {
            "type": "string",
            "maxLength": 30,
            "title": "Channel",
            "default": "internal"
          },
          "schedule_kind": {
            "type": "string",
            "maxLength": 20,
            "title": "Schedule Kind",
            "default": "once"
          },
          "run_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run At"
          },
          "local_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Local Time"
          },
          "weekday": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weekday"
          },
          "timezone": {
            "type": "string",
            "maxLength": 80,
            "title": "Timezone",
            "default": "America/Sao_Paulo"
          }
        },
        "type": "object",
        "required": [
          "team_id",
          "title",
          "objective"
        ],
        "title": "CronJobPayload"
      },
      "CronJobUpdatePayload": {
        "properties": {
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 180,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "objective": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 12000,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ],
            "title": "Objective"
          },
          "artifact": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 30000
              },
              {
                "type": "null"
              }
            ],
            "title": "Artifact"
          },
          "channel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 30
              },
              {
                "type": "null"
              }
            ],
            "title": "Channel"
          },
          "schedule_kind": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule Kind"
          },
          "run_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run At"
          },
          "local_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Local Time"
          },
          "weekday": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Weekday"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          }
        },
        "type": "object",
        "title": "CronJobUpdatePayload"
      },
      "CronReviewPayload": {
        "properties": {
          "decision": {
            "type": "string",
            "pattern": "^(approved|rejected)$",
            "title": "Decision"
          },
          "note": {
            "type": "string",
            "maxLength": 4000,
            "title": "Note",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "decision"
        ],
        "title": "CronReviewPayload"
      },
      "CronStatusPayload": {
        "properties": {
          "status": {
            "type": "string",
            "pattern": "^(scheduled|paused)$",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "CronStatusPayload"
      },
      "DecisionPayload": {
        "properties": {
          "decision": {
            "type": "string",
            "title": "Decision"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Run Id"
          },
          "justification": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 3,
            "title": "Justification"
          }
        },
        "type": "object",
        "required": [
          "decision",
          "justification"
        ],
        "title": "DecisionPayload"
      },
      "FactoryPolicyPayload": {
        "properties": {
          "tools": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tools"
          },
          "requires_human_approval": {
            "type": "boolean",
            "title": "Requires Human Approval",
            "default": false
          },
          "can_execute_external_actions": {
            "type": "boolean",
            "title": "Can Execute External Actions",
            "default": false
          }
        },
        "type": "object",
        "title": "FactoryPolicyPayload"
      },
      "FactorySimulationPayload": {
        "properties": {
          "tools": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Tools"
          },
          "requires_human_approval": {
            "type": "boolean",
            "title": "Requires Human Approval",
            "default": false
          },
          "can_execute_external_actions": {
            "type": "boolean",
            "title": "Can Execute External Actions",
            "default": false
          },
          "task": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 3,
            "title": "Task"
          }
        },
        "type": "object",
        "required": [
          "task"
        ],
        "title": "FactorySimulationPayload"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "LoginPayload": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "otp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Otp"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "LoginPayload"
      },
      "SkillPayload": {
        "properties": {
          "skill_id": {
            "type": "string",
            "title": "Skill Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "type": "string",
            "title": "Description"
          },
          "agent_role": {
            "type": "string",
            "title": "Agent Role"
          },
          "prompt_body": {
            "type": "string",
            "title": "Prompt Body"
          },
          "dry_run": {
            "type": "boolean",
            "title": "Dry Run",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "skill_id",
          "name",
          "description",
          "agent_role",
          "prompt_body"
        ],
        "title": "SkillPayload"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WebhookPayload": {
        "properties": {
          "workflow_id": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_]+$",
            "title": "Workflow Id",
            "description": "Identificador alfanumérico do workflow"
          },
          "payload": {
            "additionalProperties": true,
            "type": "object",
            "title": "Payload",
            "description": "Dados de entrada e contexto operacional do workflow"
          }
        },
        "type": "object",
        "required": [
          "workflow_id"
        ],
        "title": "WebhookPayload"
      },
      "WorkflowExecutePayload": {
        "properties": {
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id",
            "default": "oconnector"
          },
          "workspace_id": {
            "type": "string",
            "title": "Workspace Id"
          },
          "thread_id": {
            "type": "string",
            "title": "Thread Id",
            "default": ""
          },
          "objective": {
            "type": "string",
            "title": "Objective",
            "default": ""
          },
          "idempotency_key": {
            "type": "string",
            "title": "Idempotency Key",
            "default": ""
          },
          "preferred_agents": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Preferred Agents",
            "default": []
          },
          "allow_parallelism": {
            "type": "boolean",
            "title": "Allow Parallelism",
            "default": true
          },
          "require_human_approval": {
            "type": "boolean",
            "title": "Require Human Approval",
            "default": false
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "workspace_id",
          "message"
        ],
        "title": "WorkflowExecutePayload"
      },
      "WorkspaceCreatePayload": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "company": {
            "type": "string",
            "title": "Company",
            "default": ""
          },
          "client": {
            "type": "string",
            "title": "Client",
            "default": ""
          },
          "objective": {
            "type": "string",
            "title": "Objective",
            "default": ""
          },
          "workspace_type": {
            "type": "string",
            "title": "Workspace Type",
            "default": "internal_strategy"
          },
          "department_scope": {
            "type": "string",
            "title": "Department Scope",
            "default": ""
          },
          "subject": {
            "type": "string",
            "title": "Subject",
            "default": ""
          },
          "tenant_id": {
            "type": "string",
            "title": "Tenant Id",
            "default": "oconnector"
          },
          "agent_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Agent Ids"
          }
        },
        "type": "object",
        "required": [
          "title"
        ],
        "title": "WorkspaceCreatePayload"
      },
      "WorkspaceInvokePayload": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "WorkspaceInvokePayload"
      },
      "WorkspaceUpdatePayload": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title"
          },
          "objective": {
            "type": "string",
            "title": "Objective"
          },
          "subject": {
            "type": "string",
            "title": "Subject"
          },
          "department_scope": {
            "type": "string",
            "title": "Department Scope"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "agent_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent Ids"
          }
        },
        "type": "object",
        "title": "WorkspaceUpdatePayload"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}