{ "openapi": "3.1.0", "info": { "title": "AgentOS API", "description": "AgentOS - AI-powered development environment with knowledge management", "version": "1.0.0" }, "paths": { "/api/v1/auth/register": { "post": { "tags": [ "Authentication" ], "summary": "Register", "description": "Register a new user.\n\nCreates a new user account with default settings and returns authentication tokens.", "operationId": "register_api_v1_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/agent_os__auth__schema__UserRegister" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Token" } } } }, "400": { "description": "User already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/login": { "post": { "tags": [ "Authentication" ], "summary": "Login", "description": "Login with username/email and password.\n\nUses OAuth2 password flow for token-based authentication.", "operationId": "login_api_v1_auth_login_post", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/Body_login_api_v1_auth_login_post" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Token" } } } }, "401": { "description": "Invalid credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/refresh": { "post": { "tags": [ "Authentication" ], "summary": "Refresh Token", "description": "Refresh access token using refresh token.\n\nValidates the refresh token and issues a new access token.", "operationId": "refresh_token_api_v1_auth_refresh_post", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Token Data" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Token" } } } }, "401": { "description": "Invalid refresh token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/auth/users/me": { "get": { "tags": [ "Authentication" ], "summary": "Get Current User Info", "description": "Get current authenticated user information.\n\nReturns user details including settings.", "operationId": "get_current_user_info_api_v1_auth_users_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserInfo" } } } }, "401": { "description": "Not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/auth/users/settings": { "put": { "tags": [ "Authentication" ], "summary": "Update User Settings", "description": "Update current user settings.\n\nUpdates daily goal, theme, and/or language preferences.", "operationId": "update_user_settings_api_v1_auth_users_settings_put", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSettingsUpdate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserInfo" } } } }, "401": { "description": "Not authenticated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/knowledge/inbox": { "post": { "tags": [ "knowledge" ], "summary": "Create Inbox Item", "description": "Create a new inbox item.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n item_in: Inbox item data\n\nReturns:\n Created inbox item", "operationId": "create_inbox_item_api_v1_knowledge_inbox_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxItemCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxItemResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "knowledge" ], "summary": "List Inbox Items", "description": "List inbox items with filtering and pagination.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n status: Optional status filter\n source: Optional source filter\n page: Page number (1-indexed)\n page_size: Items per page\n\nReturns:\n Paginated list of inbox items", "operationId": "list_inbox_items_api_v1_knowledge_inbox_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by status (raw, processed, archived)", "title": "Status" }, "description": "Filter by status (raw, processed, archived)" }, { "name": "source", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by source (manual, api, import)", "title": "Source" }, "description": "Filter by source (manual, api, import)" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Items per page", "default": 20, "title": "Page Size" }, "description": "Items per page" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxItemList" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/knowledge/inbox/{item_id}": { "get": { "tags": [ "knowledge" ], "summary": "Get Inbox Item", "description": "Get an inbox item by ID.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n item_id: Inbox item ID\n\nReturns:\n Inbox item\n\nRaises:\n HTTPException 404: If item not found", "operationId": "get_inbox_item_api_v1_knowledge_inbox__item_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Item Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxItemResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "knowledge" ], "summary": "Update Inbox Item", "description": "Update an inbox item.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n item_id: Inbox item ID\n item_in: Update data\n\nReturns:\n Updated inbox item\n\nRaises:\n HTTPException 404: If item not found", "operationId": "update_inbox_item_api_v1_knowledge_inbox__item_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Item Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxItemUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxItemResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "knowledge" ], "summary": "Delete Inbox Item", "description": "Delete an inbox item.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n item_id: Inbox item ID\n\nRaises:\n HTTPException 404: If item not found", "operationId": "delete_inbox_item_api_v1_knowledge_inbox__item_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Item Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/knowledge/inbox/{item_id}/status": { "patch": { "tags": [ "knowledge" ], "summary": "Update Inbox Item Status", "description": "Update inbox item status.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n item_id: Inbox item ID\n new_status: New status value\n\nReturns:\n Updated inbox item\n\nRaises:\n HTTPException 404: If item not found\n HTTPException 400: If status is invalid", "operationId": "update_inbox_item_status_api_v1_knowledge_inbox__item_id__status_patch", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "item_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Item Id" } }, { "name": "new_status", "in": "query", "required": true, "schema": { "type": "string", "description": "New status (raw, processed, archived)", "title": "New Status" }, "description": "New status (raw, processed, archived)" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InboxItemResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/knowledge/cards": { "post": { "tags": [ "knowledge" ], "summary": "Create Card", "description": "Create a new card.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n card_in: Card data\n\nReturns:\n Created card", "operationId": "create_card_api_v1_knowledge_cards_post", "security": [ { "HTTPBearer": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "knowledge" ], "summary": "List Cards", "description": "List cards with filtering and pagination.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n para_type: Optional paragraph type filter\n tags: Optional tags filter (comma-separated)\n page: Page number (1-indexed)\n page_size: Cards per page\n\nReturns:\n Paginated list of cards", "operationId": "list_cards_api_v1_knowledge_cards_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "para_type", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by paragraph type (concept, action, reference)", "title": "Para Type" }, "description": "Filter by paragraph type (concept, action, reference)" }, { "name": "tags", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Filter by tags (comma-separated)", "title": "Tags" }, "description": "Filter by tags (comma-separated)" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page" }, "description": "Page number" }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "description": "Cards per page", "default": 20, "title": "Page Size" }, "description": "Cards per page" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardList" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/knowledge/cards/{card_id}": { "get": { "tags": [ "knowledge" ], "summary": "Get Card", "description": "Get a card by ID.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n card_id: Card ID\n\nReturns:\n Card\n\nRaises:\n HTTPException 404: If card not found", "operationId": "get_card_api_v1_knowledge_cards__card_id__get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "card_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Card Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "knowledge" ], "summary": "Update Card", "description": "Update a card.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n card_id: Card ID\n card_in: Update data\n\nReturns:\n Updated card\n\nRaises:\n HTTPException 404: If card not found", "operationId": "update_card_api_v1_knowledge_cards__card_id__put", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "card_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Card Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "knowledge" ], "summary": "Delete Card", "description": "Delete a card.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n card_id: Card ID\n\nRaises:\n HTTPException 404: If card not found", "operationId": "delete_card_api_v1_knowledge_cards__card_id__delete", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "card_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Card Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v1/knowledge/cards/search": { "post": { "tags": [ "knowledge" ], "summary": "Vector Search Cards", "description": "Search cards using vector similarity.\n\nPerforms semantic search using vector embeddings to find cards\nthat are semantically similar to the query text.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n search_req: Search request with query and filters\n\nReturns:\n Search results with similarity scores\n\nExample:\n ```python\n {\n \"query\": \"python async programming\",\n \"limit\": 10,\n \"para_type\": null\n }\n ```", "operationId": "vector_search_cards_api_v1_knowledge_cards_search_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorSearchRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HTTPBearer": [] } ] } }, "/api/v1/knowledge/cards/{card_id}/similar": { "get": { "tags": [ "knowledge" ], "summary": "Find Similar Cards", "description": "Find cards similar to a given card.\n\nUses vector embeddings to find cards that are semantically\nsimilar to the specified card.\n\nArgs:\n db: Database session\n current_user: Authenticated user\n card_id: Reference card ID\n limit: Maximum number of results\n\nReturns:\n Similar cards with similarity scores\n\nRaises:\n HTTPException 404: If reference card not found", "operationId": "find_similar_cards_api_v1_knowledge_cards__card_id__similar_get", "security": [ { "HTTPBearer": [] } ], "parameters": [ { "name": "card_id", "in": "path", "required": true, "schema": { "type": "integer", "title": "Card Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 20, "minimum": 1, "description": "Maximum number of similar cards", "default": 5, "title": "Limit" }, "description": "Maximum number of similar cards" } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorSearchResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/files": { "get": { "tags": [ "files" ], "summary": "List Files", "description": "List files in the session workspace.", "operationId": "list_files_api_sessions__session_id__files_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "path", "in": "query", "required": false, "schema": { "type": "string", "default": ".", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Files Api Sessions Session Id Files Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "tags": [ "files" ], "summary": "Write File", "description": "Write content to a file.", "operationId": "write_file_api_sessions__session_id__files_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileWriteRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Write File Api Sessions Session Id Files Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete File", "description": "Delete a file in the sandbox.", "operationId": "delete_file_api_sessions__session_id__files_delete", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Delete File Api Sessions Session Id Files Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/files/content": { "get": { "summary": "Get File Content", "description": "Get the content of a file.", "operationId": "get_file_content_api_sessions__session_id__files_content_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileContentResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions": { "get": { "summary": "List Sessions", "description": "List all available sessions.", "operationId": "list_sessions_api_sessions_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Response List Sessions Api Sessions Get" } } } } } }, "post": { "summary": "Create Session", "description": "Create a new session with a sandbox.", "operationId": "create_session_api_sessions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionCreateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}": { "get": { "summary": "Get Session", "description": "Get session information.", "operationId": "get_session_api_sessions__session_id__get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SessionResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Session", "description": "Delete a session and stop its sandbox.", "operationId": "delete_session_api_sessions__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": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Delete Session Api Sessions Session Id Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/files/tree": { "get": { "summary": "Get File Tree", "description": "Get the file tree for a session's sandbox.", "operationId": "get_file_tree_api_sessions__session_id__files_tree_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "path", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileTreeNode" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/": { "get": { "summary": "Get Index", "description": "Serve the index page.", "operationId": "get_index__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/login.html": { "get": { "summary": "Get Login", "description": "Serve the login page.", "operationId": "get_login_login_html_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/project-wizard.html": { "get": { "summary": "Get Project Wizard", "description": "Serve the project wizard page.", "operationId": "get_project_wizard_project_wizard_html_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/sessions/{session_id}/files/save": { "post": { "summary": "Save File Content", "description": "Save content to a file in the sandbox.", "operationId": "save_file_content_api_sessions__session_id__files_save_post", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileContentRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "string" }, "title": "Response Save File Content Api Sessions Session Id Files Save Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/toolkit/skills": { "get": { "summary": "List Skills", "description": "List all skills in the session's toolkit.", "operationId": "list_skills_api_sessions__session_id__toolkit_skills_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Skills Api Sessions Session Id Toolkit Skills Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "summary": "Create Skill", "description": "Create a new skill.", "operationId": "create_skill_api_sessions__session_id__toolkit_skills_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": "Skill Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Create Skill Api Sessions Session Id Toolkit Skills Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/toolkit/skills/{skill_name}": { "get": { "summary": "Get Skill", "description": "Get a specific skill's code.", "operationId": "get_skill_api_sessions__session_id__toolkit_skills__skill_name__get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "skill_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Skill Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Get Skill Api Sessions Session Id Toolkit Skills Skill Name Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "summary": "Update Skill", "description": "Update a skill's code.", "operationId": "update_skill_api_sessions__session_id__toolkit_skills__skill_name__put", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "skill_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Skill Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Skill Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Update Skill Api Sessions Session Id Toolkit Skills Skill Name Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Skill", "description": "Delete a skill.", "operationId": "delete_skill_api_sessions__session_id__toolkit_skills__skill_name__delete", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "skill_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Skill Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Skill Api Sessions Session Id Toolkit Skills Skill Name Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/toolkit/mcp-servers": { "get": { "summary": "List Mcp Servers", "description": "List all MCP servers in the session's toolkit.", "operationId": "list_mcp_servers_api_sessions__session_id__toolkit_mcp_servers_get", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response List Mcp Servers Api Sessions Session Id Toolkit Mcp Servers Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "post": { "summary": "Add Mcp Server", "description": "Add a new MCP server.", "operationId": "add_mcp_server_api_sessions__session_id__toolkit_mcp_servers_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": "Server Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Add Mcp Server Api Sessions Session Id Toolkit Mcp Servers Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sessions/{session_id}/toolkit/mcp-servers/{server_name}": { "put": { "summary": "Update Mcp Server", "description": "Update an existing MCP server.", "operationId": "update_mcp_server_api_sessions__session_id__toolkit_mcp_servers__server_name__put", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "server_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Server Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Server Data" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Update Mcp Server Api Sessions Session Id Toolkit Mcp Servers Server Name Put" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Mcp Server", "description": "Delete an MCP server.", "operationId": "delete_mcp_server_api_sessions__session_id__toolkit_mcp_servers__server_name__delete", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "server_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Server Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response Delete Mcp Server Api Sessions Session Id Toolkit Mcp Servers Server Name Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/health": { "get": { "summary": "Health Check", "description": "Health check endpoint.", "operationId": "health_check_health_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Response Health Check Health Get" } } } } } } }, "/api/auth/register": { "post": { "summary": "Register", "description": "Register a new user.", "operationId": "register_api_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRegister" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/login": { "post": { "summary": "Login", "description": "Login user.", "operationId": "login_api_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserLogin" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/me": { "get": { "summary": "Get Current User Info", "description": "Get current user info.", "operationId": "get_current_user_info_api_auth_me_get", "parameters": [ { "name": "current_user", "in": "query", "required": false, "schema": { "title": "Current User" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/projects": { "post": { "summary": "Create Project", "description": "Create a new project with template and features.", "operationId": "create_project_api_projects_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProjectRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "AuthResponse": { "properties": { "token": { "type": "string", "title": "Token" }, "user": { "additionalProperties": true, "type": "object", "title": "User" } }, "type": "object", "required": [ "token", "user" ], "title": "AuthResponse", "description": "Authentication response." }, "Body_login_api_v1_auth_login_post": { "properties": { "grant_type": { "anyOf": [ { "type": "string", "pattern": "^password$" }, { "type": "null" } ], "title": "Grant Type" }, "username": { "type": "string", "title": "Username" }, "password": { "type": "string", "format": "password", "title": "Password" }, "scope": { "type": "string", "title": "Scope", "default": "" }, "client_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Client Id" }, "client_secret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "format": "password", "title": "Client Secret" } }, "type": "object", "required": [ "username", "password" ], "title": "Body_login_api_v1_auth_login_post" }, "CardCreate": { "properties": { "title": { "type": "string", "maxLength": 200, "minLength": 1, "title": "Title", "description": "Card title" }, "content": { "type": "string", "maxLength": 10000, "minLength": 1, "title": "Content", "description": "Card content" }, "para_type": { "type": "string", "pattern": "^(concept|action|reference)$", "title": "Para Type", "description": "Paragraph type" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags", "description": "Tags for the card" }, "source_inbox_item_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Source Inbox Item Id", "description": "Source inbox item ID" } }, "type": "object", "required": [ "title", "content", "para_type" ], "title": "CardCreate", "description": "Schema for creating a new card." }, "CardList": { "properties": { "items": { "items": { "$ref": "#/components/schemas/CardResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total", "description": "Total number of cards" }, "page": { "type": "integer", "minimum": 1.0, "title": "Page", "default": 1 }, "page_size": { "type": "integer", "maximum": 100.0, "minimum": 1.0, "title": "Page Size", "default": 20 } }, "type": "object", "required": [ "items", "total" ], "title": "CardList", "description": "Schema for list of cards." }, "CardResponse": { "properties": { "title": { "type": "string", "maxLength": 200, "minLength": 1, "title": "Title", "description": "Card title" }, "content": { "type": "string", "maxLength": 10000, "minLength": 1, "title": "Content", "description": "Card content" }, "para_type": { "type": "string", "pattern": "^(concept|action|reference)$", "title": "Para Type", "description": "Paragraph type" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags", "description": "Tags for the card" }, "source_inbox_item_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Source Inbox Item Id", "description": "Source inbox item ID" }, "id": { "type": "integer", "title": "Id" }, "user_id": { "type": "integer", "title": "User Id" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "title", "content", "para_type", "id", "user_id", "created_at", "updated_at" ], "title": "CardResponse", "description": "Schema for card response." }, "CardUpdate": { "properties": { "title": { "anyOf": [ { "type": "string", "maxLength": 200, "minLength": 1 }, { "type": "null" } ], "title": "Title" }, "content": { "anyOf": [ { "type": "string", "maxLength": 10000, "minLength": 1 }, { "type": "null" } ], "title": "Content" }, "para_type": { "anyOf": [ { "type": "string", "pattern": "^(concept|action|reference)$" }, { "type": "null" } ], "title": "Para Type" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tags" } }, "type": "object", "title": "CardUpdate", "description": "Schema for updating a card." }, "CreateProjectRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description", "default": "" }, "template": { "type": "string", "title": "Template", "default": "blank" }, "features": { "items": { "type": "string" }, "type": "array", "title": "Features", "default": [] }, "user_id": { "type": "string", "title": "User Id", "default": "guest" } }, "type": "object", "required": [ "name" ], "title": "CreateProjectRequest", "description": "Create project request." }, "ErrorResponse": { "properties": { "detail": { "type": "string", "title": "Detail", "description": "Error message" }, "error_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Code", "description": "Application-specific error code" } }, "type": "object", "required": [ "detail" ], "title": "ErrorResponse", "description": "Error response." }, "FileContentRequest": { "properties": { "path": { "type": "string", "title": "Path" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": [ "path", "content" ], "title": "FileContentRequest", "description": "Request model for file content operations." }, "FileContentResponse": { "properties": { "path": { "type": "string", "title": "Path" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": [ "path", "content" ], "title": "FileContentResponse", "description": "Response model for file content operations." }, "FileTreeNode": { "properties": { "name": { "type": "string", "title": "Name" }, "path": { "type": "string", "title": "Path" }, "type": { "type": "string", "title": "Type" }, "children": { "items": { "$ref": "#/components/schemas/FileTreeNode" }, "type": "array", "title": "Children", "default": [] } }, "type": "object", "required": [ "name", "path", "type" ], "title": "FileTreeNode", "description": "Node in the file tree." }, "FileWriteRequest": { "properties": { "path": { "type": "string", "title": "Path" }, "content": { "type": "string", "title": "Content" } }, "type": "object", "required": [ "path", "content" ], "title": "FileWriteRequest" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "InboxItemCreate": { "properties": { "content": { "type": "string", "maxLength": 10000, "minLength": 1, "title": "Content", "description": "Inbox item content" }, "source": { "anyOf": [ { "type": "string", "pattern": "^(manual|api|import)$" }, { "type": "null" } ], "title": "Source", "description": "Source of the item", "default": "manual" }, "extra_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extra Data", "description": "Additional metadata" } }, "type": "object", "required": [ "content" ], "title": "InboxItemCreate", "description": "Schema for creating a new inbox item." }, "InboxItemList": { "properties": { "items": { "items": { "$ref": "#/components/schemas/InboxItemResponse" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total", "description": "Total number of items" }, "page": { "type": "integer", "minimum": 1.0, "title": "Page", "default": 1 }, "page_size": { "type": "integer", "maximum": 100.0, "minimum": 1.0, "title": "Page Size", "default": 20 } }, "type": "object", "required": [ "items", "total" ], "title": "InboxItemList", "description": "Schema for list of inbox items." }, "InboxItemResponse": { "properties": { "content": { "type": "string", "maxLength": 10000, "minLength": 1, "title": "Content", "description": "Inbox item content" }, "source": { "anyOf": [ { "type": "string", "pattern": "^(manual|api|import)$" }, { "type": "null" } ], "title": "Source", "description": "Source of the item", "default": "manual" }, "extra_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extra Data", "description": "Additional metadata" }, "id": { "type": "integer", "title": "Id" }, "user_id": { "type": "integer", "title": "User Id" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "content", "id", "user_id", "status", "created_at", "updated_at" ], "title": "InboxItemResponse", "description": "Schema for inbox item response." }, "InboxItemUpdate": { "properties": { "content": { "anyOf": [ { "type": "string", "maxLength": 10000, "minLength": 1 }, { "type": "null" } ], "title": "Content" }, "status": { "anyOf": [ { "type": "string", "pattern": "^(raw|processed|archived)$" }, { "type": "null" } ], "title": "Status" }, "extra_data": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Extra Data" } }, "type": "object", "title": "InboxItemUpdate", "description": "Schema for updating an inbox item." }, "SessionCreateRequest": { "properties": { "user_id": { "type": "string", "title": "User Id" }, "image": { "type": "string", "title": "Image", "default": "agentos/aider-runtime:latest" }, "name": { "type": "string", "title": "Name", "default": "Untitled Project" }, "workspace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Workspace" } }, "type": "object", "required": [ "user_id" ], "title": "SessionCreateRequest", "description": "Request model for creating a session." }, "SessionResponse": { "properties": { "session_id": { "type": "string", "title": "Session Id" }, "user_id": { "type": "string", "title": "User Id" }, "sandbox_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sandbox Id" }, "name": { "type": "string", "title": "Name" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "session_id", "user_id", "sandbox_id", "name", "status" ], "title": "SessionResponse", "description": "Response model for session operations." }, "Token": { "properties": { "access_token": { "type": "string", "title": "Access Token", "description": "Access token" }, "refresh_token": { "type": "string", "title": "Refresh Token", "description": "Refresh token" }, "token_type": { "type": "string", "title": "Token Type", "description": "Token type", "default": "bearer" }, "expires_in": { "type": "integer", "title": "Expires In", "description": "Access token expiration in seconds" } }, "type": "object", "required": [ "access_token", "refresh_token", "expires_in" ], "title": "Token", "description": "Token response." }, "UserInfo": { "properties": { "id": { "type": "integer", "title": "Id" }, "username": { "type": "string", "title": "Username" }, "email": { "type": "string", "format": "email", "title": "Email" }, "daily_goal": { "type": "integer", "title": "Daily Goal" }, "theme": { "type": "string", "title": "Theme" }, "language": { "type": "string", "title": "Language" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "username", "email", "daily_goal", "theme", "language", "created_at" ], "title": "UserInfo", "description": "Current user info response." }, "UserLogin": { "properties": { "username": { "type": "string", "title": "Username" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "username", "password" ], "title": "UserLogin", "description": "User login request." }, "UserRegister": { "properties": { "username": { "type": "string", "title": "Username" }, "email": { "type": "string", "title": "Email" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "username", "email", "password" ], "title": "UserRegister", "description": "User registration request." }, "UserSettingsUpdate": { "properties": { "daily_goal": { "anyOf": [ { "type": "integer", "maximum": 100.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Daily Goal", "description": "Daily card goal" }, "theme": { "anyOf": [ { "type": "string", "pattern": "^(light|dark)$" }, { "type": "null" } ], "title": "Theme", "description": "UI theme" }, "language": { "anyOf": [ { "type": "string", "maxLength": 10, "minLength": 2 }, { "type": "null" } ], "title": "Language", "description": "Language code" } }, "type": "object", "title": "UserSettingsUpdate", "description": "User settings update request." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "VectorSearchRequest": { "properties": { "query": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Query", "description": "Search query text" }, "limit": { "type": "integer", "maximum": 50.0, "minimum": 1.0, "title": "Limit", "description": "Maximum number of results", "default": 10 }, "para_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Para Type", "description": "Filter by paragraph type" } }, "type": "object", "required": [ "query" ], "title": "VectorSearchRequest", "description": "Request schema for vector search." }, "VectorSearchResponse": { "properties": { "query": { "type": "string", "title": "Query" }, "results": { "items": { "$ref": "#/components/schemas/VectorSearchResultItem" }, "type": "array", "title": "Results" }, "total": { "type": "integer", "title": "Total" } }, "type": "object", "required": [ "query", "results", "total" ], "title": "VectorSearchResponse", "description": "Response schema for vector search." }, "VectorSearchResultItem": { "properties": { "card_id": { "type": "integer", "title": "Card Id" }, "title": { "type": "string", "title": "Title" }, "content": { "type": "string", "title": "Content" }, "para_type": { "type": "string", "title": "Para Type" }, "similarity": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Similarity" } }, "type": "object", "required": [ "card_id", "title", "content", "para_type", "similarity" ], "title": "VectorSearchResultItem", "description": "Single search result item." }, "agent_os__auth__schema__UserRegister": { "properties": { "username": { "type": "string", "maxLength": 50, "minLength": 3, "title": "Username", "description": "Username" }, "email": { "type": "string", "format": "email", "title": "Email", "description": "Email address" }, "password": { "type": "string", "maxLength": 100, "minLength": 6, "title": "Password", "description": "Password" } }, "type": "object", "required": [ "username", "email", "password" ], "title": "UserRegister", "description": "User registration request." } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } } }