Files
Memoh/spec/docs.go
T
Acbox Liu bafd327b6b feat: agent browser (#200)
* feat: agent browser

* chore: complete docker and action config

* feat: more actions

* feat: browser tab switch

* fix: browser build

* fix: lint

* fix: migrations
2026-03-07 15:06:00 +08:00

10842 lines
364 KiB
Go

// Package spec Code generated by swaggo/swag. DO NOT EDIT
package spec
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/auth/login": {
"post": {
"description": "Validate user credentials and issue a JWT",
"tags": [
"auth"
],
"summary": "Login",
"parameters": [
{
"description": "Login request",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/auth/refresh": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Issue a new JWT using the existing claims with updated expiration",
"tags": [
"auth"
],
"summary": "Refresh Token",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.RefreshResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots": {
"get": {
"description": "List bots accessible to current user (admin can specify owner_id)",
"tags": [
"bots"
],
"summary": "List bots",
"parameters": [
{
"type": "string",
"description": "Owner user ID (admin only)",
"name": "owner_id",
"in": "query"
}
],
"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"
}
}
}
},
"post": {
"description": "Create a bot user owned by current user (or admin-specified owner)",
"tags": [
"bots"
],
"summary": "Create bot user",
"parameters": [
{
"description": "Bot payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/cli/messages": {
"post": {
"description": "Post a user message (with optional attachments) through the local channel pipeline.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"local-channel"
],
"summary": "Send a message to a local channel",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Message payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.LocalChannelMessageRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/cli/stream": {
"get": {
"description": "Open a persistent SSE connection to receive real-time stream events for the given bot.",
"produces": [
"text/event-stream"
],
"tags": [
"local-channel"
],
"summary": "Subscribe to local channel events via SSE",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "SSE stream",
"schema": {
"type": "string"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container": {
"get": {
"tags": [
"containerd"
],
"summary": "Get container info for bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"post": {
"tags": [
"containerd"
],
"summary": "Create and start MCP container for bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Create container payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"tags": [
"containerd"
],
"summary": "Delete MCP container for bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "Export /data before deletion",
"name": "preserve_data",
"in": "query"
}
],
"responses": {
"204": {
"description": "No Content"
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/data/export": {
"post": {
"produces": [
"application/gzip"
],
"tags": [
"containerd"
],
"summary": "Export container /data as a tar.gz archive",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/data/import": {
"post": {
"consumes": [
"multipart/form-data"
],
"tags": [
"containerd"
],
"summary": "Import a tar.gz archive into container /data",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "file",
"description": "tar.gz archive",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/data/restore": {
"post": {
"tags": [
"containerd"
],
"summary": "Restore previously preserved data into container",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs": {
"get": {
"description": "Returns metadata about a file or directory at the given container path",
"tags": [
"containerd"
],
"summary": "Get file or directory info",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Container path",
"name": "path",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.FSFileInfo"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/delete": {
"post": {
"description": "Deletes a file or directory at the given container path",
"tags": [
"containerd"
],
"summary": "Delete a file or directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Delete request",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.FSDeleteRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.fsOpResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/download": {
"get": {
"description": "Downloads a file from the container with appropriate Content-Type",
"produces": [
"application/octet-stream"
],
"tags": [
"containerd"
],
"summary": "Download a file as binary stream",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Container file path",
"name": "path",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/list": {
"get": {
"description": "Lists files and directories at the given container path",
"tags": [
"containerd"
],
"summary": "List directory contents",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Container directory path",
"name": "path",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.FSListResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/mkdir": {
"post": {
"description": "Creates a directory (and parents) at the given container path",
"tags": [
"containerd"
],
"summary": "Create a directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Mkdir request",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.FSMkdirRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.fsOpResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/read": {
"get": {
"description": "Reads the content of a file and returns it as a JSON string",
"tags": [
"containerd"
],
"summary": "Read file content as text",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Container file path",
"name": "path",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.FSReadResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/rename": {
"post": {
"description": "Renames or moves a file/directory from oldPath to newPath",
"tags": [
"containerd"
],
"summary": "Rename or move a file/directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Rename request",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.FSRenameRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.fsOpResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/upload": {
"post": {
"description": "Uploads a binary file to the given container path",
"consumes": [
"multipart/form-data"
],
"tags": [
"containerd"
],
"summary": "Upload a file via multipart form",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Destination container path",
"name": "path",
"in": "formData",
"required": true
},
{
"type": "file",
"description": "File to upload",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.FSUploadResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/write": {
"post": {
"description": "Creates or overwrites a file with the provided text content",
"tags": [
"containerd"
],
"summary": "Write text content to a file",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Write request",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.FSWriteRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.fsOpResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/container/skills": {
"get": {
"tags": [
"containerd"
],
"summary": "List skills from data directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"post": {
"tags": [
"containerd"
],
"summary": "Upload skills into data directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Skills payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"tags": [
"containerd"
],
"summary": "Delete skills from data directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Delete skills payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/container/snapshots": {
"get": {
"tags": [
"containerd"
],
"summary": "List snapshots",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Snapshotter name",
"name": "snapshotter",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.ListSnapshotsResponse"
}
},
"501": {
"description": "Snapshots currently not supported on this backend",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"tags": [
"containerd"
],
"summary": "Create container snapshot for bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Create snapshot payload",
"name": "payload",
"in": "body",
"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"
}
},
"501": {
"description": "Snapshots currently not supported on this backend",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/snapshots/rollback": {
"post": {
"tags": [
"containerd"
],
"summary": "Rollback container to a previous snapshot version",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Rollback payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.RollbackRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/start": {
"post": {
"tags": [
"containerd"
],
"summary": "Start container task for bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{bot_id}/container/stop": {
"post": {
"tags": [
"containerd"
],
"summary": "Stop container task for bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{bot_id}/email-bindings": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-bindings"
],
"summary": "List email bindings for a bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/email.BindingResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"email-bindings"
],
"summary": "Bind an email provider to a bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Binding configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/email.CreateBindingRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/email.BindingResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/email-bindings/{id}": {
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"email-bindings"
],
"summary": "Update an email binding",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Binding ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated binding",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/email.UpdateBindingRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/email.BindingResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"email-bindings"
],
"summary": "Remove an email binding",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Binding ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/email-outbox": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-outbox"
],
"summary": "List outbox emails for a bot (audit)",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "integer",
"default": 20,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"description": "Offset",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/email-outbox/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-outbox"
],
"summary": "Get outbox email detail",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Email ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/email.OutboxItemResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/heartbeat/logs": {
"get": {
"description": "List heartbeat execution logs for a bot",
"tags": [
"heartbeat"
],
"summary": "List heartbeat logs",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Before timestamp (RFC3339)",
"name": "before",
"in": "query"
},
{
"type": "integer",
"default": 50,
"description": "Limit",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/heartbeat.ListLogsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete all heartbeat execution logs for a bot",
"tags": [
"heartbeat"
],
"summary": "Delete heartbeat logs",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/inbox": {
"get": {
"description": "List inbox items for a bot with optional filters",
"tags": [
"inbox"
],
"summary": "List inbox items",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Filter by read status (true/false)",
"name": "is_read",
"in": "query"
},
{
"type": "string",
"description": "Filter by source",
"name": "source",
"in": "query"
},
{
"type": "integer",
"default": 50,
"description": "Max items to return",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"description": "Offset for pagination",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/inbox.Item"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a new inbox item (for external integrations)",
"tags": [
"inbox"
],
"summary": "Create inbox item",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Inbox item payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/inbox.CreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/inbox.Item"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/inbox/count": {
"get": {
"description": "Count unread and total inbox items",
"tags": [
"inbox"
],
"summary": "Count inbox items",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/inbox.CountResult"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/inbox/mark-read": {
"post": {
"description": "Batch mark inbox items as read",
"tags": [
"inbox"
],
"summary": "Mark inbox items as read",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Item IDs to mark as read",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.markReadRequest"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/inbox/{id}": {
"get": {
"description": "Get a single inbox item by ID",
"tags": [
"inbox"
],
"summary": "Get inbox item",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Inbox item ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/inbox.Item"
}
},
"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"
}
}
}
},
"delete": {
"description": "Delete a single inbox item",
"tags": [
"inbox"
],
"summary": "Delete inbox item",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Inbox item ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp": {
"get": {
"description": "List MCP connections for a bot",
"tags": [
"mcp"
],
"summary": "List MCP connections",
"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"
}
}
}
},
"post": {
"description": "Create a MCP connection for a bot",
"tags": [
"mcp"
],
"summary": "Create MCP connection",
"parameters": [
{
"description": "MCP payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/mcp-ops/batch-delete": {
"post": {
"description": "Delete multiple MCP connections by IDs.",
"tags": [
"mcp"
],
"summary": "Batch delete MCP connections",
"parameters": [
{
"description": "IDs to delete",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/mcp-stdio": {
"post": {
"description": "Start a stdio MCP process in the bot container and expose it as MCP HTTP endpoint.",
"tags": [
"containerd"
],
"summary": "Create MCP stdio proxy",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Stdio MCP payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/mcp-stdio/{connection_id}": {
"post": {
"description": "Proxies MCP JSON-RPC requests to a stdio MCP process in the container.",
"tags": [
"containerd"
],
"summary": "MCP stdio proxy (JSON-RPC)",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Connection ID",
"name": "connection_id",
"in": "path",
"required": true
},
{
"description": "JSON-RPC request",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/mcp/export": {
"get": {
"description": "Export all MCP connections for a bot in standard mcpServers format.",
"tags": [
"mcp"
],
"summary": "Export MCP connections",
"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"
}
}
}
}
},
"/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.",
"tags": [
"mcp"
],
"summary": "Import MCP connections",
"parameters": [
{
"description": "mcpServers dict",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}": {
"get": {
"description": "Get a MCP connection by ID",
"tags": [
"mcp"
],
"summary": "Get MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update a MCP connection by ID",
"tags": [
"mcp"
],
"summary": "Update MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "MCP payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"description": "Delete a MCP connection by ID",
"tags": [
"mcp"
],
"summary": "Delete MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/authorize": {
"post": {
"description": "Generate PKCE and return authorization URL for the user to authorize",
"tags": [
"mcp"
],
"summary": "Start OAuth authorization flow",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Optional client_id",
"name": "payload",
"in": "body",
"schema": {
"$ref": "#/definitions/handlers.oauthAuthorizeRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcp.AuthorizeResult"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/discover": {
"post": {
"description": "Probe MCP server URL for OAuth requirements and discover authorization server metadata",
"tags": [
"mcp"
],
"summary": "Discover OAuth configuration for MCP server",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Optional URL override",
"name": "payload",
"in": "body",
"schema": {
"$ref": "#/definitions/handlers.oauthDiscoverRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcp.DiscoveryResult"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/exchange": {
"post": {
"description": "Frontend callback page calls this to exchange the authorization code for access/refresh tokens",
"tags": [
"mcp"
],
"summary": "Exchange OAuth authorization code for tokens",
"parameters": [
{
"description": "Authorization code and state",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.oauthExchangeRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/status": {
"get": {
"description": "Returns the current OAuth status including whether tokens are available",
"tags": [
"mcp"
],
"summary": "Get OAuth status for MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcp.OAuthStatus"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/token": {
"delete": {
"description": "Clears stored OAuth tokens",
"tags": [
"mcp"
],
"summary": "Revoke OAuth tokens for MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/probe": {
"post": {
"description": "Probe a MCP connection to discover tools and verify connectivity",
"tags": [
"mcp"
],
"summary": "Probe MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.ProbeResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/memory": {
"get": {
"description": "List all memories in the bot-shared namespace",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Get all memories",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "Skip optional stats in memory search response",
"name": "no_stats",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.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"
}
}
}
},
"post": {
"description": "Add memory into the bot-shared namespace",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Add memory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Memory add payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.memoryAddPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.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"
}
}
}
},
"delete": {
"description": "Delete specific memories by IDs, or delete all memories if no IDs are provided",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Delete memories",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Optional: specify memory_ids to delete; if omitted, deletes all",
"name": "payload",
"in": "body",
"schema": {
"$ref": "#/definitions/handlers.memoryDeletePayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.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"
}
}
}
}
},
"/bots/{bot_id}/memory/compact": {
"post": {
"description": "Consolidate memories by merging similar/redundant entries using LLM.\n\n**ratio** (required, range (0,1]):\n- 0.8 = light compression, mostly dedup, keep ~80% of entries\n- 0.5 = moderate compression, merge similar facts, keep ~50%\n- 0.3 = aggressive compression, heavily consolidate, keep ~30%\n\n**decay_days** (optional): enable time decay — memories older than N days are treated as low priority and more likely to be merged/dropped.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Compact memories",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "ratio (0,1] required; decay_days optional",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.memoryCompactPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.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"
}
}
}
}
},
"/bots/{bot_id}/memory/rebuild": {
"post": {
"description": "Read memory files from the container filesystem (source of truth) and restore missing entries to memory storage",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Rebuild memories from filesystem",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.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"
}
}
}
}
},
"/bots/{bot_id}/memory/search": {
"post": {
"description": "Search memory in the bot-shared namespace",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Search memory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Memory search payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.memorySearchPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.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"
}
}
}
}
},
"/bots/{bot_id}/memory/usage": {
"get": {
"description": "Query the estimated storage usage of current memories",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Get memory usage",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.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"
}
}
}
}
},
"/bots/{bot_id}/memory/{id}": {
"delete": {
"description": "Delete a single memory by its ID",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Delete a single memory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Memory ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.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"
}
}
}
}
},
"/bots/{bot_id}/messages": {
"get": {
"description": "List messages for a bot history with optional pagination",
"produces": [
"application/json"
],
"tags": [
"messages"
],
"summary": "List bot history messages",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Before",
"name": "before",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/message.Message"
}
}
}
},
"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"
}
}
}
},
"delete": {
"description": "Clear all persisted bot-level history messages",
"produces": [
"application/json"
],
"tags": [
"messages"
],
"summary": "Delete all bot history messages",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{bot_id}/schedule": {
"get": {
"description": "List schedules for current user",
"tags": [
"schedule"
],
"summary": "List schedules",
"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"
}
}
}
},
"post": {
"description": "Create a schedule for current user",
"tags": [
"schedule"
],
"summary": "Create schedule",
"parameters": [
{
"description": "Schedule payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/schedule/{id}": {
"get": {
"description": "Get a schedule by ID",
"tags": [
"schedule"
],
"summary": "Get schedule",
"parameters": [
{
"type": "string",
"description": "Schedule ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update a schedule by ID",
"tags": [
"schedule"
],
"summary": "Update schedule",
"parameters": [
{
"type": "string",
"description": "Schedule ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Schedule payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"description": "Delete a schedule by ID",
"tags": [
"schedule"
],
"summary": "Delete schedule",
"parameters": [
{
"type": "string",
"description": "Schedule ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/settings": {
"get": {
"description": "Get agent settings for current user",
"tags": [
"settings"
],
"summary": "Get user settings",
"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"
}
}
}
},
"put": {
"description": "Update or create agent settings for current user",
"tags": [
"settings"
],
"summary": "Update user settings",
"parameters": [
{
"description": "Settings payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"post": {
"description": "Update or create agent settings for current user",
"tags": [
"settings"
],
"summary": "Update user settings",
"parameters": [
{
"description": "Settings payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"description": "Remove agent settings for current user",
"tags": [
"settings"
],
"summary": "Delete user settings",
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/subagents": {
"get": {
"description": "List subagents for current user",
"tags": [
"subagent"
],
"summary": "List subagents",
"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"
}
}
}
},
"post": {
"description": "Create a subagent for current user",
"tags": [
"subagent"
],
"summary": "Create subagent",
"parameters": [
{
"description": "Subagent payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/subagents/{id}": {
"get": {
"description": "Get a subagent by ID",
"tags": [
"subagent"
],
"summary": "Get subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update a subagent by ID",
"tags": [
"subagent"
],
"summary": "Update subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Subagent payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"description": "Delete a subagent by ID",
"tags": [
"subagent"
],
"summary": "Delete subagent",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{bot_id}/subagents/{id}/context": {
"get": {
"description": "Get a subagent's message context",
"tags": [
"subagent"
],
"summary": "Get subagent context",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update a subagent's message context",
"tags": [
"subagent"
],
"summary": "Update subagent context",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Context payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/subagents/{id}/skills": {
"get": {
"description": "Get a subagent's skills",
"tags": [
"subagent"
],
"summary": "Get subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Replace a subagent's skills",
"tags": [
"subagent"
],
"summary": "Update subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Skills payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"post": {
"description": "Add skills to a subagent",
"tags": [
"subagent"
],
"summary": "Add subagent skills",
"parameters": [
{
"type": "string",
"description": "Subagent ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Skills payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/token-usage": {
"get": {
"description": "Get daily aggregated token usage for a bot, split by chat and heartbeat, with optional model filter and per-model breakdown",
"tags": [
"token-usage"
],
"summary": "Get token usage statistics",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Start date (YYYY-MM-DD)",
"name": "from",
"in": "query",
"required": true
},
{
"type": "string",
"description": "End date exclusive (YYYY-MM-DD)",
"name": "to",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Optional model UUID to filter by",
"name": "model_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.TokenUsageResponse"
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/tools": {
"post": {
"description": "MCP endpoint for tool discovery and invocation.",
"tags": [
"containerd"
],
"summary": "Unified MCP tools gateway",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "JSON-RPC request",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{bot_id}/web/messages": {
"post": {
"description": "Post a user message (with optional attachments) through the local channel pipeline.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"local-channel"
],
"summary": "Send a message to a local channel",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Message payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.LocalChannelMessageRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"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"
}
}
}
}
},
"/bots/{bot_id}/web/stream": {
"get": {
"description": "Open a persistent SSE connection to receive real-time stream events for the given bot.",
"produces": [
"text/event-stream"
],
"tags": [
"local-channel"
],
"summary": "Subscribe to local channel events via SSE",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "SSE stream",
"schema": {
"type": "string"
}
},
"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"
}
}
}
}
},
"/bots/{id}": {
"get": {
"description": "Get a bot by ID (owner/admin only)",
"tags": [
"bots"
],
"summary": "Get bot details",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update bot profile (owner/admin only)",
"tags": [
"bots"
],
"summary": "Update bot details",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Bot update payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"description": "Delete a bot user (owner/admin only)",
"tags": [
"bots"
],
"summary": "Delete bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Accepted",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"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"
}
}
}
}
},
"/bots/{id}/channel/{platform}": {
"get": {
"description": "Get bot channel configuration",
"tags": [
"bots"
],
"summary": "Get bot channel config",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update bot channel configuration",
"tags": [
"bots"
],
"summary": "Update bot channel config",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
},
{
"description": "Channel config payload",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"description": "Remove bot channel configuration",
"tags": [
"bots"
],
"summary": "Delete bot channel config",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{id}/channel/{platform}/send": {
"post": {
"description": "Send a message using bot channel configuration",
"tags": [
"bots"
],
"summary": "Send message via bot channel",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
},
{
"description": "Send payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/channel.SendRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"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"
}
}
}
}
},
"/bots/{id}/channel/{platform}/send_chat": {
"post": {
"description": "Send a message using a session-scoped token (reply only)",
"tags": [
"bots"
],
"summary": "Send message via bot channel session token",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
},
{
"description": "Send payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/channel.SendRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"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"
}
}
}
}
},
"/bots/{id}/channel/{platform}/status": {
"patch": {
"description": "Update bot channel enabled/disabled status",
"tags": [
"bots"
],
"summary": "Update bot channel status",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
},
{
"description": "Channel status payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/channel.UpdateChannelStatusRequest"
}
}
],
"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"
}
}
}
}
},
"/bots/{id}/checks": {
"get": {
"description": "Evaluate bot attached resource checks in runtime",
"tags": [
"bots"
],
"summary": "List bot runtime checks",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{id}/members": {
"get": {
"description": "List members for a bot",
"tags": [
"bots"
],
"summary": "List bot members",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Add or update bot member role",
"tags": [
"bots"
],
"summary": "Upsert bot member",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Member payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/bots/{id}/members/{user_id}": {
"delete": {
"description": "Remove a member from a bot",
"tags": [
"bots"
],
"summary": "Delete bot member",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "User ID",
"name": "user_id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{id}/owner": {
"put": {
"description": "Transfer bot ownership to another human user",
"tags": [
"bots"
],
"summary": "Transfer bot owner (admin only)",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Transfer payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/browser-contexts": {
"get": {
"description": "List all browser context configurations",
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "List browser contexts",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/browsercontexts.BrowserContext"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a browser context configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "Create a browser context",
"parameters": [
{
"description": "Browser context configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/browsercontexts.CreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/browsercontexts.BrowserContext"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/browser-contexts/{id}": {
"get": {
"description": "Get browser context by ID",
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "Get a browser context",
"parameters": [
{
"type": "string",
"description": "Browser Context ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/browsercontexts.BrowserContext"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update browser context by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "Update a browser context",
"parameters": [
{
"type": "string",
"description": "Browser Context ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/browsercontexts.UpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/browsercontexts.BrowserContext"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete browser context by ID",
"tags": [
"browser-contexts"
],
"summary": "Delete a browser context",
"parameters": [
{
"type": "string",
"description": "Browser Context ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/channels": {
"get": {
"description": "List channel meta information including capabilities and schemas",
"tags": [
"channel"
],
"summary": "List channel capabilities and schemas",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.ChannelMeta"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/channels/{platform}": {
"get": {
"description": "Get channel meta information including capabilities and schemas",
"tags": [
"channel"
],
"summary": "Get channel capabilities and schemas",
"parameters": [
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/email-providers": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-providers"
],
"summary": "List email providers",
"parameters": [
{
"type": "string",
"description": "Provider type filter",
"name": "provider",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/email.ProviderResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"email-providers"
],
"summary": "Create an email provider",
"parameters": [
{
"description": "Email provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/email.CreateProviderRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/email.ProviderResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/email-providers/meta": {
"get": {
"description": "List available email provider types and config schemas",
"tags": [
"email-providers"
],
"summary": "List email provider metadata",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/email.ProviderMeta"
}
}
}
}
}
},
"/email-providers/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-providers"
],
"summary": "Get an email provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/email.ProviderResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"email-providers"
],
"summary": "Update an email provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/email.UpdateProviderRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/email.ProviderResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"email-providers"
],
"summary": "Delete an email provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/email/mailgun/webhook/{config_id}": {
"post": {
"description": "Receives inbound emails from Mailgun",
"tags": [
"email-webhook"
],
"summary": "Mailgun inbound email webhook",
"parameters": [
{
"type": "string",
"description": "Email provider config ID",
"name": "config_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"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"
}
}
}
}
},
"/memory-providers": {
"get": {
"description": "List configured memory providers",
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "List memory providers",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/provider.ProviderGetResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a memory provider configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "Create a memory provider",
"parameters": [
{
"description": "Memory provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/provider.ProviderCreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/provider.ProviderGetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/memory-providers/meta": {
"get": {
"description": "List available memory provider types and config schemas",
"tags": [
"memory-providers"
],
"summary": "List memory provider metadata",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/provider.ProviderMeta"
}
}
}
}
}
},
"/memory-providers/{id}": {
"get": {
"description": "Get memory provider by ID",
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "Get a memory provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.ProviderGetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update memory provider by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "Update a memory provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/provider.ProviderUpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/provider.ProviderGetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete memory provider by ID",
"tags": [
"memory-providers"
],
"summary": "Delete a memory provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/models": {
"get": {
"description": "Get a list of all configured models, optionally filtered by type or client type",
"tags": [
"models"
],
"summary": "List all models",
"parameters": [
{
"type": "string",
"description": "Model type (chat, embedding)",
"name": "type",
"in": "query"
},
{
"type": "string",
"description": "Client type (openai-responses, openai-completions, anthropic-messages, google-generative-ai)",
"name": "client_type",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.GetResponse"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a new model configuration",
"tags": [
"models"
],
"summary": "Create a new model",
"parameters": [
{
"description": "Model configuration",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/models/count": {
"get": {
"description": "Get the total count of models, optionally filtered by type",
"tags": [
"models"
],
"summary": "Get model count",
"parameters": [
{
"type": "string",
"description": "Model type (chat, embedding)",
"name": "type",
"in": "query"
}
],
"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"
}
}
}
}
},
"/models/model/{modelId}": {
"get": {
"description": "Get a model configuration by its model_id field (e.g., gpt-4)",
"tags": [
"models"
],
"summary": "Get model by model ID",
"parameters": [
{
"type": "string",
"description": "Model ID (e.g., gpt-4)",
"name": "modelId",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update a model configuration by its model_id field (e.g., gpt-4)",
"tags": [
"models"
],
"summary": "Update model by model ID",
"parameters": [
{
"type": "string",
"description": "Model ID (e.g., gpt-4)",
"name": "modelId",
"in": "path",
"required": true
},
{
"description": "Updated model configuration",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"description": "Delete a model configuration by its model_id field (e.g., gpt-4)",
"tags": [
"models"
],
"summary": "Delete model by model ID",
"parameters": [
{
"type": "string",
"description": "Model ID (e.g., gpt-4)",
"name": "modelId",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/models/{id}": {
"get": {
"description": "Get a model configuration by its internal UUID",
"tags": [
"models"
],
"summary": "Get model by internal ID",
"parameters": [
{
"type": "string",
"description": "Model internal ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update a model configuration by its internal UUID",
"tags": [
"models"
],
"summary": "Update model by internal ID",
"parameters": [
{
"type": "string",
"description": "Model internal ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated model configuration",
"name": "payload",
"in": "body",
"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"
}
}
}
},
"delete": {
"description": "Delete a model configuration by its internal UUID",
"tags": [
"models"
],
"summary": "Delete model by internal ID",
"parameters": [
{
"type": "string",
"description": "Model internal ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/models/{id}/test": {
"post": {
"description": "Probe a model's provider endpoint using the model's real model_id and client_type to verify configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"models"
],
"summary": "Test model connectivity",
"parameters": [
{
"type": "string",
"description": "Model internal ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.TestResponse"
}
},
"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"
}
}
}
}
},
"/ping": {
"get": {
"tags": [
"system"
],
"summary": "Health check with server capabilities",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.PingResponse"
}
}
}
}
},
"/providers": {
"get": {
"description": "Get a list of all configured LLM providers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "List all LLM providers",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/providers.GetResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a new LLM provider configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Create a new LLM provider",
"parameters": [
{
"description": "Provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/providers.CreateRequest"
}
}
],
"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"
}
}
}
}
},
"/providers/count": {
"get": {
"description": "Get the total count of providers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Count providers",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/providers.CountResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/providers/name/{name}": {
"get": {
"description": "Get a provider configuration by its name",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Get provider by name",
"parameters": [
{
"type": "string",
"description": "Provider name",
"name": "name",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/providers/{id}": {
"get": {
"description": "Get a provider configuration by its ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Get provider by ID",
"parameters": [
{
"type": "string",
"description": "Provider ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update an existing provider configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Update provider",
"parameters": [
{
"type": "string",
"description": "Provider ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/providers.UpdateRequest"
}
}
],
"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"
}
}
}
},
"delete": {
"description": "Delete a provider configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Delete provider",
"parameters": [
{
"type": "string",
"description": "Provider ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
}
},
"/providers/{id}/import-models": {
"post": {
"description": "Fetch models from provider's /v1/models endpoint and import them",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Import models from provider",
"parameters": [
{
"type": "string",
"description": "Provider ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Import configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/providers.ImportModelsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/providers.ImportModelsResponse"
}
},
"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"
}
}
}
}
},
"/providers/{id}/models": {
"get": {
"description": "Get models for a provider by id, optionally filtered by type",
"tags": [
"providers"
],
"summary": "List provider models",
"parameters": [
{
"type": "string",
"description": "Provider ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Model type (chat, embedding)",
"name": "type",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$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"
}
}
}
}
},
"/providers/{id}/test": {
"post": {
"description": "Probe a provider's base URL to check reachability, supported client types, and embedding support",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Test provider connectivity",
"parameters": [
{
"type": "string",
"description": "Provider ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/providers.TestResponse"
}
},
"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"
}
}
}
}
},
"/search-providers": {
"get": {
"description": "List configured search providers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "List search providers",
"parameters": [
{
"type": "string",
"description": "Provider filter (brave)",
"name": "provider",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/searchproviders.GetResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a search provider configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "Create a search provider",
"parameters": [
{
"description": "Search provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/searchproviders.CreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/searchproviders.GetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/search-providers/meta": {
"get": {
"description": "List available search provider types and config schemas",
"tags": [
"search-providers"
],
"summary": "List search provider metadata",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/searchproviders.ProviderMeta"
}
}
}
}
}
},
"/search-providers/{id}": {
"get": {
"description": "Get search provider by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "Get a search provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/searchproviders.GetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update search provider by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "Update a search provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/searchproviders.UpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/searchproviders.GetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete search provider by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "Delete a search provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/users": {
"get": {
"description": "List users",
"tags": [
"users"
],
"summary": "List users (admin only)",
"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"
}
}
}
},
"post": {
"description": "Create a new human user account",
"tags": [
"users"
],
"summary": "Create human user (admin only)",
"parameters": [
{
"description": "User payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/users/me": {
"get": {
"description": "Get current user profile",
"tags": [
"users"
],
"summary": "Get current user",
"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"
}
}
}
},
"put": {
"description": "Update current user display name or avatar",
"tags": [
"users"
],
"summary": "Update current user profile",
"parameters": [
{
"description": "Profile payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/users/me/channels/{platform}": {
"get": {
"description": "Get channel binding configuration for current user",
"tags": [
"channel"
],
"summary": "Get channel user config",
"parameters": [
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update channel binding configuration for current user",
"tags": [
"channel"
],
"summary": "Update channel user config",
"parameters": [
{
"type": "string",
"description": "Channel platform",
"name": "platform",
"in": "path",
"required": true
},
{
"description": "Channel user config payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/users/me/identities": {
"get": {
"description": "List all channel identities linked to current user",
"tags": [
"users"
],
"summary": "List current user's channel identities",
"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"
}
}
}
}
},
"/users/me/password": {
"put": {
"description": "Update current user password with current password check",
"tags": [
"users"
],
"summary": "Update current user password",
"parameters": [
{
"description": "Password payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/users/{id}": {
"get": {
"description": "Get user details (self or admin only)",
"tags": [
"users"
],
"summary": "Get user by ID",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"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"
}
}
}
},
"put": {
"description": "Update user profile and status",
"tags": [
"users"
],
"summary": "Update user (admin only)",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "User update payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
},
"/users/{id}/password": {
"put": {
"description": "Reset a user password",
"tags": [
"users"
],
"summary": "Reset user password (admin only)",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Password payload",
"name": "payload",
"in": "body",
"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"
}
}
}
}
}
},
"definitions": {
"accounts.Account": {
"type": "object",
"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"
}
}
},
"accounts.CreateAccountRequest": {
"type": "object",
"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"
}
}
},
"accounts.ListAccountsResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/accounts.Account"
}
}
}
},
"accounts.ResetPasswordRequest": {
"type": "object",
"properties": {
"new_password": {
"type": "string"
}
}
},
"accounts.UpdateAccountRequest": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"display_name": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"role": {
"type": "string"
}
}
},
"accounts.UpdatePasswordRequest": {
"type": "object",
"properties": {
"current_password": {
"type": "string"
},
"new_password": {
"type": "string"
}
}
},
"accounts.UpdateProfileRequest": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"display_name": {
"type": "string"
}
}
},
"bots.Bot": {
"type": "object",
"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": {
"type": "object",
"additionalProperties": {}
},
"owner_user_id": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"bots.BotCheck": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"status": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"summary": {
"type": "string"
},
"title_key": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"bots.BotMember": {
"type": "object",
"properties": {
"bot_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"role": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"bots.CreateBotRequest": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"display_name": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"type": {
"type": "string"
}
}
},
"bots.ListBotsResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/bots.Bot"
}
}
}
},
"bots.ListChecksResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/bots.BotCheck"
}
}
}
},
"bots.ListMembersResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/bots.BotMember"
}
}
}
},
"bots.TransferBotRequest": {
"type": "object",
"properties": {
"owner_user_id": {
"type": "string"
}
}
},
"bots.UpdateBotRequest": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"display_name": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"metadata": {
"type": "object",
"additionalProperties": {}
}
}
},
"bots.UpsertMemberRequest": {
"type": "object",
"properties": {
"role": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"browsercontexts.BrowserContext": {
"type": "object",
"properties": {
"config": {
"type": "array",
"items": {
"type": "integer"
}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"browsercontexts.CreateRequest": {
"type": "object",
"properties": {
"config": {
"type": "array",
"items": {
"type": "integer"
}
},
"name": {
"type": "string"
}
}
},
"browsercontexts.UpdateRequest": {
"type": "object",
"properties": {
"config": {
"type": "array",
"items": {
"type": "integer"
}
},
"name": {
"type": "string"
}
}
},
"channel.Action": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"channel.Attachment": {
"type": "object",
"properties": {
"base64": {
"description": "data URL for agent delivery",
"type": "string"
},
"caption": {
"type": "string"
},
"content_hash": {
"type": "string"
},
"duration_ms": {
"type": "integer"
},
"height": {
"type": "integer"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"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"
}
}
},
"channel.AttachmentType": {
"type": "string",
"enum": [
"image",
"audio",
"video",
"voice",
"file",
"gif"
],
"x-enum-varnames": [
"AttachmentImage",
"AttachmentAudio",
"AttachmentVideo",
"AttachmentVoice",
"AttachmentFile",
"AttachmentGIF"
]
},
"channel.ChannelCapabilities": {
"type": "object",
"properties": {
"attachments": {
"type": "boolean"
},
"block_streaming": {
"type": "boolean"
},
"buttons": {
"type": "boolean"
},
"chat_types": {
"type": "array",
"items": {
"type": "string"
}
},
"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"
}
}
},
"channel.ChannelConfig": {
"type": "object",
"properties": {
"bot_id": {
"type": "string"
},
"channel_type": {
"type": "string"
},
"created_at": {
"type": "string"
},
"credentials": {
"type": "object",
"additionalProperties": {}
},
"disabled": {
"type": "boolean"
},
"external_identity": {
"type": "string"
},
"id": {
"type": "string"
},
"routing": {
"type": "object",
"additionalProperties": {}
},
"self_identity": {
"type": "object",
"additionalProperties": {}
},
"updated_at": {
"type": "string"
},
"verified_at": {
"type": "string"
}
}
},
"channel.ChannelIdentityBinding": {
"type": "object",
"properties": {
"channel_identity_id": {
"type": "string"
},
"channel_type": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"channel.ConfigSchema": {
"type": "object",
"properties": {
"fields": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/channel.FieldSchema"
}
},
"version": {
"type": "integer"
}
}
},
"channel.FieldSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"example": {},
"required": {
"type": "boolean"
},
"title": {
"type": "string"
},
"type": {
"$ref": "#/definitions/channel.FieldType"
}
}
},
"channel.FieldType": {
"type": "string",
"enum": [
"string",
"secret",
"bool",
"number",
"enum"
],
"x-enum-varnames": [
"FieldString",
"FieldSecret",
"FieldBool",
"FieldNumber",
"FieldEnum"
]
},
"channel.Message": {
"type": "object",
"properties": {
"actions": {
"type": "array",
"items": {
"$ref": "#/definitions/channel.Action"
}
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/definitions/channel.Attachment"
}
},
"format": {
"$ref": "#/definitions/channel.MessageFormat"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"parts": {
"type": "array",
"items": {
"$ref": "#/definitions/channel.MessagePart"
}
},
"reply": {
"$ref": "#/definitions/channel.ReplyRef"
},
"text": {
"type": "string"
},
"thread": {
"$ref": "#/definitions/channel.ThreadRef"
}
}
},
"channel.MessageFormat": {
"type": "string",
"enum": [
"plain",
"markdown",
"rich"
],
"x-enum-varnames": [
"MessageFormatPlain",
"MessageFormatMarkdown",
"MessageFormatRich"
]
},
"channel.MessagePart": {
"type": "object",
"properties": {
"channel_identity_id": {
"type": "string"
},
"emoji": {
"type": "string"
},
"language": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"styles": {
"type": "array",
"items": {
"$ref": "#/definitions/channel.MessageTextStyle"
}
},
"text": {
"type": "string"
},
"type": {
"$ref": "#/definitions/channel.MessagePartType"
},
"url": {
"type": "string"
}
}
},
"channel.MessagePartType": {
"type": "string",
"enum": [
"text",
"link",
"code_block",
"mention",
"emoji"
],
"x-enum-varnames": [
"MessagePartText",
"MessagePartLink",
"MessagePartCodeBlock",
"MessagePartMention",
"MessagePartEmoji"
]
},
"channel.MessageTextStyle": {
"type": "string",
"enum": [
"bold",
"italic",
"strikethrough",
"code"
],
"x-enum-varnames": [
"MessageStyleBold",
"MessageStyleItalic",
"MessageStyleStrikethrough",
"MessageStyleCode"
]
},
"channel.ReplyRef": {
"type": "object",
"properties": {
"message_id": {
"type": "string"
},
"target": {
"type": "string"
}
}
},
"channel.SendRequest": {
"type": "object",
"properties": {
"channel_identity_id": {
"type": "string"
},
"message": {
"$ref": "#/definitions/channel.Message"
},
"target": {
"type": "string"
}
}
},
"channel.TargetHint": {
"type": "object",
"properties": {
"example": {
"type": "string"
},
"label": {
"type": "string"
}
}
},
"channel.TargetSpec": {
"type": "object",
"properties": {
"format": {
"type": "string"
},
"hints": {
"type": "array",
"items": {
"$ref": "#/definitions/channel.TargetHint"
}
}
}
},
"channel.ThreadRef": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
"channel.UpdateChannelStatusRequest": {
"type": "object",
"properties": {
"disabled": {
"type": "boolean"
}
}
},
"channel.UpsertChannelIdentityConfigRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
}
}
},
"channel.UpsertConfigRequest": {
"type": "object",
"properties": {
"credentials": {
"type": "object",
"additionalProperties": {}
},
"disabled": {
"type": "boolean"
},
"external_identity": {
"type": "string"
},
"routing": {
"type": "object",
"additionalProperties": {}
},
"self_identity": {
"type": "object",
"additionalProperties": {}
},
"verified_at": {
"type": "string"
}
}
},
"email.BindingResponse": {
"type": "object",
"properties": {
"bot_id": {
"type": "string"
},
"can_delete": {
"type": "boolean"
},
"can_read": {
"type": "boolean"
},
"can_write": {
"type": "boolean"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"email_address": {
"type": "string"
},
"email_provider_id": {
"type": "string"
},
"id": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"email.ConfigSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/email.FieldSchema"
}
}
}
},
"email.CreateBindingRequest": {
"type": "object",
"properties": {
"can_delete": {
"type": "boolean"
},
"can_read": {
"type": "boolean"
},
"can_write": {
"type": "boolean"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"email_address": {
"type": "string"
},
"email_provider_id": {
"type": "string"
}
}
},
"email.CreateProviderRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"email.FieldSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"example": {},
"key": {
"type": "string"
},
"order": {
"type": "integer"
},
"required": {
"type": "boolean"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"email.OutboxItemResponse": {
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {}
},
"body_html": {
"type": "string"
},
"body_text": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"error": {
"type": "string"
},
"from": {
"type": "string"
},
"id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"provider_id": {
"type": "string"
},
"sent_at": {
"type": "string"
},
"status": {
"type": "string"
},
"subject": {
"type": "string"
},
"to": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"email.ProviderMeta": {
"type": "object",
"properties": {
"config_schema": {
"$ref": "#/definitions/email.ConfigSchema"
},
"display_name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"email.ProviderResponse": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"email.UpdateBindingRequest": {
"type": "object",
"properties": {
"can_delete": {
"type": "boolean"
},
"can_read": {
"type": "boolean"
},
"can_write": {
"type": "boolean"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"email_address": {
"type": "string"
}
}
},
"email.UpdateProviderRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"github_com_memohai_memoh_internal_mcp.Connection": {
"type": "object",
"properties": {
"auth_type": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"last_probed_at": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"status_message": {
"type": "string"
},
"tools_cache": {
"type": "array",
"items": {
"$ref": "#/definitions/mcp.ToolDescriptor"
}
},
"type": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"handlers.BatchDeleteRequest": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.ChannelMeta": {
"type": "object",
"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"
}
}
},
"handlers.CreateContainerRequest": {
"type": "object",
"properties": {
"restore_data": {
"type": "boolean"
},
"snapshotter": {
"type": "string"
}
}
},
"handlers.CreateContainerResponse": {
"type": "object",
"properties": {
"container_id": {
"type": "string"
},
"data_restored": {
"type": "boolean"
},
"has_preserved_data": {
"type": "boolean"
},
"image": {
"type": "string"
},
"snapshotter": {
"type": "string"
},
"started": {
"type": "boolean"
}
}
},
"handlers.CreateSnapshotRequest": {
"type": "object",
"properties": {
"snapshot_name": {
"type": "string"
}
}
},
"handlers.CreateSnapshotResponse": {
"type": "object",
"properties": {
"container_id": {
"type": "string"
},
"display_name": {
"type": "string"
},
"runtime_snapshot_name": {
"type": "string"
},
"snapshot_name": {
"type": "string"
},
"snapshotter": {
"type": "string"
},
"source": {
"type": "string"
},
"version": {
"type": "integer"
}
}
},
"handlers.DailyTokenUsage": {
"type": "object",
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"day": {
"type": "string"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
}
}
},
"handlers.ErrorResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"handlers.FSDeleteRequest": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"recursive": {
"type": "boolean"
}
}
},
"handlers.FSFileInfo": {
"type": "object",
"properties": {
"isDir": {
"type": "boolean"
},
"modTime": {
"type": "string"
},
"mode": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"handlers.FSListResponse": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.FSFileInfo"
}
},
"path": {
"type": "string"
}
}
},
"handlers.FSMkdirRequest": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
}
},
"handlers.FSReadResponse": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"path": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"handlers.FSRenameRequest": {
"type": "object",
"properties": {
"newPath": {
"type": "string"
},
"oldPath": {
"type": "string"
}
}
},
"handlers.FSUploadResponse": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"handlers.FSWriteRequest": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"handlers.GetContainerResponse": {
"type": "object",
"properties": {
"container_id": {
"type": "string"
},
"container_path": {
"type": "string"
},
"created_at": {
"type": "string"
},
"has_preserved_data": {
"type": "boolean"
},
"image": {
"type": "string"
},
"namespace": {
"type": "string"
},
"status": {
"type": "string"
},
"task_running": {
"type": "boolean"
},
"updated_at": {
"type": "string"
}
}
},
"handlers.ListSnapshotsResponse": {
"type": "object",
"properties": {
"snapshots": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.SnapshotInfo"
}
},
"snapshotter": {
"type": "string"
}
}
},
"handlers.LocalChannelMessageRequest": {
"type": "object",
"properties": {
"message": {
"$ref": "#/definitions/channel.Message"
}
}
},
"handlers.LoginRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"handlers.LoginResponse": {
"type": "object",
"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"
}
}
},
"handlers.MCPStdioRequest": {
"type": "object",
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"name": {
"type": "string"
}
}
},
"handlers.MCPStdioResponse": {
"type": "object",
"properties": {
"connection_id": {
"type": "string"
},
"tools": {
"type": "array",
"items": {
"type": "string"
}
},
"url": {
"type": "string"
}
}
},
"handlers.ModelTokenUsage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer"
},
"model_id": {
"type": "string"
},
"model_name": {
"type": "string"
},
"model_slug": {
"type": "string"
},
"output_tokens": {
"type": "integer"
},
"provider_name": {
"type": "string"
}
}
},
"handlers.PingResponse": {
"type": "object",
"properties": {
"container_backend": {
"type": "string"
},
"snapshot_supported": {
"type": "boolean"
},
"status": {
"type": "string"
}
}
},
"handlers.ProbeResponse": {
"type": "object",
"properties": {
"auth_required": {
"type": "boolean"
},
"error": {
"type": "string"
},
"status": {
"type": "string"
},
"tools": {
"type": "array",
"items": {
"$ref": "#/definitions/mcp.ToolDescriptor"
}
}
}
},
"handlers.RefreshResponse": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"expires_at": {
"type": "string"
},
"token_type": {
"type": "string"
}
}
},
"handlers.RollbackRequest": {
"type": "object",
"properties": {
"version": {
"type": "integer"
}
}
},
"handlers.SkillItem": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"raw": {
"type": "string"
}
}
},
"handlers.SkillsDeleteRequest": {
"type": "object",
"properties": {
"names": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.SkillsResponse": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.SkillItem"
}
}
}
},
"handlers.SkillsUpsertRequest": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.SnapshotInfo": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"display_name": {
"type": "string"
},
"kind": {
"type": "string"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"managed": {
"type": "boolean"
},
"name": {
"type": "string"
},
"parent": {
"type": "string"
},
"runtime_snapshot_name": {
"type": "string"
},
"snapshotter": {
"type": "string"
},
"source": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"version": {
"type": "integer"
}
}
},
"handlers.TokenUsageResponse": {
"type": "object",
"properties": {
"by_model": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.ModelTokenUsage"
}
},
"chat": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.DailyTokenUsage"
}
},
"heartbeat": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.DailyTokenUsage"
}
}
}
},
"handlers.fsOpResponse": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
}
},
"handlers.listMyIdentitiesResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/identities.ChannelIdentity"
}
},
"user_id": {
"type": "string"
}
}
},
"handlers.markReadRequest": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.memoryAddPayload": {
"type": "object",
"properties": {
"embedding_enabled": {
"type": "boolean"
},
"filters": {
"type": "object",
"additionalProperties": {}
},
"infer": {
"type": "boolean"
},
"message": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/definitions/provider.Message"
}
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"namespace": {
"type": "string"
},
"run_id": {
"type": "string"
}
}
},
"handlers.memoryCompactPayload": {
"type": "object",
"properties": {
"decay_days": {
"type": "integer"
},
"ratio": {
"type": "number"
}
}
},
"handlers.memoryDeletePayload": {
"type": "object",
"properties": {
"memory_ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.memorySearchPayload": {
"type": "object",
"properties": {
"embedding_enabled": {
"type": "boolean"
},
"filters": {
"type": "object",
"additionalProperties": {}
},
"limit": {
"type": "integer"
},
"no_stats": {
"type": "boolean"
},
"query": {
"type": "string"
},
"run_id": {
"type": "string"
},
"sources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.oauthAuthorizeRequest": {
"type": "object",
"properties": {
"callback_url": {
"type": "string"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
}
}
},
"handlers.oauthDiscoverRequest": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
}
},
"handlers.oauthExchangeRequest": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"handlers.skillsOpResponse": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
}
},
"heartbeat.ListLogsResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/heartbeat.Log"
}
}
}
},
"heartbeat.Log": {
"type": "object",
"properties": {
"bot_id": {
"type": "string"
},
"completed_at": {
"type": "string"
},
"error_message": {
"type": "string"
},
"id": {
"type": "string"
},
"result_text": {
"type": "string"
},
"started_at": {
"type": "string"
},
"status": {
"type": "string"
},
"usage": {}
}
},
"identities.ChannelIdentity": {
"type": "object",
"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": {
"type": "object",
"additionalProperties": {}
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"inbox.CountResult": {
"type": "object",
"properties": {
"total": {
"type": "integer"
},
"unread": {
"type": "integer"
}
}
},
"inbox.CreateRequest": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"content": {
"type": "string"
},
"header": {
"type": "object",
"additionalProperties": {}
},
"source": {
"type": "string"
}
}
},
"inbox.Item": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"header": {
"type": "object",
"additionalProperties": {}
},
"id": {
"type": "string"
},
"is_read": {
"type": "boolean"
},
"read_at": {
"type": "string"
},
"source": {
"type": "string"
}
}
},
"mcp.AuthorizeResult": {
"type": "object",
"properties": {
"authorization_url": {
"type": "string"
}
}
},
"mcp.DiscoveryResult": {
"type": "object",
"properties": {
"authorization_endpoint": {
"type": "string"
},
"authorization_server_url": {
"type": "string"
},
"registration_endpoint": {
"type": "string"
},
"resource_metadata_url": {
"type": "string"
},
"resource_uri": {
"type": "string"
},
"scopes_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"token_endpoint": {
"type": "string"
}
}
},
"mcp.ExportResponse": {
"type": "object",
"properties": {
"mcpServers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/mcp.MCPServerEntry"
}
}
}
},
"mcp.ImportRequest": {
"type": "object",
"properties": {
"mcpServers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/mcp.MCPServerEntry"
}
}
}
},
"mcp.ListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_memohai_memoh_internal_mcp.Connection"
}
}
}
},
"mcp.MCPServerEntry": {
"type": "object",
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"transport": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"mcp.OAuthStatus": {
"type": "object",
"properties": {
"auth_server": {
"type": "string"
},
"callback_url": {
"type": "string"
},
"configured": {
"type": "boolean"
},
"expired": {
"type": "boolean"
},
"expires_at": {
"type": "string"
},
"has_token": {
"type": "boolean"
},
"scopes": {
"type": "string"
}
}
},
"mcp.ToolDescriptor": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"inputSchema": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"mcp.UpsertRequest": {
"type": "object",
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"auth_type": {
"type": "string"
},
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"is_active": {
"type": "boolean"
},
"name": {
"type": "string"
},
"transport": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"message.Message": {
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"$ref": "#/definitions/message.MessageAsset"
}
},
"bot_id": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"type": "integer"
}
},
"created_at": {
"type": "string"
},
"external_message_id": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"platform": {
"type": "string"
},
"role": {
"type": "string"
},
"route_id": {
"type": "string"
},
"sender_avatar_url": {
"type": "string"
},
"sender_channel_identity_id": {
"type": "string"
},
"sender_display_name": {
"type": "string"
},
"sender_user_id": {
"type": "string"
},
"source_reply_to_message_id": {
"type": "string"
},
"usage": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"message.MessageAsset": {
"type": "object",
"properties": {
"content_hash": {
"type": "string"
},
"mime": {
"type": "string"
},
"ordinal": {
"type": "integer"
},
"role": {
"type": "string"
},
"size_bytes": {
"type": "integer"
},
"storage_key": {
"type": "string"
}
}
},
"models.AddRequest": {
"type": "object",
"properties": {
"client_type": {
"$ref": "#/definitions/models.ClientType"
},
"dimensions": {
"type": "integer"
},
"input_modalities": {
"type": "array",
"items": {
"type": "string"
}
},
"llm_provider_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"name": {
"type": "string"
},
"supports_reasoning": {
"type": "boolean"
},
"type": {
"$ref": "#/definitions/models.ModelType"
}
}
},
"models.AddResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"model_id": {
"type": "string"
}
}
},
"models.ClientType": {
"type": "string",
"enum": [
"openai-responses",
"openai-completions",
"anthropic-messages",
"google-generative-ai"
],
"x-enum-varnames": [
"ClientTypeOpenAIResponses",
"ClientTypeOpenAICompletions",
"ClientTypeAnthropicMessages",
"ClientTypeGoogleGenerativeAI"
]
},
"models.CountResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer"
}
}
},
"models.GetResponse": {
"type": "object",
"properties": {
"client_type": {
"$ref": "#/definitions/models.ClientType"
},
"dimensions": {
"type": "integer"
},
"id": {
"type": "string"
},
"input_modalities": {
"type": "array",
"items": {
"type": "string"
}
},
"llm_provider_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"name": {
"type": "string"
},
"supports_reasoning": {
"type": "boolean"
},
"type": {
"$ref": "#/definitions/models.ModelType"
}
}
},
"models.ModelType": {
"type": "string",
"enum": [
"chat",
"embedding"
],
"x-enum-varnames": [
"ModelTypeChat",
"ModelTypeEmbedding"
]
},
"models.TestResponse": {
"type": "object",
"properties": {
"latency_ms": {
"type": "integer"
},
"message": {
"type": "string"
},
"reachable": {
"type": "boolean"
},
"status": {
"$ref": "#/definitions/models.TestStatus"
}
}
},
"models.TestStatus": {
"type": "string",
"enum": [
"ok",
"auth_error",
"error"
],
"x-enum-varnames": [
"TestStatusOK",
"TestStatusAuthError",
"TestStatusError"
]
},
"models.UpdateRequest": {
"type": "object",
"properties": {
"client_type": {
"$ref": "#/definitions/models.ClientType"
},
"dimensions": {
"type": "integer"
},
"input_modalities": {
"type": "array",
"items": {
"type": "string"
}
},
"llm_provider_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"name": {
"type": "string"
},
"supports_reasoning": {
"type": "boolean"
},
"type": {
"$ref": "#/definitions/models.ModelType"
}
}
},
"provider.CDFPoint": {
"type": "object",
"properties": {
"cumulative": {
"description": "cumulative weight fraction [0.0, 1.0]",
"type": "number"
},
"k": {
"description": "rank position (1-based, sorted by value desc)",
"type": "integer"
}
}
},
"provider.CompactResult": {
"type": "object",
"properties": {
"after_count": {
"type": "integer"
},
"before_count": {
"type": "integer"
},
"ratio": {
"type": "number"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/provider.MemoryItem"
}
}
}
},
"provider.DeleteResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"provider.MemoryItem": {
"type": "object",
"properties": {
"agent_id": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"cdf_curve": {
"type": "array",
"items": {
"$ref": "#/definitions/provider.CDFPoint"
}
},
"created_at": {
"type": "string"
},
"hash": {
"type": "string"
},
"id": {
"type": "string"
},
"memory": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"run_id": {
"type": "string"
},
"score": {
"type": "number"
},
"top_k_buckets": {
"type": "array",
"items": {
"$ref": "#/definitions/provider.TopKBucket"
}
},
"updated_at": {
"type": "string"
}
}
},
"provider.Message": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"role": {
"type": "string"
}
}
},
"provider.ProviderConfigSchema": {
"type": "object",
"properties": {
"fields": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/provider.ProviderFieldSchema"
}
}
}
},
"provider.ProviderCreateRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/provider.ProviderType"
}
}
},
"provider.ProviderFieldSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"example": {},
"required": {
"type": "boolean"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"provider.ProviderGetResponse": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"is_default": {
"type": "boolean"
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"provider.ProviderMeta": {
"type": "object",
"properties": {
"config_schema": {
"$ref": "#/definitions/provider.ProviderConfigSchema"
},
"display_name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"provider.ProviderType": {
"type": "string",
"enum": [
"builtin"
],
"x-enum-varnames": [
"ProviderBuiltin"
]
},
"provider.ProviderUpdateRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"provider.RebuildResult": {
"type": "object",
"properties": {
"fs_count": {
"type": "integer"
},
"missing_count": {
"type": "integer"
},
"qdrant_count": {
"type": "integer"
},
"restored_count": {
"type": "integer"
}
}
},
"provider.SearchResponse": {
"type": "object",
"properties": {
"relations": {
"type": "array",
"items": {}
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/provider.MemoryItem"
}
}
}
},
"provider.TopKBucket": {
"type": "object",
"properties": {
"index": {
"description": "sparse dimension index (term hash)",
"type": "integer"
},
"value": {
"description": "weight (term frequency)",
"type": "number"
}
}
},
"provider.UsageResponse": {
"type": "object",
"properties": {
"avg_text_bytes": {
"type": "integer"
},
"count": {
"type": "integer"
},
"estimated_storage_bytes": {
"type": "integer"
},
"total_text_bytes": {
"type": "integer"
}
}
},
"providers.CountResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer"
}
}
},
"providers.CreateRequest": {
"type": "object",
"required": [
"base_url",
"name"
],
"properties": {
"api_key": {
"type": "string"
},
"base_url": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"providers.GetResponse": {
"type": "object",
"properties": {
"api_key": {
"type": "string"
},
"base_url": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"providers.ImportModelsRequest": {
"type": "object",
"properties": {
"client_type": {
"type": "string"
}
}
},
"providers.ImportModelsResponse": {
"type": "object",
"properties": {
"created": {
"type": "integer"
},
"models": {
"type": "array",
"items": {
"type": "string"
}
},
"skipped": {
"type": "integer"
}
}
},
"providers.TestResponse": {
"type": "object",
"properties": {
"latency_ms": {
"type": "integer"
},
"message": {
"type": "string"
},
"reachable": {
"type": "boolean"
}
}
},
"providers.UpdateRequest": {
"type": "object",
"properties": {
"api_key": {
"type": "string"
},
"base_url": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"schedule.CreateRequest": {
"type": "object",
"properties": {
"command": {
"type": "string"
},
"description": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"max_calls": {
"$ref": "#/definitions/schedule.NullableInt"
},
"name": {
"type": "string"
},
"pattern": {
"type": "string"
}
}
},
"schedule.ListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/schedule.Schedule"
}
}
}
},
"schedule.NullableInt": {
"type": "object",
"properties": {
"set": {
"type": "boolean"
},
"value": {
"type": "integer"
}
}
},
"schedule.Schedule": {
"type": "object",
"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"
}
}
},
"schedule.UpdateRequest": {
"type": "object",
"properties": {
"command": {
"type": "string"
},
"description": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"max_calls": {
"$ref": "#/definitions/schedule.NullableInt"
},
"name": {
"type": "string"
},
"pattern": {
"type": "string"
}
}
},
"searchproviders.CreateRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/searchproviders.ProviderName"
}
}
},
"searchproviders.GetResponse": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"searchproviders.ProviderConfigSchema": {
"type": "object",
"properties": {
"fields": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/searchproviders.ProviderFieldSchema"
}
}
}
},
"searchproviders.ProviderFieldSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"example": {},
"required": {
"type": "boolean"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"searchproviders.ProviderMeta": {
"type": "object",
"properties": {
"config_schema": {
"$ref": "#/definitions/searchproviders.ProviderConfigSchema"
},
"display_name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"searchproviders.ProviderName": {
"type": "string",
"enum": [
"brave",
"bing",
"google",
"tavily",
"sogou",
"serper",
"searxng",
"jina",
"exa",
"bocha",
"duckduckgo",
"yandex"
],
"x-enum-varnames": [
"ProviderBrave",
"ProviderBing",
"ProviderGoogle",
"ProviderTavily",
"ProviderSogou",
"ProviderSerper",
"ProviderSearXNG",
"ProviderJina",
"ProviderExa",
"ProviderBocha",
"ProviderDuckDuckGo",
"ProviderYandex"
]
},
"searchproviders.UpdateRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/searchproviders.ProviderName"
}
}
},
"settings.Settings": {
"type": "object",
"properties": {
"allow_guest": {
"type": "boolean"
},
"browser_context_id": {
"type": "string"
},
"chat_model_id": {
"type": "string"
},
"heartbeat_enabled": {
"type": "boolean"
},
"heartbeat_interval": {
"type": "integer"
},
"heartbeat_model_id": {
"type": "string"
},
"language": {
"type": "string"
},
"max_context_load_time": {
"type": "integer"
},
"max_context_tokens": {
"type": "integer"
},
"max_inbox_items": {
"type": "integer"
},
"memory_provider_id": {
"type": "string"
},
"reasoning_effort": {
"type": "string"
},
"reasoning_enabled": {
"type": "boolean"
},
"search_provider_id": {
"type": "string"
}
}
},
"settings.UpsertRequest": {
"type": "object",
"properties": {
"allow_guest": {
"type": "boolean"
},
"browser_context_id": {
"type": "string"
},
"chat_model_id": {
"type": "string"
},
"heartbeat_enabled": {
"type": "boolean"
},
"heartbeat_interval": {
"type": "integer"
},
"heartbeat_model_id": {
"type": "string"
},
"language": {
"type": "string"
},
"max_context_load_time": {
"type": "integer"
},
"max_context_tokens": {
"type": "integer"
},
"max_inbox_items": {
"type": "integer"
},
"memory_provider_id": {
"type": "string"
},
"reasoning_effort": {
"type": "string"
},
"reasoning_enabled": {
"type": "boolean"
},
"search_provider_id": {
"type": "string"
}
}
},
"subagent.AddSkillsRequest": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.ContextResponse": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
},
"usage": {
"type": "object",
"additionalProperties": {}
}
}
},
"subagent.CreateRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.ListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/subagent.Subagent"
}
}
}
},
"subagent.SkillsResponse": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"subagent.Subagent": {
"type": "object",
"properties": {
"bot_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"deleted": {
"type": "boolean"
},
"deleted_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"skills": {
"type": "array",
"items": {
"type": "string"
}
},
"updated_at": {
"type": "string"
},
"usage": {
"type": "object",
"additionalProperties": {}
}
}
},
"subagent.UpdateContextRequest": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
},
"usage": {
"type": "object",
"additionalProperties": {}
}
}
},
"subagent.UpdateRequest": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"subagent.UpdateSkillsRequest": {
"type": "object",
"properties": {
"skills": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it.
var SwaggerInfo = &swag.Spec{
Version: "1.0.0",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "Memoh API",
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}