definitions: accounts.Account: properties: avatar_url: type: string created_at: type: string display_name: type: string email: type: string id: type: string is_active: type: boolean last_login_at: type: string role: type: string updated_at: type: string username: type: string type: object accounts.CreateAccountRequest: properties: avatar_url: type: string display_name: type: string email: type: string is_active: type: boolean password: type: string role: type: string username: type: string type: object accounts.ListAccountsResponse: properties: items: items: $ref: '#/definitions/accounts.Account' type: array type: object accounts.ResetPasswordRequest: properties: new_password: type: string type: object accounts.UpdateAccountRequest: properties: avatar_url: type: string display_name: type: string is_active: type: boolean role: type: string type: object accounts.UpdatePasswordRequest: properties: current_password: type: string new_password: type: string type: object accounts.UpdateProfileRequest: properties: avatar_url: type: string display_name: type: string type: object bots.Bot: properties: allow_guest: type: boolean avatar_url: type: string check_issue_count: type: integer check_state: type: string created_at: type: string display_name: type: string id: type: string is_active: type: boolean metadata: additionalProperties: {} type: object owner_user_id: type: string status: type: string type: type: string updated_at: type: string type: object bots.BotCheck: properties: check_key: type: string detail: type: string metadata: additionalProperties: {} type: object status: type: string summary: type: string type: object bots.BotMember: properties: bot_id: type: string created_at: type: string role: type: string user_id: type: string type: object bots.CreateBotRequest: properties: avatar_url: type: string display_name: type: string is_active: type: boolean metadata: additionalProperties: {} type: object type: type: string type: object bots.ListBotsResponse: properties: items: items: $ref: '#/definitions/bots.Bot' type: array type: object bots.ListCheckKeysResponse: properties: keys: items: type: string type: array type: object bots.ListChecksResponse: properties: items: items: $ref: '#/definitions/bots.BotCheck' type: array type: object bots.ListMembersResponse: properties: items: items: $ref: '#/definitions/bots.BotMember' type: array type: object bots.TransferBotRequest: properties: owner_user_id: type: string type: object bots.UpdateBotRequest: properties: avatar_url: type: string display_name: type: string is_active: type: boolean metadata: additionalProperties: {} type: object type: object bots.UpsertMemberRequest: properties: role: type: string user_id: type: string type: object channel.Action: properties: label: type: string type: type: string url: type: string value: type: string type: object channel.Attachment: properties: caption: type: string duration_ms: type: integer height: type: integer metadata: additionalProperties: {} type: object mime: type: string name: type: string platform_key: type: string size: type: integer source_platform: type: string thumbnail_url: type: string type: $ref: '#/definitions/channel.AttachmentType' url: type: string width: type: integer type: object channel.AttachmentType: enum: - image - audio - video - voice - file - gif type: string x-enum-varnames: - AttachmentImage - AttachmentAudio - AttachmentVideo - AttachmentVoice - AttachmentFile - AttachmentGIF channel.ChannelCapabilities: properties: attachments: type: boolean block_streaming: type: boolean buttons: type: boolean chat_types: items: type: string type: array edit: type: boolean markdown: type: boolean media: type: boolean native_commands: type: boolean polls: type: boolean reactions: type: boolean reply: type: boolean rich_text: type: boolean streaming: type: boolean text: type: boolean threads: type: boolean unsend: type: boolean type: object channel.ChannelConfig: properties: botID: type: string channelType: type: string createdAt: type: string credentials: additionalProperties: {} type: object externalIdentity: type: string id: type: string routing: additionalProperties: {} type: object selfIdentity: additionalProperties: {} type: object status: type: string updatedAt: type: string verifiedAt: type: string type: object channel.ChannelIdentityBinding: properties: channelIdentityID: type: string channelType: type: string config: additionalProperties: {} type: object createdAt: type: string id: type: string updatedAt: type: string type: object channel.ConfigSchema: properties: fields: additionalProperties: $ref: '#/definitions/channel.FieldSchema' type: object version: type: integer type: object channel.FieldSchema: properties: description: type: string enum: items: type: string type: array example: {} required: type: boolean title: type: string type: $ref: '#/definitions/channel.FieldType' type: object channel.FieldType: enum: - string - secret - bool - number - enum type: string x-enum-varnames: - FieldString - FieldSecret - FieldBool - FieldNumber - FieldEnum channel.Message: properties: actions: items: $ref: '#/definitions/channel.Action' type: array attachments: items: $ref: '#/definitions/channel.Attachment' type: array format: $ref: '#/definitions/channel.MessageFormat' id: type: string metadata: additionalProperties: {} type: object parts: items: $ref: '#/definitions/channel.MessagePart' type: array reply: $ref: '#/definitions/channel.ReplyRef' text: type: string thread: $ref: '#/definitions/channel.ThreadRef' type: object channel.MessageFormat: enum: - plain - markdown - rich type: string x-enum-varnames: - MessageFormatPlain - MessageFormatMarkdown - MessageFormatRich channel.MessagePart: properties: channel_identity_id: type: string emoji: type: string language: type: string metadata: additionalProperties: {} type: object styles: items: $ref: '#/definitions/channel.MessageTextStyle' type: array text: type: string type: $ref: '#/definitions/channel.MessagePartType' url: type: string type: object channel.MessagePartType: enum: - text - link - code_block - mention - emoji type: string x-enum-varnames: - MessagePartText - MessagePartLink - MessagePartCodeBlock - MessagePartMention - MessagePartEmoji channel.MessageTextStyle: enum: - bold - italic - strikethrough - code type: string x-enum-varnames: - MessageStyleBold - MessageStyleItalic - MessageStyleStrikethrough - MessageStyleCode channel.ReplyRef: properties: message_id: type: string target: type: string type: object channel.SendRequest: properties: channel_identity_id: type: string message: $ref: '#/definitions/channel.Message' target: type: string type: object channel.TargetHint: properties: example: type: string label: type: string type: object channel.TargetSpec: properties: format: type: string hints: items: $ref: '#/definitions/channel.TargetHint' type: array type: object channel.ThreadRef: properties: id: type: string type: object channel.UpsertChannelIdentityConfigRequest: properties: config: additionalProperties: {} type: object type: object channel.UpsertConfigRequest: properties: credentials: additionalProperties: {} type: object external_identity: type: string routing: additionalProperties: {} type: object self_identity: additionalProperties: {} type: object status: type: string verified_at: type: string type: object github_com_memohai_memoh_internal_mcp.Connection: properties: bot_id: type: string config: additionalProperties: {} type: object created_at: type: string id: type: string is_active: type: boolean name: type: string type: type: string updated_at: type: string type: object handlers.BatchDeleteRequest: properties: ids: items: type: string type: array type: object handlers.ChannelMeta: properties: capabilities: $ref: '#/definitions/channel.ChannelCapabilities' config_schema: $ref: '#/definitions/channel.ConfigSchema' configless: type: boolean display_name: type: string target_spec: $ref: '#/definitions/channel.TargetSpec' type: type: string user_config_schema: $ref: '#/definitions/channel.ConfigSchema' type: object handlers.CreateContainerRequest: properties: snapshotter: type: string type: object handlers.CreateContainerResponse: properties: container_id: type: string image: type: string snapshotter: type: string started: type: boolean type: object handlers.CreateSnapshotRequest: properties: snapshot_name: type: string type: object handlers.CreateSnapshotResponse: properties: container_id: type: string snapshot_name: type: string snapshotter: type: string type: object handlers.EmbeddingsInput: properties: image_url: type: string text: type: string video_url: type: string type: object handlers.EmbeddingsRequest: properties: dimensions: type: integer input: $ref: '#/definitions/handlers.EmbeddingsInput' model: type: string provider: type: string type: type: string type: object handlers.EmbeddingsResponse: properties: dimensions: type: integer embedding: items: type: number type: array message: type: string model: type: string provider: type: string type: type: string usage: $ref: '#/definitions/handlers.EmbeddingsUsage' type: object handlers.EmbeddingsUsage: properties: duration: type: integer image_tokens: type: integer input_tokens: type: integer type: object handlers.ErrorResponse: properties: message: type: string type: object handlers.GetContainerResponse: properties: container_id: type: string container_path: type: string created_at: type: string host_path: type: string image: type: string namespace: type: string status: type: string task_running: type: boolean updated_at: type: string type: object handlers.ListSnapshotsResponse: properties: snapshots: items: $ref: '#/definitions/handlers.SnapshotInfo' type: array snapshotter: type: string type: object handlers.LoginRequest: properties: password: type: string username: type: string type: object handlers.LoginResponse: properties: access_token: type: string display_name: type: string expires_at: type: string role: type: string token_type: type: string user_id: type: string username: type: string type: object handlers.MCPStdioRequest: properties: args: items: type: string type: array command: type: string cwd: type: string env: additionalProperties: type: string type: object name: type: string type: object handlers.MCPStdioResponse: properties: connection_id: type: string tools: items: type: string type: array url: type: string type: object handlers.SkillItem: properties: content: type: string description: type: string metadata: additionalProperties: {} type: object name: type: string type: object handlers.SkillsDeleteRequest: properties: names: items: type: string type: array type: object handlers.SkillsResponse: properties: skills: items: $ref: '#/definitions/handlers.SkillItem' type: array type: object handlers.SkillsUpsertRequest: properties: skills: items: $ref: '#/definitions/handlers.SkillItem' type: array type: object handlers.SnapshotInfo: properties: created_at: type: string kind: type: string labels: additionalProperties: type: string type: object name: type: string parent: type: string snapshotter: type: string updated_at: type: string type: object handlers.listMyIdentitiesResponse: properties: items: items: $ref: '#/definitions/identities.ChannelIdentity' type: array user_id: type: string type: object handlers.memoryAddPayload: properties: embedding_enabled: type: boolean filters: additionalProperties: {} type: object infer: type: boolean message: type: string messages: items: $ref: '#/definitions/memory.Message' type: array metadata: additionalProperties: {} type: object namespace: type: string run_id: type: string type: object handlers.memoryCompactPayload: properties: decay_days: type: integer ratio: type: number type: object handlers.memoryDeletePayload: properties: memory_ids: items: type: string type: array type: object handlers.memorySearchPayload: properties: embedding_enabled: type: boolean filters: additionalProperties: {} type: object limit: type: integer query: type: string run_id: type: string sources: items: type: string type: array type: object handlers.skillsOpResponse: properties: ok: type: boolean type: object identities.ChannelIdentity: properties: avatar_url: type: string channel: type: string channel_subject_id: type: string created_at: type: string display_name: type: string id: type: string metadata: additionalProperties: {} type: object updated_at: type: string user_id: type: string type: object mcp.ExportResponse: properties: mcpServers: additionalProperties: $ref: '#/definitions/mcp.MCPServerEntry' type: object type: object mcp.ImportRequest: properties: mcpServers: additionalProperties: $ref: '#/definitions/mcp.MCPServerEntry' type: object type: object mcp.ListResponse: properties: items: items: $ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection' type: array type: object mcp.MCPServerEntry: properties: args: items: type: string type: array command: type: string cwd: type: string env: additionalProperties: type: string type: object headers: additionalProperties: type: string type: object transport: type: string url: type: string type: object mcp.UpsertRequest: properties: args: items: type: string type: array command: type: string cwd: type: string env: additionalProperties: type: string type: object headers: additionalProperties: type: string type: object is_active: type: boolean name: type: string transport: type: string url: type: string type: object memory.CompactResult: properties: after_count: type: integer before_count: type: integer ratio: type: number results: items: $ref: '#/definitions/memory.MemoryItem' type: array type: object memory.DeleteResponse: properties: message: type: string type: object memory.MemoryItem: properties: agent_id: type: string bot_id: type: string created_at: type: string hash: type: string id: type: string memory: type: string metadata: additionalProperties: {} type: object run_id: type: string score: type: number updated_at: type: string type: object memory.Message: properties: content: type: string role: type: string type: object memory.RebuildResult: properties: fs_count: type: integer missing_count: type: integer qdrant_count: type: integer restored_count: type: integer type: object memory.SearchResponse: properties: relations: items: {} type: array results: items: $ref: '#/definitions/memory.MemoryItem' type: array type: object memory.UsageResponse: properties: avg_text_bytes: type: integer count: type: integer estimated_storage_bytes: type: integer total_text_bytes: type: integer type: object models.AddRequest: properties: dimensions: type: integer input: items: type: string type: array is_multimodal: type: boolean llm_provider_id: type: string model_id: type: string name: type: string type: $ref: '#/definitions/models.ModelType' type: object models.AddResponse: properties: id: type: string model_id: type: string type: object models.CountResponse: properties: count: type: integer type: object models.GetResponse: properties: dimensions: type: integer input: items: type: string type: array is_multimodal: type: boolean llm_provider_id: type: string model_id: type: string name: type: string type: $ref: '#/definitions/models.ModelType' type: object models.ModelType: enum: - chat - embedding type: string x-enum-varnames: - ModelTypeChat - ModelTypeEmbedding models.UpdateRequest: properties: dimensions: type: integer input: items: type: string type: array is_multimodal: type: boolean llm_provider_id: type: string model_id: type: string name: type: string type: $ref: '#/definitions/models.ModelType' type: object providers.ClientType: enum: - openai - openai-compat - anthropic - google - azure - bedrock - mistral - xai - ollama - dashscope type: string x-enum-varnames: - ClientTypeOpenAI - ClientTypeOpenAICompat - ClientTypeAnthropic - ClientTypeGoogle - ClientTypeAzure - ClientTypeBedrock - ClientTypeMistral - ClientTypeXAI - ClientTypeOllama - ClientTypeDashscope providers.CountResponse: properties: count: type: integer type: object providers.CreateRequest: properties: api_key: type: string base_url: type: string client_type: $ref: '#/definitions/providers.ClientType' metadata: additionalProperties: {} type: object name: type: string required: - base_url - client_type - name type: object providers.GetResponse: properties: api_key: description: masked in response type: string base_url: type: string client_type: type: string created_at: type: string id: type: string metadata: additionalProperties: {} type: object name: type: string updated_at: type: string type: object providers.UpdateRequest: properties: api_key: type: string base_url: type: string client_type: $ref: '#/definitions/providers.ClientType' metadata: additionalProperties: {} type: object name: type: string type: object schedule.CreateRequest: properties: command: type: string description: type: string enabled: type: boolean max_calls: $ref: '#/definitions/schedule.NullableInt' name: type: string pattern: type: string type: object schedule.ListResponse: properties: items: items: $ref: '#/definitions/schedule.Schedule' type: array type: object schedule.NullableInt: properties: set: type: boolean value: type: integer type: object schedule.Schedule: properties: bot_id: type: string command: type: string created_at: type: string current_calls: type: integer description: type: string enabled: type: boolean id: type: string max_calls: type: integer name: type: string pattern: type: string updated_at: type: string type: object schedule.UpdateRequest: properties: command: type: string description: type: string enabled: type: boolean max_calls: $ref: '#/definitions/schedule.NullableInt' name: type: string pattern: type: string type: object settings.Settings: properties: allow_guest: type: boolean chat_model_id: type: string embedding_model_id: type: string language: type: string max_context_load_time: type: integer memory_model_id: type: string type: object settings.UpsertRequest: properties: allow_guest: type: boolean chat_model_id: type: string embedding_model_id: type: string language: type: string max_context_load_time: type: integer memory_model_id: type: string type: object subagent.AddSkillsRequest: properties: skills: items: type: string type: array type: object subagent.ContextResponse: properties: messages: items: additionalProperties: {} type: object type: array type: object subagent.CreateRequest: properties: description: type: string messages: items: additionalProperties: {} type: object type: array metadata: additionalProperties: {} type: object name: type: string skills: items: type: string type: array type: object subagent.ListResponse: properties: items: items: $ref: '#/definitions/subagent.Subagent' type: array type: object subagent.SkillsResponse: properties: skills: items: type: string type: array type: object subagent.Subagent: properties: bot_id: type: string created_at: type: string deleted: type: boolean deleted_at: type: string description: type: string id: type: string messages: items: additionalProperties: {} type: object type: array metadata: additionalProperties: {} type: object name: type: string skills: items: type: string type: array updated_at: type: string type: object subagent.UpdateContextRequest: properties: messages: items: additionalProperties: {} type: object type: array type: object subagent.UpdateRequest: properties: description: type: string metadata: additionalProperties: {} type: object name: type: string type: object subagent.UpdateSkillsRequest: properties: skills: items: type: string type: array type: object info: contact: {} title: Memoh API version: 1.0.0 paths: /auth/login: post: description: Validate user credentials and issue a JWT parameters: - description: Login request in: body name: payload required: true schema: $ref: '#/definitions/handlers.LoginRequest' responses: "200": description: OK schema: $ref: '#/definitions/handlers.LoginResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Login tags: - auth /bots: get: description: List bots accessible to current user (admin can specify owner_id) parameters: - description: Owner user ID (admin only) in: query name: owner_id type: string responses: "200": description: OK schema: $ref: '#/definitions/bots.ListBotsResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List bots tags: - bots post: description: Create a bot user owned by current user (or admin-specified owner) parameters: - description: Bot payload in: body name: payload required: true schema: $ref: '#/definitions/bots.CreateBotRequest' responses: "201": description: Created schema: $ref: '#/definitions/bots.Bot' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create bot user tags: - bots /bots/{bot_id}/container: delete: parameters: - description: Bot ID in: path name: bot_id required: true type: string responses: "204": description: No Content "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete MCP container for bot tags: - containerd get: parameters: - description: Bot ID in: path name: bot_id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/handlers.GetContainerResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get container info for bot tags: - containerd post: parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Create container payload in: body name: payload required: true schema: $ref: '#/definitions/handlers.CreateContainerRequest' responses: "200": description: OK schema: $ref: '#/definitions/handlers.CreateContainerResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create and start MCP container for bot tags: - containerd /bots/{bot_id}/container/skills: delete: parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Delete skills payload in: body name: payload required: true schema: $ref: '#/definitions/handlers.SkillsDeleteRequest' responses: "200": description: OK schema: $ref: '#/definitions/handlers.skillsOpResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete skills from data directory tags: - containerd get: parameters: - description: Bot ID in: path name: bot_id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/handlers.SkillsResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List skills from data directory tags: - containerd post: parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Skills payload in: body name: payload required: true schema: $ref: '#/definitions/handlers.SkillsUpsertRequest' responses: "200": description: OK schema: $ref: '#/definitions/handlers.skillsOpResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Upload skills into data directory tags: - containerd /bots/{bot_id}/container/snapshots: get: parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Snapshotter name in: query name: snapshotter type: string responses: "200": description: OK schema: $ref: '#/definitions/handlers.ListSnapshotsResponse' summary: List snapshots tags: - containerd post: parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Create snapshot payload in: body name: payload required: true schema: $ref: '#/definitions/handlers.CreateSnapshotRequest' responses: "200": description: OK schema: $ref: '#/definitions/handlers.CreateSnapshotResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create container snapshot for bot tags: - containerd /bots/{bot_id}/container/start: post: parameters: - description: Bot ID in: path name: bot_id required: true type: string responses: "200": description: OK schema: type: object "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Start container task for bot tags: - containerd /bots/{bot_id}/container/stop: post: parameters: - description: Bot ID in: path name: bot_id required: true type: string responses: "200": description: OK schema: type: object "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Stop container task for bot tags: - containerd /bots/{bot_id}/mcp: get: description: List MCP connections for a bot responses: "200": description: OK schema: $ref: '#/definitions/mcp.ListResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List MCP connections tags: - mcp post: description: Create a MCP connection for a bot parameters: - description: MCP payload in: body name: payload required: true schema: $ref: '#/definitions/mcp.UpsertRequest' responses: "201": description: Created schema: $ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create MCP connection tags: - mcp /bots/{bot_id}/mcp-ops/batch-delete: post: description: Delete multiple MCP connections by IDs. parameters: - description: IDs to delete in: body name: payload required: true schema: $ref: '#/definitions/handlers.BatchDeleteRequest' responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Batch delete MCP connections tags: - mcp /bots/{bot_id}/mcp-stdio: post: description: Start a stdio MCP process in the bot container and expose it as MCP HTTP endpoint. parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Stdio MCP payload in: body name: payload required: true schema: $ref: '#/definitions/handlers.MCPStdioRequest' responses: "200": description: OK schema: $ref: '#/definitions/handlers.MCPStdioResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create MCP stdio proxy tags: - containerd /bots/{bot_id}/mcp-stdio/{connection_id}: post: description: Proxies MCP JSON-RPC requests to a stdio MCP process in the container. parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Connection ID in: path name: connection_id required: true type: string - description: JSON-RPC request in: body name: payload required: true schema: type: object responses: "200": description: 'JSON-RPC response: {jsonrpc,id,result|error}' schema: type: object "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: MCP stdio proxy (JSON-RPC) tags: - containerd /bots/{bot_id}/mcp/{id}: delete: description: Delete a MCP connection by ID parameters: - description: MCP ID in: path name: id required: true type: string responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete MCP connection tags: - mcp get: description: Get a MCP connection by ID parameters: - description: MCP ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get MCP connection tags: - mcp put: description: Update a MCP connection by ID parameters: - description: MCP ID in: path name: id required: true type: string - description: MCP payload in: body name: payload required: true schema: $ref: '#/definitions/mcp.UpsertRequest' responses: "200": description: OK schema: $ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update MCP connection tags: - mcp /bots/{bot_id}/mcp/export: get: description: Export all MCP connections for a bot in standard mcpServers format. responses: "200": description: OK schema: $ref: '#/definitions/mcp.ExportResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Export MCP connections tags: - mcp /bots/{bot_id}/mcp/import: put: description: Batch import MCP connections from standard mcpServers format. Existing connections (matched by name) get config updated with is_active preserved. New connections are created as active. parameters: - description: mcpServers dict in: body name: payload required: true schema: $ref: '#/definitions/mcp.ImportRequest' responses: "200": description: OK schema: $ref: '#/definitions/mcp.ListResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Import MCP connections tags: - mcp /bots/{bot_id}/memory: delete: consumes: - application/json description: Delete specific memories by IDs, or delete all memories if no IDs are provided parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: 'Optional: specify memory_ids to delete; if omitted, deletes all' in: body name: payload schema: $ref: '#/definitions/handlers.memoryDeletePayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/memory.DeleteResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete memories tags: - memory get: description: List all memories in the bot-shared namespace parameters: - description: Bot ID in: path name: bot_id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/memory.SearchResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get all memories tags: - memory post: consumes: - application/json description: Add memory into the bot-shared namespace parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Memory add payload in: body name: payload required: true schema: $ref: '#/definitions/handlers.memoryAddPayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/memory.SearchResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Add memory tags: - memory /bots/{bot_id}/memory/{id}: delete: description: Delete a single memory by its ID parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Memory ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/memory.DeleteResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete a single memory tags: - memory /bots/{bot_id}/memory/compact: post: consumes: - application/json description: |- Consolidate memories by merging similar/redundant entries using LLM. **ratio** (required, range (0,1]): - 0.8 = light compression, mostly dedup, keep ~80% of entries - 0.5 = moderate compression, merge similar facts, keep ~50% - 0.3 = aggressive compression, heavily consolidate, keep ~30% **decay_days** (optional): enable time decay — memories older than N days are treated as low priority and more likely to be merged/dropped. parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: ratio (0,1] required; decay_days optional in: body name: payload required: true schema: $ref: '#/definitions/handlers.memoryCompactPayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/memory.CompactResult' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Compact memories tags: - memory /bots/{bot_id}/memory/rebuild: post: description: Read memory files from the container filesystem (source of truth) and restore missing entries to Qdrant parameters: - description: Bot ID in: path name: bot_id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/memory.RebuildResult' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Rebuild memories from filesystem tags: - memory /bots/{bot_id}/memory/search: post: consumes: - application/json description: Search memory in the bot-shared namespace parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: Memory search payload in: body name: payload required: true schema: $ref: '#/definitions/handlers.memorySearchPayload' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/memory.SearchResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Search memory tags: - memory /bots/{bot_id}/memory/usage: get: description: Query the estimated storage usage of current memories parameters: - description: Bot ID in: path name: bot_id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/memory.UsageResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "503": description: Service Unavailable schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get memory usage tags: - memory /bots/{bot_id}/schedule: get: description: List schedules for current user responses: "200": description: OK schema: $ref: '#/definitions/schedule.ListResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List schedules tags: - schedule post: description: Create a schedule for current user parameters: - description: Schedule payload in: body name: payload required: true schema: $ref: '#/definitions/schedule.CreateRequest' responses: "201": description: Created schema: $ref: '#/definitions/schedule.Schedule' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create schedule tags: - schedule /bots/{bot_id}/schedule/{id}: delete: description: Delete a schedule by ID parameters: - description: Schedule ID in: path name: id required: true type: string responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete schedule tags: - schedule get: description: Get a schedule by ID parameters: - description: Schedule ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/schedule.Schedule' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get schedule tags: - schedule put: description: Update a schedule by ID parameters: - description: Schedule ID in: path name: id required: true type: string - description: Schedule payload in: body name: payload required: true schema: $ref: '#/definitions/schedule.UpdateRequest' responses: "200": description: OK schema: $ref: '#/definitions/schedule.Schedule' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update schedule tags: - schedule /bots/{bot_id}/settings: delete: description: Remove agent settings for current user responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete user settings tags: - settings get: description: Get agent settings for current user responses: "200": description: OK schema: $ref: '#/definitions/settings.Settings' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get user settings tags: - settings post: description: Update or create agent settings for current user parameters: - description: Settings payload in: body name: payload required: true schema: $ref: '#/definitions/settings.UpsertRequest' responses: "200": description: OK schema: $ref: '#/definitions/settings.Settings' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update user settings tags: - settings put: description: Update or create agent settings for current user parameters: - description: Settings payload in: body name: payload required: true schema: $ref: '#/definitions/settings.UpsertRequest' responses: "200": description: OK schema: $ref: '#/definitions/settings.Settings' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update user settings tags: - settings /bots/{bot_id}/subagents: get: description: List subagents for current user responses: "200": description: OK schema: $ref: '#/definitions/subagent.ListResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List subagents tags: - subagent post: description: Create a subagent for current user parameters: - description: Subagent payload in: body name: payload required: true schema: $ref: '#/definitions/subagent.CreateRequest' responses: "201": description: Created schema: $ref: '#/definitions/subagent.Subagent' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create subagent tags: - subagent /bots/{bot_id}/subagents/{id}: delete: description: Delete a subagent by ID parameters: - description: Subagent ID in: path name: id required: true type: string responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete subagent tags: - subagent get: description: Get a subagent by ID parameters: - description: Subagent ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/subagent.Subagent' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get subagent tags: - subagent put: description: Update a subagent by ID parameters: - description: Subagent ID in: path name: id required: true type: string - description: Subagent payload in: body name: payload required: true schema: $ref: '#/definitions/subagent.UpdateRequest' responses: "200": description: OK schema: $ref: '#/definitions/subagent.Subagent' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update subagent tags: - subagent /bots/{bot_id}/subagents/{id}/context: get: description: Get a subagent's message context parameters: - description: Subagent ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/subagent.ContextResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get subagent context tags: - subagent put: description: Update a subagent's message context parameters: - description: Subagent ID in: path name: id required: true type: string - description: Context payload in: body name: payload required: true schema: $ref: '#/definitions/subagent.UpdateContextRequest' responses: "200": description: OK schema: $ref: '#/definitions/subagent.ContextResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update subagent context tags: - subagent /bots/{bot_id}/subagents/{id}/skills: get: description: Get a subagent's skills parameters: - description: Subagent ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/subagent.SkillsResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get subagent skills tags: - subagent post: description: Add skills to a subagent parameters: - description: Subagent ID in: path name: id required: true type: string - description: Skills payload in: body name: payload required: true schema: $ref: '#/definitions/subagent.AddSkillsRequest' responses: "200": description: OK schema: $ref: '#/definitions/subagent.SkillsResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Add subagent skills tags: - subagent put: description: Replace a subagent's skills parameters: - description: Subagent ID in: path name: id required: true type: string - description: Skills payload in: body name: payload required: true schema: $ref: '#/definitions/subagent.UpdateSkillsRequest' responses: "200": description: OK schema: $ref: '#/definitions/subagent.SkillsResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update subagent skills tags: - subagent /bots/{bot_id}/tools: post: description: MCP endpoint for tool discovery and invocation. parameters: - description: Bot ID in: path name: bot_id required: true type: string - description: JSON-RPC request in: body name: payload required: true schema: type: object responses: "200": description: 'JSON-RPC response: {jsonrpc,id,result|error}' schema: type: object "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Unified MCP tools gateway tags: - containerd /bots/{id}: delete: description: Delete a bot user (owner/admin only) parameters: - description: Bot ID in: path name: id required: true type: string responses: "202": description: Accepted schema: additionalProperties: type: string type: object "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete bot tags: - bots get: description: Get a bot by ID (owner/admin only) parameters: - description: Bot ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/bots.Bot' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get bot details tags: - bots put: description: Update bot profile (owner/admin only) parameters: - description: Bot ID in: path name: id required: true type: string - description: Bot update payload in: body name: payload required: true schema: $ref: '#/definitions/bots.UpdateBotRequest' responses: "200": description: OK schema: $ref: '#/definitions/bots.Bot' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update bot details tags: - bots /bots/{id}/channel/{platform}: get: description: Get bot channel configuration parameters: - description: Bot ID in: path name: id required: true type: string - description: Channel platform in: path name: platform required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/channel.ChannelConfig' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get bot channel config tags: - bots put: description: Update bot channel configuration parameters: - description: Bot ID in: path name: id required: true type: string - description: Channel platform in: path name: platform required: true type: string - description: Channel config payload in: body name: payload required: true schema: $ref: '#/definitions/channel.UpsertConfigRequest' responses: "200": description: OK schema: $ref: '#/definitions/channel.ChannelConfig' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update bot channel config tags: - bots /bots/{id}/channel/{platform}/send: post: description: Send a message using bot channel configuration parameters: - description: Bot ID in: path name: id required: true type: string - description: Channel platform in: path name: platform required: true type: string - description: Send payload in: body name: payload required: true schema: $ref: '#/definitions/channel.SendRequest' responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Send message via bot channel tags: - bots /bots/{id}/channel/{platform}/send_chat: post: description: Send a message using a session-scoped token (reply only) parameters: - description: Bot ID in: path name: id required: true type: string - description: Channel platform in: path name: platform required: true type: string - description: Send payload in: body name: payload required: true schema: $ref: '#/definitions/channel.SendRequest' responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "401": description: Unauthorized schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Send message via bot channel session token tags: - bots /bots/{id}/checks: get: description: Evaluate bot attached resource checks in runtime parameters: - description: Bot ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/bots.ListChecksResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List bot runtime checks tags: - bots /bots/{id}/checks/keys: get: description: Returns all check keys available for a bot (builtin + MCP connections) parameters: - description: Bot ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/bots.ListCheckKeysResponse' summary: List available check keys tags: - bots /bots/{id}/checks/run/{key}: get: description: Evaluate one check key for a bot parameters: - description: Bot ID in: path name: id required: true type: string - description: Check key in: path name: key required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/bots.BotCheck' summary: Run a single bot check tags: - bots /bots/{id}/members: get: description: List members for a bot parameters: - description: Bot ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/bots.ListMembersResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List bot members tags: - bots put: description: Add or update bot member role parameters: - description: Bot ID in: path name: id required: true type: string - description: Member payload in: body name: payload required: true schema: $ref: '#/definitions/bots.UpsertMemberRequest' responses: "200": description: OK schema: $ref: '#/definitions/bots.BotMember' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Upsert bot member tags: - bots /bots/{id}/members/{user_id}: delete: description: Remove a member from a bot parameters: - description: Bot ID in: path name: id required: true type: string - description: User ID in: path name: user_id required: true type: string responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete bot member tags: - bots /bots/{id}/owner: put: description: Transfer bot ownership to another human user parameters: - description: Bot ID in: path name: id required: true type: string - description: Transfer payload in: body name: payload required: true schema: $ref: '#/definitions/bots.TransferBotRequest' responses: "200": description: OK schema: $ref: '#/definitions/bots.Bot' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Transfer bot owner (admin only) tags: - bots /channels: get: description: List channel meta information including capabilities and schemas responses: "200": description: OK schema: items: $ref: '#/definitions/handlers.ChannelMeta' type: array "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List channel capabilities and schemas tags: - channel /channels/{platform}: get: description: Get channel meta information including capabilities and schemas parameters: - description: Channel platform in: path name: platform required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/handlers.ChannelMeta' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get channel capabilities and schemas tags: - channel /embeddings: post: description: Create text or multimodal embeddings parameters: - description: Embeddings request in: body name: payload required: true schema: $ref: '#/definitions/handlers.EmbeddingsRequest' responses: "200": description: OK schema: $ref: '#/definitions/handlers.EmbeddingsResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' "501": description: Not Implemented schema: $ref: '#/definitions/handlers.EmbeddingsResponse' summary: Create embeddings tags: - embeddings /models: get: description: Get a list of all configured models, optionally filtered by type or client type parameters: - description: Model type (chat, embedding) in: query name: type type: string - description: Client type (openai, openai-compat, anthropic, google, azure, bedrock, mistral, xai, ollama, dashscope) in: query name: client_type type: string responses: "200": description: OK schema: items: $ref: '#/definitions/models.GetResponse' type: array "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List all models tags: - models post: description: Create a new model configuration parameters: - description: Model configuration in: body name: payload required: true schema: $ref: '#/definitions/models.AddRequest' responses: "201": description: Created schema: $ref: '#/definitions/models.AddResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create a new model tags: - models /models/{id}: delete: description: Delete a model configuration by its internal UUID parameters: - description: Model internal ID (UUID) in: path name: id required: true type: string responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete model by internal ID tags: - models get: description: Get a model configuration by its internal UUID parameters: - description: Model internal ID (UUID) in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/models.GetResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get model by internal ID tags: - models put: description: Update a model configuration by its internal UUID parameters: - description: Model internal ID (UUID) in: path name: id required: true type: string - description: Updated model configuration in: body name: payload required: true schema: $ref: '#/definitions/models.UpdateRequest' responses: "200": description: OK schema: $ref: '#/definitions/models.GetResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update model by internal ID tags: - models /models/count: get: description: Get the total count of models, optionally filtered by type parameters: - description: Model type (chat, embedding) in: query name: type type: string responses: "200": description: OK schema: $ref: '#/definitions/models.CountResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get model count tags: - models /models/model/{modelId}: delete: description: Delete a model configuration by its model_id field (e.g., gpt-4) parameters: - description: Model ID (e.g., gpt-4) in: path name: modelId required: true type: string responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete model by model ID tags: - models get: description: Get a model configuration by its model_id field (e.g., gpt-4) parameters: - description: Model ID (e.g., gpt-4) in: path name: modelId required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/models.GetResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get model by model ID tags: - models put: description: Update a model configuration by its model_id field (e.g., gpt-4) parameters: - description: Model ID (e.g., gpt-4) in: path name: modelId required: true type: string - description: Updated model configuration in: body name: payload required: true schema: $ref: '#/definitions/models.UpdateRequest' responses: "200": description: OK schema: $ref: '#/definitions/models.GetResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update model by model ID tags: - models /providers: get: consumes: - application/json description: Get a list of all configured LLM providers, optionally filtered by client type parameters: - description: Client type filter (openai, openai-compat, anthropic, google, azure, bedrock, mistral, xai, ollama, dashscope) in: query name: client_type type: string produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/providers.GetResponse' type: array "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List all LLM providers tags: - providers post: consumes: - application/json description: Create a new LLM provider configuration parameters: - description: Provider configuration in: body name: request required: true schema: $ref: '#/definitions/providers.CreateRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/providers.GetResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create a new LLM provider tags: - providers /providers/{id}: delete: consumes: - application/json description: Delete a provider configuration parameters: - description: Provider ID (UUID) in: path name: id required: true type: string produces: - application/json responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Delete provider tags: - providers get: consumes: - application/json description: Get a provider configuration by its ID parameters: - description: Provider ID (UUID) in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/providers.GetResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get provider by ID tags: - providers put: consumes: - application/json description: Update an existing provider configuration parameters: - description: Provider ID (UUID) in: path name: id required: true type: string - description: Updated provider configuration in: body name: request required: true schema: $ref: '#/definitions/providers.UpdateRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/providers.GetResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update provider tags: - providers /providers/{id}/models: get: description: Get models for a provider by id, optionally filtered by type parameters: - description: Provider ID (UUID) in: path name: id required: true type: string - description: Model type (chat, embedding) in: query name: type type: string responses: "200": description: OK schema: items: $ref: '#/definitions/models.GetResponse' type: array "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List provider models tags: - providers /providers/count: get: consumes: - application/json description: Get the total count of providers, optionally filtered by client type parameters: - description: Client type filter (openai, openai-compat, anthropic, google, azure, bedrock, mistral, xai, ollama, dashscope) in: query name: client_type type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/providers.CountResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Count providers tags: - providers /providers/name/{name}: get: consumes: - application/json description: Get a provider configuration by its name parameters: - description: Provider name in: path name: name required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/providers.GetResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get provider by name tags: - providers /users: get: description: List users responses: "200": description: OK schema: $ref: '#/definitions/accounts.ListAccountsResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List users (admin only) tags: - users post: description: Create a new human user account parameters: - description: User payload in: body name: payload required: true schema: $ref: '#/definitions/accounts.CreateAccountRequest' responses: "201": description: Created schema: $ref: '#/definitions/accounts.Account' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Create human user (admin only) tags: - users /users/{id}: get: description: Get user details (self or admin only) parameters: - description: User ID in: path name: id required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/accounts.Account' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get user by ID tags: - users put: description: Update user profile and status parameters: - description: User ID in: path name: id required: true type: string - description: User update payload in: body name: payload required: true schema: $ref: '#/definitions/accounts.UpdateAccountRequest' responses: "200": description: OK schema: $ref: '#/definitions/accounts.Account' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update user (admin only) tags: - users /users/{id}/password: put: description: Reset a user password parameters: - description: User ID in: path name: id required: true type: string - description: Password payload in: body name: payload required: true schema: $ref: '#/definitions/accounts.ResetPasswordRequest' responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "403": description: Forbidden schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Reset user password (admin only) tags: - users /users/me: get: description: Get current user profile responses: "200": description: OK schema: $ref: '#/definitions/accounts.Account' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get current user tags: - users put: description: Update current user display name or avatar parameters: - description: Profile payload in: body name: payload required: true schema: $ref: '#/definitions/accounts.UpdateProfileRequest' responses: "200": description: OK schema: $ref: '#/definitions/accounts.Account' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update current user profile tags: - users /users/me/channels/{platform}: get: description: Get channel binding configuration for current user parameters: - description: Channel platform in: path name: platform required: true type: string responses: "200": description: OK schema: $ref: '#/definitions/channel.ChannelIdentityBinding' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Get channel user config tags: - channel put: description: Update channel binding configuration for current user parameters: - description: Channel platform in: path name: platform required: true type: string - description: Channel user config payload in: body name: payload required: true schema: $ref: '#/definitions/channel.UpsertChannelIdentityConfigRequest' responses: "200": description: OK schema: $ref: '#/definitions/channel.ChannelIdentityBinding' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update channel user config tags: - channel /users/me/identities: get: description: List all channel identities linked to current user responses: "200": description: OK schema: $ref: '#/definitions/handlers.listMyIdentitiesResponse' "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "404": description: Not Found schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: List current user's channel identities tags: - users /users/me/password: put: description: Update current user password with current password check parameters: - description: Password payload in: body name: payload required: true schema: $ref: '#/definitions/accounts.UpdatePasswordRequest' responses: "204": description: No Content "400": description: Bad Request schema: $ref: '#/definitions/handlers.ErrorResponse' "500": description: Internal Server Error schema: $ref: '#/definitions/handlers.ErrorResponse' summary: Update current user password tags: - users swagger: "2.0"