{
  "openapi": "3.1.0",
  "info": {
    "title": "protoPen — protoLabs",
    "version": "0.1.0"
  },
  "paths": {
    "/api/chat": {
      "post": {
        "summary": "Chat (programmatic)",
        "operationId": "_api_chat_api_chat_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/events": {
      "get": {
        "summary": "Server→client event stream (SSE)",
        "operationId": "_api_events_api_events_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "summary": "OpenAI-compatible chat completions",
        "operationId": "_openai_chat_completions_v1_chat_completions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "type": "object",
                "title": "Req"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "summary": "List models (OpenAI-compatible)",
        "operationId": "_openai_models_v1_models_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/.well-known/agent-card.json": {
      "get": {
        "tags": [
          "A2A: Agent Card"
        ],
        "summary": " Get Agent Card",
        "description": "Returns the public AgentCard describing this agent's capabilities, supported transports, and skills.",
        "operationId": "_get_agent_card__well_known_agent_card_json_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/a2a": {
      "post": {
        "tags": [
          "A2A: JSON-RPC"
        ],
        "summary": "A2A JSON-RPC endpoint",
        "description": "A2A JSON-RPC 2.0 endpoint. The `method` field selects the operation;\n`params` must match that method's schema (see the `oneOf` below).\n\n**Supported methods:**\n\n- `SendMessage` — Send a message to the agent (returns a Task or response Message).\n- `SendStreamingMessage` — Send a message and receive a Server-Sent Events stream.\n- `GetTask` — Fetch a task by ID.\n- `ListTasks` — List tasks with pagination and filtering.\n- `CancelTask` — Cancel an in-progress task.\n- `CreateTaskPushNotificationConfig` — Register a push-notification config on a task.\n- `GetTaskPushNotificationConfig` — Read a single push-notification config.\n- `ListTaskPushNotificationConfigs` — List all push-notification configs for a task.\n- `DeleteTaskPushNotificationConfig` — Delete a push-notification config.\n- `SubscribeToTask` — Subscribe to task events via Server-Sent Events.\n- `GetExtendedAgentCard` — Fetch the authenticated extended agent card.\n",
        "operationId": "handle_requests_a2a_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "requestBody": {
          "description": "A2A JSON-RPC 2.0 request",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A2ARequest"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "A2A-Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1.0"
              ]
            },
            "example": "1.0"
          }
        ]
      }
    },
    "/api/runtime/status": {
      "get": {
        "summary": "Runtime status",
        "operationId": "_runtime_status_api_runtime_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/chat/commands": {
      "get": {
        "summary": "List chat slash-commands",
        "operationId": "_chat_commands_api_chat_commands_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/subagents": {
      "get": {
        "summary": "List subagents",
        "operationId": "_subagents_api_subagents_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/engagement": {
      "get": {
        "summary": "Engagement snapshot",
        "operationId": "_engagement_api_engagement_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      },
      "post": {
        "summary": "Start / end / set-mode the engagement",
        "description": "Operator control: ``{\"action\": \"start\", \"name\": ..., \"scope\": ...,\n\"mode\": \"passive|active|redteam\"}`` | ``{\"action\": \"end\"}`` |\n``{\"action\": \"set_mode\", \"mode\": ...}``. Acts on the live engagement the\nagent's enforcement middleware checks, so starting one here unblocks\nengagement-gated tools. Returns the new status snapshot.",
        "operationId": "_engagement_control_api_engagement_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "type": "object",
                "title": "Body"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/engagement/report": {
      "get": {
        "summary": "Read engagement report",
        "operationId": "_engagement_report_api_engagement_report_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      },
      "post": {
        "summary": "Generate engagement report",
        "operationId": "_engagement_report_generate_api_engagement_report_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/knowledge/search": {
      "get": {
        "summary": "Search the knowledge store",
        "operationId": "_knowledge_search_api_knowledge_search_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Q"
            }
          },
          {
            "name": "k",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "title": "K"
            }
          },
          {
            "name": "table",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Table"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools": {
      "get": {
        "summary": "Capabilities catalog (categorized tool registry)",
        "operationId": "_tools_list_api_tools_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/skills": {
      "get": {
        "summary": "List/search learned skills",
        "operationId": "_skills_list_api_skills_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Q"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/goals": {
      "get": {
        "summary": "List goals (autonomy layer)",
        "operationId": "_goals_list_api_goals_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/goal/{session_id}": {
      "delete": {
        "summary": "Clear a goal",
        "operationId": "_goal_clear_api_goal__session_id__delete",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/targets": {
      "get": {
        "summary": "List discovered targets",
        "operationId": "_targets_list_api_targets_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Q"
            }
          },
          {
            "name": "device_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Device Type"
            }
          },
          {
            "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/targets/{host_id}": {
      "get": {
        "summary": "Target profile",
        "operationId": "_target_get_api_targets__host_id__get",
        "parameters": [
          {
            "name": "host_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Host Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/engagements": {
      "get": {
        "summary": "Engagement history",
        "operationId": "_engagements_list_api_engagements_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/intel/search": {
      "get": {
        "summary": "Unified intel search",
        "operationId": "_intel_search_api_intel_search_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Q"
            }
          },
          {
            "name": "k",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "title": "K"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/audit/recent": {
      "get": {
        "summary": "Recent audit entries",
        "operationId": "_audit_recent_api_audit_recent_get",
        "parameters": [
          {
            "name": "n",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 50,
              "title": "N"
            }
          },
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/subagents/run": {
      "post": {
        "summary": "Run a subagent",
        "operationId": "_subagent_run_api_subagents_run_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubagentRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/subagents/batch": {
      "post": {
        "summary": "Run subagents concurrently",
        "operationId": "_subagent_batch_api_subagents_batch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubagentBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/launch": {
      "post": {
        "summary": "Launch a tracked agent",
        "operationId": "_agent_launch_api_agents_launch_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubagentRunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents": {
      "get": {
        "summary": "List agent runs",
        "operationId": "_agents_list_api_agents_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/agents/{task_id}": {
      "get": {
        "summary": "Get an agent run",
        "operationId": "_agent_get_api_agents__task_id__get",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Task Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/{task_id}/cancel": {
      "post": {
        "summary": "Cancel an agent run",
        "operationId": "_agent_cancel_api_agents__task_id__cancel_post",
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Task Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduler/jobs": {
      "get": {
        "summary": "List scheduled jobs",
        "operationId": "_scheduler_jobs_api_scheduler_jobs_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      },
      "post": {
        "summary": "Schedule a job",
        "operationId": "_scheduler_add_api_scheduler_jobs_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleAddRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/scheduler/jobs/{job_id}": {
      "delete": {
        "summary": "Cancel a scheduled job",
        "operationId": "_scheduler_cancel_api_scheduler_jobs__job_id__delete",
        "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/chat/sessions/{session_id}/steer": {
      "post": {
        "summary": "Queue a mid-turn steer message",
        "operationId": "_steer_api_chat_sessions__session_id__steer_post",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/chat/sessions/{session_id}/steer/{msg_id}": {
      "delete": {
        "summary": "Cancel a pending steer",
        "operationId": "_unsteer_api_chat_sessions__session_id__steer__msg_id__delete",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Session Id"
            }
          },
          {
            "name": "msg_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Msg Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/delegations": {
      "get": {
        "summary": "List in-flight subagent delegations",
        "operationId": "_delegations_api_delegations_get",
        "parameters": [
          {
            "name": "session_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "",
              "title": "Session Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/delegations/{tool_call_id}/cancel": {
      "post": {
        "summary": "Cancel one in-flight delegation",
        "operationId": "_cancel_delegation_api_delegations__tool_call_id__cancel_post",
        "parameters": [
          {
            "name": "tool_call_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Tool Call Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/notes/workspace": {
      "get": {
        "summary": "Load notes workspace",
        "operationId": "_notes_get_api_notes_workspace_get",
        "parameters": [
          {
            "name": "project_path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Path"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Save notes workspace",
        "operationId": "_notes_save_api_notes_workspace_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotesSaveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/beads/status": {
      "get": {
        "summary": "Beads status",
        "operationId": "_beads_status_api_beads_status_get",
        "parameters": [
          {
            "name": "project_path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Path"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/beads/init": {
      "post": {
        "summary": "Initialize beads",
        "operationId": "_beads_init_api_beads_init_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeadsInitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/beads/issues": {
      "get": {
        "summary": "List beads issues",
        "operationId": "_beads_list_api_beads_issues_get",
        "parameters": [
          {
            "name": "project_path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Path"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a beads issue",
        "operationId": "_beads_create_api_beads_issues_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeadsCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/beads/issues/{issue_id}": {
      "patch": {
        "summary": "Update a beads issue",
        "operationId": "_beads_update_api_beads_issues__issue_id__patch",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Issue Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeadsUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a beads issue",
        "operationId": "_beads_delete_api_beads_issues__issue_id__delete",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Issue Id"
            }
          },
          {
            "name": "project_path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Path"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/beads/issues/{issue_id}/close": {
      "post": {
        "summary": "Close a beads issue",
        "operationId": "_beads_close_api_beads_issues__issue_id__close_post",
        "parameters": [
          {
            "name": "issue_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Issue Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeadsCloseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/activity": {
      "get": {
        "summary": "Activity thread history (ADR 0003)",
        "operationId": "_activity_api_activity_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/workflows": {
      "get": {
        "summary": "List workflow recipes (ADR 0002)",
        "operationId": "_workflows_list_api_workflows_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/workflows/{name}/run": {
      "post": {
        "summary": "Run a workflow recipe (ADR 0002)",
        "operationId": "_workflows_run_api_workflows__name__run_post",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "default": {},
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/playbooks": {
      "get": {
        "summary": "List playbooks",
        "operationId": "_playbooks_list_api_playbooks_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/playbooks/{name}/run": {
      "post": {
        "summary": "Run a playbook",
        "operationId": "_playbooks_run_api_playbooks__name__run_post",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "default": {},
                "title": "Payload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/config/setup-status": {
      "get": {
        "summary": "Setup wizard status",
        "operationId": "_config_setup_status_api_config_setup_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/config": {
      "get": {
        "summary": "Current agent config (UI-safe, no secrets)",
        "operationId": "_config_get_api_config_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/api/config/presets/{name}": {
      "get": {
        "summary": "Read a SOUL preset",
        "operationId": "_config_preset_api_config_presets__name__get",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/config/models": {
      "post": {
        "summary": "Probe an OpenAI-compatible gateway for models",
        "operationId": "_config_models_api_config_models_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "type": "object",
                "title": "Body",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/config/setup": {
      "post": {
        "summary": "Write config + key and reload the agent",
        "operationId": "_config_setup_api_config_setup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": true,
                "type": "object",
                "title": "Body",
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BeadsCloseRequest": {
        "properties": {
          "project_path": {
            "type": "string",
            "title": "Project Path"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "project_path"
        ],
        "title": "BeadsCloseRequest"
      },
      "BeadsCreateRequest": {
        "properties": {
          "project_path": {
            "type": "string",
            "title": "Project Path"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "type": {
            "type": "string",
            "title": "Type",
            "default": "task"
          },
          "priority": {
            "type": "integer",
            "title": "Priority",
            "default": 2
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "assignee": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee"
          }
        },
        "type": "object",
        "required": [
          "project_path",
          "title"
        ],
        "title": "BeadsCreateRequest"
      },
      "BeadsInitRequest": {
        "properties": {
          "project_path": {
            "type": "string",
            "title": "Project Path"
          },
          "prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefix"
          }
        },
        "type": "object",
        "required": [
          "project_path"
        ],
        "title": "BeadsInitRequest"
      },
      "BeadsUpdateRequest": {
        "properties": {
          "project_path": {
            "type": "string",
            "title": "Project Path"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Priority"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "assignee": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignee"
          }
        },
        "type": "object",
        "required": [
          "project_path"
        ],
        "title": "BeadsUpdateRequest"
      },
      "ChatRequest": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "session_id": {
            "type": "string",
            "title": "Session Id",
            "default": "api-default"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "ChatRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "NotesSaveRequest": {
        "properties": {
          "project_path": {
            "type": "string",
            "title": "Project Path"
          },
          "workspace": {
            "additionalProperties": true,
            "type": "object",
            "title": "Workspace"
          }
        },
        "type": "object",
        "required": [
          "project_path",
          "workspace"
        ],
        "title": "NotesSaveRequest"
      },
      "ScheduleAddRequest": {
        "properties": {
          "prompt": {
            "type": "string",
            "title": "Prompt"
          },
          "schedule": {
            "type": "string",
            "title": "Schedule"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id"
          }
        },
        "type": "object",
        "required": [
          "prompt",
          "schedule"
        ],
        "title": "ScheduleAddRequest"
      },
      "SubagentBatchRequest": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id",
            "default": "manual-subagent"
          },
          "tasks": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Tasks"
          }
        },
        "type": "object",
        "required": [
          "tasks"
        ],
        "title": "SubagentBatchRequest"
      },
      "SubagentRunRequest": {
        "properties": {
          "session_id": {
            "type": "string",
            "title": "Session Id",
            "default": "manual-subagent"
          },
          "type": {
            "type": "string",
            "title": "Type",
            "default": "researcher"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "prompt": {
            "type": "string",
            "title": "Prompt"
          },
          "emit_skill": {
            "type": "boolean",
            "title": "Emit Skill",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "prompt"
        ],
        "title": "SubagentRunRequest"
      },
      "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"
      },
      "SendMessageRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "message": {
            "$ref": "#/components/schemas/Message"
          },
          "configuration": {
            "$ref": "#/components/schemas/SendMessageConfiguration"
          },
          "metadata": {
            "type": "object"
          }
        }
      },
      "Message": {
        "type": "object",
        "properties": {
          "message_id": {
            "type": "string"
          },
          "context_id": {
            "type": "string"
          },
          "task_id": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "ROLE_UNSPECIFIED",
              "ROLE_USER",
              "ROLE_AGENT"
            ]
          },
          "parts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Part"
            }
          },
          "metadata": {
            "type": "object"
          },
          "extensions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reference_task_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Part": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "metadata": {
                "type": "object"
              },
              "filename": {
                "type": "string"
              },
              "media_type": {
                "type": "string"
              }
            }
          },
          {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "raw": {
                    "type": "string",
                    "format": "byte"
                  }
                },
                "required": [
                  "raw"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "data": {}
                },
                "required": [
                  "data"
                ]
              }
            ]
          }
        ]
      },
      "SendMessageConfiguration": {
        "type": "object",
        "properties": {
          "accepted_output_modes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "task_push_notification_config": {
            "$ref": "#/components/schemas/TaskPushNotificationConfig"
          },
          "history_length": {
            "type": "integer",
            "format": "int32"
          },
          "return_immediately": {
            "type": "boolean"
          }
        }
      },
      "TaskPushNotificationConfig": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "task_id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "authentication": {
            "$ref": "#/components/schemas/AuthenticationInfo"
          }
        }
      },
      "AuthenticationInfo": {
        "type": "object",
        "properties": {
          "scheme": {
            "type": "string"
          },
          "credentials": {
            "type": "string"
          }
        }
      },
      "GetTaskRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "history_length": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ListTasksRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "context_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "TASK_STATE_UNSPECIFIED",
              "TASK_STATE_SUBMITTED",
              "TASK_STATE_WORKING",
              "TASK_STATE_COMPLETED",
              "TASK_STATE_FAILED",
              "TASK_STATE_CANCELED",
              "TASK_STATE_INPUT_REQUIRED",
              "TASK_STATE_REJECTED",
              "TASK_STATE_AUTH_REQUIRED"
            ]
          },
          "page_size": {
            "type": "integer",
            "format": "int32"
          },
          "page_token": {
            "type": "string"
          },
          "history_length": {
            "type": "integer",
            "format": "int32"
          },
          "status_timestamp_after": {
            "type": "string",
            "format": "date-time"
          },
          "include_artifacts": {
            "type": "boolean"
          }
        }
      },
      "CancelTaskRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          }
        }
      },
      "GetTaskPushNotificationConfigRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "task_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "ListTaskPushNotificationConfigsRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "task_id": {
            "type": "string"
          },
          "page_size": {
            "type": "integer",
            "format": "int32"
          },
          "page_token": {
            "type": "string"
          }
        }
      },
      "DeleteTaskPushNotificationConfigRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "task_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "SubscribeToTaskRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "GetExtendedAgentCardRequest": {
        "type": "object",
        "properties": {
          "tenant": {
            "type": "string"
          }
        }
      },
      "A2ARequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": [
              "2.0"
            ]
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "SendMessage",
              "SendStreamingMessage",
              "GetTask",
              "ListTasks",
              "CancelTask",
              "CreateTaskPushNotificationConfig",
              "GetTaskPushNotificationConfig",
              "ListTaskPushNotificationConfigs",
              "DeleteTaskPushNotificationConfig",
              "SubscribeToTask",
              "GetExtendedAgentCard"
            ]
          },
          "params": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SendMessageRequest"
              },
              {
                "$ref": "#/components/schemas/GetTaskRequest"
              },
              {
                "$ref": "#/components/schemas/ListTasksRequest"
              },
              {
                "$ref": "#/components/schemas/CancelTaskRequest"
              },
              {
                "$ref": "#/components/schemas/TaskPushNotificationConfig"
              },
              {
                "$ref": "#/components/schemas/GetTaskPushNotificationConfigRequest"
              },
              {
                "$ref": "#/components/schemas/ListTaskPushNotificationConfigsRequest"
              },
              {
                "$ref": "#/components/schemas/DeleteTaskPushNotificationConfigRequest"
              },
              {
                "$ref": "#/components/schemas/SubscribeToTaskRequest"
              },
              {
                "$ref": "#/components/schemas/GetExtendedAgentCardRequest"
              }
            ]
          }
        }
      }
    }
  }
}
