Files
Memoh/spec/swagger.yaml
T
2026-02-11 15:29:26 +08:00

4892 lines
120 KiB
YAML

definitions:
bots.Bot:
properties:
avatar_url:
type: string
created_at:
type: string
display_name:
type: string
id:
type: string
is_active:
type: boolean
metadata:
additionalProperties: {}
type: object
owner_user_id:
type: string
type:
type: string
updated_at:
type: string
required:
- created_at
- display_name
- id
- is_active
- owner_user_id
- type
- updated_at
type: object
bots.BotMember:
properties:
bot_id:
type: string
created_at:
type: string
role:
type: string
user_id:
type: string
type: object
bots.CreateBotRequest:
properties:
avatar_url:
type: string
display_name:
type: string
is_active:
type: boolean
metadata:
additionalProperties: {}
type: object
type:
type: string
type: object
bots.ListBotsResponse:
properties:
items:
items:
$ref: '#/definitions/bots.Bot'
type: array
required:
- items
type: object
bots.ListMembersResponse:
properties:
items:
items:
$ref: '#/definitions/bots.BotMember'
type: array
type: object
bots.TransferBotRequest:
properties:
owner_user_id:
type: string
type: object
bots.UpdateBotRequest:
properties:
avatar_url:
type: string
display_name:
type: string
is_active:
type: boolean
metadata:
additionalProperties: {}
type: object
type: object
bots.UpsertMemberRequest:
properties:
role:
type: string
user_id:
type: string
type: object
channel.Action:
properties:
label:
type: string
type:
type: string
url:
type: string
value:
type: string
type: object
channel.Attachment:
properties:
caption:
type: string
duration_ms:
type: integer
height:
type: integer
metadata:
additionalProperties: {}
type: object
mime:
type: string
name:
type: string
size:
type: integer
thumbnail_url:
type: string
type:
$ref: '#/definitions/channel.AttachmentType'
url:
type: string
width:
type: integer
type: object
channel.AttachmentType:
enum:
- image
- audio
- video
- voice
- file
- gif
type: string
x-enum-varnames:
- AttachmentImage
- AttachmentAudio
- AttachmentVideo
- AttachmentVoice
- AttachmentFile
- AttachmentGIF
channel.ChannelCapabilities:
properties:
attachments:
type: boolean
block_streaming:
type: boolean
buttons:
type: boolean
chat_types:
items:
type: string
type: array
edit:
type: boolean
markdown:
type: boolean
media:
type: boolean
native_commands:
type: boolean
polls:
type: boolean
reactions:
type: boolean
reply:
type: boolean
rich_text:
type: boolean
streaming:
type: boolean
text:
type: boolean
threads:
type: boolean
unsend:
type: boolean
type: object
channel.ChannelConfig:
properties:
botID:
type: string
channelType:
type: string
createdAt:
type: string
credentials:
additionalProperties: {}
type: object
externalIdentity:
type: string
id:
type: string
routing:
additionalProperties: {}
type: object
selfIdentity:
additionalProperties: {}
type: object
status:
type: string
updatedAt:
type: string
verifiedAt:
type: string
type: object
channel.ChannelUserBinding:
properties:
channelType:
type: string
config:
additionalProperties: {}
type: object
createdAt:
type: string
id:
type: string
updatedAt:
type: string
userID:
type: string
type: object
channel.ConfigSchema:
properties:
fields:
additionalProperties:
$ref: '#/definitions/channel.FieldSchema'
type: object
version:
type: integer
type: object
channel.FieldSchema:
properties:
description:
type: string
enum:
items:
type: string
type: array
example: {}
required:
type: boolean
title:
type: string
type:
$ref: '#/definitions/channel.FieldType'
type: object
channel.FieldType:
enum:
- string
- secret
- bool
- number
- enum
type: string
x-enum-varnames:
- FieldString
- FieldSecret
- FieldBool
- FieldNumber
- FieldEnum
channel.Message:
properties:
actions:
items:
$ref: '#/definitions/channel.Action'
type: array
attachments:
items:
$ref: '#/definitions/channel.Attachment'
type: array
format:
$ref: '#/definitions/channel.MessageFormat'
id:
type: string
metadata:
additionalProperties: {}
type: object
parts:
items:
$ref: '#/definitions/channel.MessagePart'
type: array
reply:
$ref: '#/definitions/channel.ReplyRef'
text:
type: string
thread:
$ref: '#/definitions/channel.ThreadRef'
type: object
channel.MessageFormat:
enum:
- plain
- markdown
- rich
type: string
x-enum-varnames:
- MessageFormatPlain
- MessageFormatMarkdown
- MessageFormatRich
channel.MessagePart:
properties:
emoji:
type: string
language:
type: string
metadata:
additionalProperties: {}
type: object
styles:
items:
$ref: '#/definitions/channel.MessageTextStyle'
type: array
text:
type: string
type:
$ref: '#/definitions/channel.MessagePartType'
url:
type: string
user_id:
type: string
type: object
channel.MessagePartType:
enum:
- text
- link
- code_block
- mention
- emoji
type: string
x-enum-varnames:
- MessagePartText
- MessagePartLink
- MessagePartCodeBlock
- MessagePartMention
- MessagePartEmoji
channel.MessageTextStyle:
enum:
- bold
- italic
- strikethrough
- code
type: string
x-enum-varnames:
- MessageStyleBold
- MessageStyleItalic
- MessageStyleStrikethrough
- MessageStyleCode
channel.ReplyRef:
properties:
message_id:
type: string
target:
type: string
type: object
channel.SendRequest:
properties:
message:
$ref: '#/definitions/channel.Message'
target:
type: string
user_id:
type: string
type: object
channel.TargetHint:
properties:
example:
type: string
label:
type: string
type: object
channel.TargetSpec:
properties:
format:
type: string
hints:
items:
$ref: '#/definitions/channel.TargetHint'
type: array
type: object
channel.ThreadRef:
properties:
id:
type: string
type: object
channel.UpsertConfigRequest:
properties:
credentials:
additionalProperties: {}
type: object
external_identity:
type: string
routing:
additionalProperties: {}
type: object
self_identity:
additionalProperties: {}
type: object
status:
type: string
verified_at:
type: string
type: object
channel.UpsertUserConfigRequest:
properties:
config:
additionalProperties: {}
type: object
type: object
chat.ChatRequest:
properties:
allowed_actions:
items:
type: string
type: array
channels:
items:
type: string
type: array
current_channel:
type: string
language:
type: string
max_context_load_time:
type: integer
messages:
items:
$ref: '#/definitions/chat.ModelMessage'
type: array
model:
type: string
provider:
type: string
query:
type: string
skills:
items:
type: string
type: array
type: object
chat.ChatResponse:
properties:
messages:
items:
$ref: '#/definitions/chat.ModelMessage'
type: array
model:
type: string
provider:
type: string
skills:
items:
type: string
type: array
type: object
chat.ModelMessage:
properties:
content:
items:
type: integer
type: array
name:
type: string
role:
type: string
tool_call_id:
type: string
tool_calls:
items:
$ref: '#/definitions/chat.ToolCall'
type: array
type: object
chat.ToolCall:
properties:
function:
$ref: '#/definitions/chat.ToolCallFunction'
id:
type: string
type:
type: string
type: object
chat.ToolCallFunction:
properties:
arguments:
type: string
name:
type: string
type: object
github_com_memohai_memoh_internal_mcp.Connection:
properties:
active:
type: boolean
bot_id:
type: string
config:
additionalProperties: {}
type: object
created_at:
type: string
id:
type: string
name:
type: string
type:
type: string
updated_at:
type: string
required:
- active
- bot_id
- config
- created_at
- id
- name
- type
- updated_at
type: object
handlers.ChannelMeta:
properties:
capabilities:
$ref: '#/definitions/channel.ChannelCapabilities'
config_schema:
$ref: '#/definitions/channel.ConfigSchema'
configless:
type: boolean
display_name:
type: string
target_spec:
$ref: '#/definitions/channel.TargetSpec'
type:
type: string
user_config_schema:
$ref: '#/definitions/channel.ConfigSchema'
required:
- capabilities
- config_schema
- display_name
- type
type: object
handlers.CreateContainerRequest:
properties:
image:
type: string
snapshotter:
type: string
type: object
handlers.CreateContainerResponse:
properties:
container_id:
type: string
image:
type: string
snapshotter:
type: string
started:
type: boolean
type: object
handlers.CreateSnapshotRequest:
properties:
snapshot_name:
type: string
type: object
handlers.CreateSnapshotResponse:
properties:
container_id:
type: string
snapshot_name:
type: string
snapshotter:
type: string
type: object
handlers.EmbeddingsInput:
properties:
image_url:
type: string
text:
type: string
video_url:
type: string
type: object
handlers.EmbeddingsRequest:
properties:
dimensions:
type: integer
input:
$ref: '#/definitions/handlers.EmbeddingsInput'
model:
type: string
provider:
type: string
type:
type: string
type: object
handlers.EmbeddingsResponse:
properties:
dimensions:
type: integer
embedding:
items:
type: number
type: array
message:
type: string
model:
type: string
provider:
type: string
type:
type: string
usage:
$ref: '#/definitions/handlers.EmbeddingsUsage'
type: object
handlers.EmbeddingsUsage:
properties:
image_tokens:
type: integer
input_tokens:
type: integer
video_tokens:
type: integer
type: object
handlers.EnableModelRequest:
properties:
as:
type: string
model_id:
type: string
type: object
handlers.ErrorResponse:
properties:
message:
type: string
type: object
handlers.FSDeleteResponse:
properties:
ok:
type: boolean
type: object
handlers.FSListResponse:
properties:
entries:
items:
$ref: '#/definitions/handlers.FSRestEntry'
type: array
path:
type: string
type: object
handlers.FSMkdirRequest:
properties:
parents:
type: boolean
path:
type: string
type: object
handlers.FSReadResponse:
properties:
content:
type: string
mod_time:
type: string
mode:
type: integer
path:
type: string
size:
type: integer
type: object
handlers.FSRestEntry:
properties:
is_dir:
type: boolean
mod_time:
type: string
mode:
type: integer
path:
type: string
size:
type: integer
type: object
handlers.FSStatResponse:
properties:
is_dir:
type: boolean
mod_time:
type: string
mode:
type: integer
path:
type: string
size:
type: integer
type: object
handlers.FSUsageResponse:
properties:
dir_count:
type: integer
file_count:
type: integer
path:
type: string
total_bytes:
type: integer
type: object
handlers.FSWriteRequest:
properties:
content:
type: string
overwrite:
type: boolean
path:
type: string
type: object
handlers.FSWriteResponse:
properties:
ok:
type: boolean
type: object
handlers.GetContainerResponse:
properties:
container_id:
type: string
container_path:
type: string
created_at:
type: string
host_path:
type: string
image:
type: string
namespace:
type: string
status:
type: string
task_running:
type: boolean
updated_at:
type: string
type: object
handlers.ListSnapshotsResponse:
properties:
snapshots:
items:
$ref: '#/definitions/handlers.SnapshotInfo'
type: array
snapshotter:
type: string
type: object
handlers.LoginRequest:
properties:
password:
type: string
username:
type: string
required:
- password
- username
type: object
handlers.LoginResponse:
properties:
access_token:
type: string
display_name:
type: string
expires_at:
type: string
role:
type: string
token_type:
type: string
user_id:
type: string
username:
type: string
required:
- access_token
- display_name
- expires_at
- role
- token_type
- user_id
- username
type: object
handlers.MCPStdioRequest:
properties:
args:
items:
type: string
type: array
command:
type: string
cwd:
type: string
env:
additionalProperties:
type: string
type: object
name:
type: string
type: object
handlers.MCPStdioResponse:
properties:
session_id:
type: string
tools:
items:
type: string
type: array
url:
type: string
type: object
handlers.SkillItem:
properties:
content:
type: string
description:
type: string
metadata:
additionalProperties: {}
type: object
name:
type: string
type: object
handlers.SkillsDeleteRequest:
properties:
names:
items:
type: string
type: array
type: object
handlers.SkillsResponse:
properties:
skills:
items:
$ref: '#/definitions/handlers.SkillItem'
type: array
type: object
handlers.SkillsUpsertRequest:
properties:
skills:
items:
$ref: '#/definitions/handlers.SkillItem'
type: array
type: object
handlers.SnapshotInfo:
properties:
created_at:
type: string
kind:
type: string
labels:
additionalProperties:
type: string
type: object
name:
type: string
parent:
type: string
snapshotter:
type: string
updated_at:
type: string
type: object
handlers.memoryAddPayload:
properties:
embedding_enabled:
type: boolean
filters:
additionalProperties: {}
type: object
infer:
type: boolean
message:
type: string
messages:
items:
$ref: '#/definitions/memory.Message'
type: array
metadata:
additionalProperties: {}
type: object
run_id:
type: string
type: object
handlers.memoryDeleteAllPayload:
properties:
run_id:
type: string
type: object
handlers.memoryEmbedUpsertPayload:
properties:
filters:
additionalProperties: {}
type: object
input:
$ref: '#/definitions/memory.EmbedInput'
metadata:
additionalProperties: {}
type: object
model:
type: string
provider:
type: string
run_id:
type: string
source:
type: string
type:
type: string
type: object
handlers.memorySearchPayload:
properties:
embedding_enabled:
type: boolean
filters:
additionalProperties: {}
type: object
limit:
type: integer
query:
type: string
run_id:
type: string
sources:
items:
type: string
type: array
type: object
handlers.skillsOpResponse:
properties:
ok:
type: boolean
type: object
history.CreateRequest:
properties:
messages:
items:
additionalProperties: {}
type: object
type: array
metadata:
additionalProperties: {}
type: object
skills:
items:
type: string
type: array
type: object
history.ListResponse:
properties:
items:
items:
$ref: '#/definitions/history.Record'
type: array
type: object
history.Record:
properties:
bot_id:
type: string
id:
type: string
messages:
items:
additionalProperties: {}
type: object
type: array
metadata:
additionalProperties: {}
type: object
session_id:
type: string
skills:
items:
type: string
type: array
timestamp:
type: string
type: object
mcp.ListResponse:
properties:
items:
items:
$ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection'
type: array
type: object
mcp.UpsertRequest:
properties:
active:
type: boolean
config:
additionalProperties: {}
type: object
name:
type: string
type:
type: string
type: object
memory.DeleteResponse:
properties:
message:
type: string
type: object
memory.EmbedInput:
properties:
image_url:
type: string
text:
type: string
video_url:
type: string
type: object
memory.EmbedUpsertResponse:
properties:
dimensions:
type: integer
item:
$ref: '#/definitions/memory.MemoryItem'
model:
type: string
provider:
type: string
type: object
memory.MemoryItem:
properties:
agentId:
type: string
botId:
type: string
createdAt:
type: string
hash:
type: string
id:
type: string
memory:
type: string
metadata:
additionalProperties: {}
type: object
runId:
type: string
score:
type: number
sessionId:
type: string
updatedAt:
type: string
type: object
memory.Message:
properties:
content:
type: string
role:
type: string
type: object
memory.SearchResponse:
properties:
relations:
items: {}
type: array
results:
items:
$ref: '#/definitions/memory.MemoryItem'
type: array
type: object
memory.UpdateRequest:
properties:
embedding_enabled:
type: boolean
memory:
type: string
memory_id:
type: string
type: object
models.AddRequest:
properties:
dimensions:
type: integer
input:
items:
type: string
type: array
is_multimodal:
type: boolean
llm_provider_id:
type: string
model_id:
type: string
name:
type: string
type:
$ref: '#/definitions/models.ModelType'
required:
- llm_provider_id
- model_id
- name
- type
type: object
models.AddResponse:
properties:
id:
type: string
model_id:
type: string
type: object
models.CountResponse:
properties:
count:
type: integer
type: object
models.GetResponse:
properties:
dimensions:
type: integer
input:
items:
type: string
type: array
is_multimodal:
type: boolean
llm_provider_id:
type: string
model_id:
type: string
name:
type: string
type:
$ref: '#/definitions/models.ModelType'
required:
- llm_provider_id
- model_id
- name
- type
type: object
models.ModelType:
enum:
- chat
- embedding
type: string
x-enum-varnames:
- ModelTypeChat
- ModelTypeEmbedding
models.UpdateRequest:
properties:
dimensions:
type: integer
input:
items:
type: string
type: array
is_multimodal:
type: boolean
llm_provider_id:
type: string
model_id:
type: string
name:
type: string
type:
$ref: '#/definitions/models.ModelType'
required:
- llm_provider_id
- model_id
- name
- type
type: object
providers.ClientType:
enum:
- openai
- openai-compat
- anthropic
- google
- ollama
type: string
x-enum-varnames:
- ClientTypeOpenAI
- ClientTypeOpenAICompat
- ClientTypeAnthropic
- ClientTypeGoogle
- ClientTypeOllama
providers.CountResponse:
properties:
count:
type: integer
type: object
providers.CreateRequest:
properties:
api_key:
type: string
base_url:
type: string
client_type:
$ref: '#/definitions/providers.ClientType'
metadata:
additionalProperties: {}
type: object
name:
type: string
required:
- base_url
- client_type
- name
type: object
providers.GetResponse:
properties:
api_key:
description: masked in response
type: string
base_url:
type: string
client_type:
type: string
created_at:
type: string
id:
type: string
metadata:
additionalProperties: {}
type: object
name:
type: string
updated_at:
type: string
required:
- base_url
- client_type
- created_at
- id
- name
- updated_at
type: object
providers.UpdateRequest:
properties:
api_key:
type: string
base_url:
type: string
client_type:
$ref: '#/definitions/providers.ClientType'
metadata:
additionalProperties: {}
type: object
name:
type: string
type: object
schedule.CreateRequest:
properties:
command:
type: string
description:
type: string
enabled:
type: boolean
max_calls:
$ref: '#/definitions/schedule.NullableInt'
name:
type: string
pattern:
type: string
type: object
schedule.ListResponse:
properties:
items:
items:
$ref: '#/definitions/schedule.Schedule'
type: array
type: object
schedule.NullableInt:
properties:
set:
type: boolean
value:
type: integer
type: object
schedule.Schedule:
properties:
bot_id:
type: string
command:
type: string
created_at:
type: string
current_calls:
type: integer
description:
type: string
enabled:
type: boolean
id:
type: string
max_calls:
type: integer
name:
type: string
pattern:
type: string
updated_at:
type: string
type: object
schedule.UpdateRequest:
properties:
command:
type: string
description:
type: string
enabled:
type: boolean
max_calls:
$ref: '#/definitions/schedule.NullableInt'
name:
type: string
pattern:
type: string
type: object
settings.Settings:
properties:
allow_guest:
type: boolean
chat_model_id:
type: string
embedding_model_id:
type: string
language:
type: string
max_context_load_time:
type: integer
memory_model_id:
type: string
required:
- allow_guest
- chat_model_id
- embedding_model_id
- language
- max_context_load_time
- memory_model_id
type: object
settings.UpsertRequest:
properties:
allow_guest:
type: boolean
chat_model_id:
type: string
embedding_model_id:
type: string
language:
type: string
max_context_load_time:
type: integer
memory_model_id:
type: string
type: object
subagent.AddSkillsRequest:
properties:
skills:
items:
type: string
type: array
type: object
subagent.ContextResponse:
properties:
messages:
items:
additionalProperties: {}
type: object
type: array
type: object
subagent.CreateRequest:
properties:
description:
type: string
messages:
items:
additionalProperties: {}
type: object
type: array
metadata:
additionalProperties: {}
type: object
name:
type: string
skills:
items:
type: string
type: array
type: object
subagent.ListResponse:
properties:
items:
items:
$ref: '#/definitions/subagent.Subagent'
type: array
type: object
subagent.SkillsResponse:
properties:
skills:
items:
type: string
type: array
type: object
subagent.Subagent:
properties:
bot_id:
type: string
created_at:
type: string
deleted:
type: boolean
deleted_at:
type: string
description:
type: string
id:
type: string
messages:
items:
additionalProperties: {}
type: object
type: array
metadata:
additionalProperties: {}
type: object
name:
type: string
skills:
items:
type: string
type: array
updated_at:
type: string
type: object
subagent.UpdateContextRequest:
properties:
messages:
items:
additionalProperties: {}
type: object
type: array
type: object
subagent.UpdateRequest:
properties:
description:
type: string
metadata:
additionalProperties: {}
type: object
name:
type: string
type: object
subagent.UpdateSkillsRequest:
properties:
skills:
items:
type: string
type: array
type: object
users.CreateUserRequest:
properties:
avatar_url:
type: string
display_name:
type: string
email:
type: string
is_active:
type: boolean
password:
type: string
role:
type: string
username:
type: string
type: object
users.ListUsersResponse:
properties:
items:
items:
$ref: '#/definitions/users.User'
type: array
type: object
users.ResetPasswordRequest:
properties:
new_password:
type: string
type: object
users.UpdatePasswordRequest:
properties:
current_password:
type: string
new_password:
type: string
type: object
users.UpdateProfileRequest:
properties:
avatar_url:
type: string
display_name:
type: string
type: object
users.UpdateUserRequest:
properties:
avatar_url:
type: string
display_name:
type: string
is_active:
type: boolean
role:
type: string
type: object
users.User:
properties:
avatar_url:
type: string
created_at:
type: string
display_name:
type: string
email:
type: string
id:
type: string
is_active:
type: boolean
last_login_at:
type: string
role:
type: string
updated_at:
type: string
username:
type: string
type: object
info:
contact: {}
title: Memoh API
version: 1.0.0
paths:
/auth/login:
post:
description: Validate user credentials and issue a JWT
parameters:
- description: Login request
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.LoginRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.LoginResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Login
tags:
- auth
/bots:
get:
description: List bots accessible to current user (admin can specify owner_id)
parameters:
- description: Owner user ID (admin only)
in: query
name: owner_id
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/bots.ListBotsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List bots
tags:
- bots
post:
description: Create a bot user owned by current user (or admin-specified owner)
parameters:
- description: Bot payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/bots.CreateBotRequest'
responses:
"201":
description: Created
schema:
$ref: '#/definitions/bots.Bot'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create bot user
tags:
- bots
/bots/{bot_id}/chat:
post:
consumes:
- application/json
description: Send a chat message and get a response. The system will automatically
select an appropriate chat model from the database.
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Chat request
in: body
name: request
required: true
schema:
$ref: '#/definitions/chat.ChatRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/chat.ChatResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Chat with AI
tags:
- chat
/bots/{bot_id}/chat/stream:
post:
consumes:
- application/json
description: Send a chat message and get a streaming response. The system will
automatically select an appropriate chat model from the database.
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Chat request
in: body
name: request
required: true
schema:
$ref: '#/definitions/chat.ChatRequest'
produces:
- text/event-stream
responses:
"200":
description: OK
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Stream chat with AI
tags:
- chat
/bots/{bot_id}/container:
delete:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete MCP container for bot
tags:
- containerd
get:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.GetContainerResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get container info for bot
tags:
- containerd
post:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Create container payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.CreateContainerRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.CreateContainerResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create and start MCP container for bot
tags:
- containerd
/bots/{bot_id}/container/fs:
delete:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Relative path
in: query
name: path
required: true
type: string
- description: Recursive delete for directories
in: query
name: recursive
type: boolean
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.FSDeleteResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete a file or directory
tags:
- fs
get:
description: List entries under a relative path
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Relative directory path
in: query
name: path
type: string
- description: Recursive listing
in: query
name: recursive
type: boolean
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'
summary: List files for a bot
tags:
- fs
/bots/{bot_id}/container/fs-mcp:
post:
description: |-
Forwards MCP JSON-RPC requests to the MCP server inside the container.
Required:
- container task is running
- container has data mount (default /data) bound to <data_root>/users/<user_id>
- container image contains the "mcp" binary
Auth: Bearer JWT is used to determine user_id (sub or user_id).
Paths must be relative (no leading slash) and must not contain "..".
Example: tools/list
{"jsonrpc":"2.0","id":1,"method":"tools/list"}
Example: tools/call (fs.read)
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"fs.read","arguments":{"path":"notes.txt"}}}
parameters:
- description: Bearer <token>
in: header
name: Authorization
required: true
type: string
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: JSON-RPC request
in: body
name: payload
required: true
schema:
type: object
responses:
"200":
description: 'JSON-RPC response: {jsonrpc,id,result|error}'
schema:
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: MCP filesystem tools (JSON-RPC)
tags:
- containerd
/bots/{bot_id}/container/fs/dir:
post:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Directory payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.FSMkdirRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.FSWriteResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create a directory
tags:
- fs
/bots/{bot_id}/container/fs/file:
get:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Relative file path
in: query
name: path
required: true
type: string
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'
summary: Read file content
tags:
- fs
post:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: File write payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.FSWriteRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.FSWriteResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"409":
description: Conflict
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create or overwrite a file
tags:
- fs
/bots/{bot_id}/container/fs/stat:
get:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Relative path
in: query
name: path
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.FSStatResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get file or directory metadata
tags:
- fs
/bots/{bot_id}/container/fs/upload:
post:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Relative file path or directory
in: query
name: path
type: string
- description: File to upload
in: formData
name: file
required: true
type: file
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.FSWriteResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Upload a file
tags:
- fs
/bots/{bot_id}/container/fs/usage:
get:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Relative directory path
in: query
name: path
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.FSUsageResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get usage under a path
tags:
- fs
/bots/{bot_id}/container/skills:
delete:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Delete skills payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.SkillsDeleteRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.skillsOpResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete skills from data directory
tags:
- containerd
get:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.SkillsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List skills from data directory
tags:
- containerd
post:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Skills payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.SkillsUpsertRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.skillsOpResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Upload skills into data directory
tags:
- containerd
/bots/{bot_id}/container/snapshots:
get:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Snapshotter name
in: query
name: snapshotter
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.ListSnapshotsResponse'
summary: List snapshots
tags:
- containerd
post:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Create snapshot payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.CreateSnapshotRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.CreateSnapshotResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create container snapshot for bot
tags:
- containerd
/bots/{bot_id}/container/start:
post:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"200":
description: OK
schema:
type: object
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Start container task for bot
tags:
- containerd
/bots/{bot_id}/container/stop:
post:
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"200":
description: OK
schema:
type: object
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Stop container task for bot
tags:
- containerd
/bots/{bot_id}/history:
delete:
description: Delete all history records for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete all history records
tags:
- history
get:
description: List history records for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Limit
in: query
name: limit
type: integer
responses:
"200":
description: OK
schema:
$ref: '#/definitions/history.ListResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List history records
tags:
- history
post:
description: Create a history record for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: History payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/history.CreateRequest'
responses:
"201":
description: Created
schema:
$ref: '#/definitions/history.Record'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create history record
tags:
- history
/bots/{bot_id}/history/{id}:
delete:
description: Delete a history record by ID (must belong to current user)
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: History ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete history record
tags:
- history
get:
description: Get a history record by ID (must belong to current user)
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: History ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/history.Record'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get history record
tags:
- history
/bots/{bot_id}/mcp:
get:
description: List MCP connections for a bot
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/mcp.ListResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List MCP connections
tags:
- mcp
post:
description: Create a MCP connection for a bot
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: MCP payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/mcp.UpsertRequest'
responses:
"201":
description: Created
schema:
$ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create MCP connection
tags:
- mcp
/bots/{bot_id}/mcp-stdio:
post:
description: Start a stdio MCP process in the bot container and expose it as
MCP HTTP endpoint.
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Stdio MCP payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.MCPStdioRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.MCPStdioResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create MCP stdio proxy
tags:
- containerd
/bots/{bot_id}/mcp-stdio/{session_id}:
post:
description: Proxies MCP JSON-RPC requests to a stdio MCP process in the container.
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Session ID
in: path
name: session_id
required: true
type: string
- description: JSON-RPC request
in: body
name: payload
required: true
schema:
type: object
responses:
"200":
description: 'JSON-RPC response: {jsonrpc,id,result|error}'
schema:
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: MCP stdio proxy (JSON-RPC)
tags:
- containerd
/bots/{bot_id}/mcp/{id}:
delete:
description: Delete a MCP connection by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: MCP ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete MCP connection
tags:
- mcp
get:
description: Get a MCP connection by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: MCP ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get MCP connection
tags:
- mcp
put:
description: Update a MCP connection by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: MCP ID
in: path
name: id
required: true
type: string
- description: MCP payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/mcp.UpsertRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update MCP connection
tags:
- mcp
/bots/{bot_id}/memory/add:
post:
description: 'Add memory for a user via memory. Auth: Bearer JWT determines
user_id (sub or user_id).'
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Add request
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.memoryAddPayload'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/memory.SearchResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Add memory
tags:
- memory
/bots/{bot_id}/memory/embed:
post:
description: 'Embed text or multimodal input and upsert into memory store. Auth:
Bearer JWT determines user_id (sub or user_id).'
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Embed upsert request
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.memoryEmbedUpsertPayload'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/memory.EmbedUpsertResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Embed and upsert memory
tags:
- memory
/bots/{bot_id}/memory/memories:
delete:
description: 'Delete all memories for a user via memory. Auth: Bearer JWT determines
user_id (sub or user_id).'
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Delete all request
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.memoryDeleteAllPayload'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/memory.DeleteResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete memories
tags:
- memory
get:
description: 'List memories for a user via memory. Auth: Bearer JWT determines
user_id (sub or user_id).'
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Run ID
in: query
name: run_id
type: string
- description: Limit
in: query
name: limit
type: integer
responses:
"200":
description: OK
schema:
$ref: '#/definitions/memory.SearchResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List memories
tags:
- memory
/bots/{bot_id}/memory/memories/{memoryId}:
delete:
description: 'Delete a memory by ID via memory. Auth: Bearer JWT determines
user_id (sub or user_id).'
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Memory ID
in: path
name: memoryId
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/memory.DeleteResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete memory
tags:
- memory
get:
description: 'Get a memory by ID via memory. Auth: Bearer JWT determines user_id
(sub or user_id).'
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Memory ID
in: path
name: memoryId
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/memory.MemoryItem'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get memory
tags:
- memory
/bots/{bot_id}/memory/search:
post:
description: 'Search memories for a user via memory. Auth: Bearer JWT determines
user_id (sub or user_id).'
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Search request
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.memorySearchPayload'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/memory.SearchResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Search memories
tags:
- memory
/bots/{bot_id}/memory/update:
post:
description: 'Update a memory by ID via memory. Auth: Bearer JWT determines
user_id (sub or user_id).'
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Update request
in: body
name: payload
required: true
schema:
$ref: '#/definitions/memory.UpdateRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/memory.MemoryItem'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update memory
tags:
- memory
/bots/{bot_id}/schedule:
get:
description: List schedules for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/schedule.ListResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List schedules
tags:
- schedule
post:
description: Create a schedule for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Schedule payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/schedule.CreateRequest'
responses:
"201":
description: Created
schema:
$ref: '#/definitions/schedule.Schedule'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create schedule
tags:
- schedule
/bots/{bot_id}/schedule/{id}:
delete:
description: Delete a schedule by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Schedule ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete schedule
tags:
- schedule
get:
description: Get a schedule by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Schedule ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/schedule.Schedule'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get schedule
tags:
- schedule
put:
description: Update a schedule by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Schedule ID
in: path
name: id
required: true
type: string
- description: Schedule payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/schedule.UpdateRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/schedule.Schedule'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update schedule
tags:
- schedule
/bots/{bot_id}/settings:
delete:
description: Remove agent settings for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete user settings
tags:
- settings
get:
description: Get agent settings for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/settings.Settings'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get user settings
tags:
- settings
post:
description: Update or create agent settings for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Settings payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/settings.UpsertRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/settings.Settings'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update user settings
tags:
- settings
put:
description: Update or create agent settings for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Settings payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/settings.UpsertRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/settings.Settings'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update user settings
tags:
- settings
/bots/{bot_id}/subagents:
get:
description: List subagents for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.ListResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List subagents
tags:
- subagent
post:
description: Create a subagent for current user
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.CreateRequest'
responses:
"201":
description: Created
schema:
$ref: '#/definitions/subagent.Subagent'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create subagent
tags:
- subagent
/bots/{bot_id}/subagents/{id}:
delete:
description: Delete a subagent by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete subagent
tags:
- subagent
get:
description: Get a subagent by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.Subagent'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get subagent
tags:
- subagent
put:
description: Update a subagent by ID
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent ID
in: path
name: id
required: true
type: string
- description: Subagent payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.UpdateRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.Subagent'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update subagent
tags:
- subagent
/bots/{bot_id}/subagents/{id}/context:
get:
description: Get a subagent's message context
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.ContextResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get subagent context
tags:
- subagent
put:
description: Update a subagent's message context
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent ID
in: path
name: id
required: true
type: string
- description: Context payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.UpdateContextRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.ContextResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update subagent context
tags:
- subagent
/bots/{bot_id}/subagents/{id}/skills:
get:
description: Get a subagent's skills
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.SkillsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get subagent skills
tags:
- subagent
post:
description: Add skills to a subagent
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent ID
in: path
name: id
required: true
type: string
- description: Skills payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.AddSkillsRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.SkillsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Add subagent skills
tags:
- subagent
put:
description: Replace a subagent's skills
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
- description: Subagent ID
in: path
name: id
required: true
type: string
- description: Skills payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/subagent.UpdateSkillsRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/subagent.SkillsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update subagent skills
tags:
- subagent
/bots/{id}:
delete:
description: Delete a bot user (owner/admin only)
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete bot
tags:
- bots
get:
description: Get a bot by ID (owner/admin only)
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/bots.Bot'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get bot details
tags:
- bots
put:
description: Update bot profile (owner/admin only)
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
- description: Bot update payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/bots.UpdateBotRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/bots.Bot'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update bot details
tags:
- bots
/bots/{id}/channel/{platform}:
get:
description: Get bot channel configuration
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
- description: Channel platform
in: path
name: platform
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/channel.ChannelConfig'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get bot channel config
tags:
- bots
put:
description: Update bot channel configuration
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
- description: Channel platform
in: path
name: platform
required: true
type: string
- description: Channel config payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/channel.UpsertConfigRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/channel.ChannelConfig'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update bot channel config
tags:
- bots
/bots/{id}/channel/{platform}/send:
post:
description: Send a message using bot channel configuration
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
- description: Channel platform
in: path
name: platform
required: true
type: string
- description: Send payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/channel.SendRequest'
responses:
"200":
description: OK
schema:
additionalProperties:
type: string
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Send message via bot channel
tags:
- bots
/bots/{id}/channel/{platform}/send_session:
post:
description: Send a message using a session-scoped token (reply only)
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
- description: Channel platform
in: path
name: platform
required: true
type: string
- description: Send payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/channel.SendRequest'
responses:
"200":
description: OK
schema:
additionalProperties:
type: string
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Send message via bot channel session token
tags:
- bots
/bots/{id}/members:
get:
description: List members for a bot
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/bots.ListMembersResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List bot members
tags:
- bots
put:
description: Add or update bot member role
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
- description: Member payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/bots.UpsertMemberRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/bots.BotMember'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Upsert bot member
tags:
- bots
/bots/{id}/members/{user_id}:
delete:
description: Remove a member from a bot
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
- description: User ID
in: path
name: user_id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete bot member
tags:
- bots
/bots/{id}/owner:
put:
description: Transfer bot ownership to another human user
parameters:
- description: Bot ID
in: path
name: id
required: true
type: string
- description: Transfer payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/bots.TransferBotRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/bots.Bot'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Transfer bot owner (admin only)
tags:
- bots
/channels:
get:
description: List channel meta information including capabilities and schemas
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/handlers.ChannelMeta'
type: array
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List channel capabilities and schemas
tags:
- channel
/channels/{platform}:
get:
description: Get channel meta information including capabilities and schemas
parameters:
- description: Channel platform
in: path
name: platform
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.ChannelMeta'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get channel capabilities and schemas
tags:
- channel
/embeddings:
post:
description: Create text or multimodal embeddings
parameters:
- description: Embeddings request
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.EmbeddingsRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handlers.EmbeddingsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"501":
description: Not Implemented
schema:
$ref: '#/definitions/handlers.EmbeddingsResponse'
summary: Create embeddings
tags:
- embeddings
/models:
get:
description: Get a list of all configured models, optionally filtered by type
or client type
parameters:
- description: Model type (chat, embedding)
in: query
name: type
type: string
- description: Client type (openai, anthropic, google)
in: query
name: client_type
type: string
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/models.GetResponse'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List all models
tags:
- models
post:
description: Create a new model configuration
parameters:
- description: Model configuration
in: body
name: payload
required: true
schema:
$ref: '#/definitions/models.AddRequest'
responses:
"201":
description: Created
schema:
$ref: '#/definitions/models.AddResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create a new model
tags:
- models
/models/{id}:
delete:
description: Delete a model configuration by its internal UUID
parameters:
- description: Model internal ID (UUID)
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete model by internal ID
tags:
- models
get:
description: Get a model configuration by its internal UUID
parameters:
- description: Model internal ID (UUID)
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.GetResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get model by internal ID
tags:
- models
put:
description: Update a model configuration by its internal UUID
parameters:
- description: Model internal ID (UUID)
in: path
name: id
required: true
type: string
- description: Updated model configuration
in: body
name: payload
required: true
schema:
$ref: '#/definitions/models.UpdateRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.GetResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update model by internal ID
tags:
- models
/models/count:
get:
description: Get the total count of models, optionally filtered by type
parameters:
- description: Model type (chat, embedding)
in: query
name: type
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.CountResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get model count
tags:
- models
/models/enable:
post:
description: Update the current user's settings to use the selected model
parameters:
- description: Enable model payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/handlers.EnableModelRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/settings.Settings'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Enable model for chat/memory/embedding
tags:
- models
/models/model/{modelId}:
delete:
description: Delete a model configuration by its model_id field (e.g., gpt-4)
parameters:
- description: Model ID (e.g., gpt-4)
in: path
name: modelId
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete model by model ID
tags:
- models
get:
description: Get a model configuration by its model_id field (e.g., gpt-4)
parameters:
- description: Model ID (e.g., gpt-4)
in: path
name: modelId
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.GetResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get model by model ID
tags:
- models
put:
description: Update a model configuration by its model_id field (e.g., gpt-4)
parameters:
- description: Model ID (e.g., gpt-4)
in: path
name: modelId
required: true
type: string
- description: Updated model configuration
in: body
name: payload
required: true
schema:
$ref: '#/definitions/models.UpdateRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/models.GetResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update model by model ID
tags:
- models
/providers:
get:
consumes:
- application/json
description: Get a list of all configured LLM providers, optionally filtered
by client type
parameters:
- description: Client type filter (openai, anthropic, google, ollama)
in: query
name: client_type
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/providers.GetResponse'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List all LLM providers
tags:
- providers
post:
consumes:
- application/json
description: Create a new LLM provider configuration
parameters:
- description: Provider configuration
in: body
name: request
required: true
schema:
$ref: '#/definitions/providers.CreateRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/providers.GetResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create a new LLM provider
tags:
- providers
/providers/{id}:
delete:
consumes:
- application/json
description: Delete a provider configuration
parameters:
- description: Provider ID (UUID)
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Delete provider
tags:
- providers
get:
consumes:
- application/json
description: Get a provider configuration by its ID
parameters:
- description: Provider ID (UUID)
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/providers.GetResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get provider by ID
tags:
- providers
put:
consumes:
- application/json
description: Update an existing provider configuration
parameters:
- description: Provider ID (UUID)
in: path
name: id
required: true
type: string
- description: Updated provider configuration
in: body
name: request
required: true
schema:
$ref: '#/definitions/providers.UpdateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/providers.GetResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update provider
tags:
- providers
/providers/{id}/models:
get:
description: Get models for a provider by id, optionally filtered by type
parameters:
- description: Provider ID (UUID)
in: path
name: id
required: true
type: string
- description: Model type (chat, embedding)
in: query
name: type
type: string
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/models.GetResponse'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List provider models
tags:
- providers
/providers/count:
get:
consumes:
- application/json
description: Get the total count of providers, optionally filtered by client
type
parameters:
- description: Client type filter (openai, anthropic, google, ollama)
in: query
name: client_type
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/providers.CountResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Count providers
tags:
- providers
/providers/name/{name}:
get:
consumes:
- application/json
description: Get a provider configuration by its name
parameters:
- description: Provider name
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/providers.GetResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get provider by name
tags:
- providers
/users:
get:
description: List users
responses:
"200":
description: OK
schema:
$ref: '#/definitions/users.ListUsersResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: List users (admin only)
tags:
- users
post:
description: Create a new human user account
parameters:
- description: User payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/users.CreateUserRequest'
responses:
"201":
description: Created
schema:
$ref: '#/definitions/users.User'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Create human user (admin only)
tags:
- users
/users/{id}:
get:
description: Get user details (self or admin only)
parameters:
- description: User ID
in: path
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/users.User'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get user by ID
tags:
- users
put:
description: Update user profile and status
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: User update payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/users.UpdateUserRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/users.User'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update user (admin only)
tags:
- users
/users/{id}/password:
put:
description: Reset a user password
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: Password payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/users.ResetPasswordRequest'
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Reset user password (admin only)
tags:
- users
/users/me:
get:
description: Get current user profile
responses:
"200":
description: OK
schema:
$ref: '#/definitions/users.User'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get current user
tags:
- users
put:
description: Update current user display name or avatar
parameters:
- description: Profile payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/users.UpdateProfileRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/users.User'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update current user profile
tags:
- users
/users/me/channels/{platform}:
get:
description: Get channel binding configuration for current user
parameters:
- description: Channel platform
in: path
name: platform
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/channel.ChannelUserBinding'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Get channel user config
tags:
- channel
put:
description: Update channel binding configuration for current user
parameters:
- description: Channel platform
in: path
name: platform
required: true
type: string
- description: Channel user config payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/channel.UpsertUserConfigRequest'
responses:
"200":
description: OK
schema:
$ref: '#/definitions/channel.ChannelUserBinding'
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update channel user config
tags:
- channel
/users/me/password:
put:
description: Update current user password with current password check
parameters:
- description: Password payload
in: body
name: payload
required: true
schema:
$ref: '#/definitions/users.UpdatePasswordRequest'
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: Update current user password
tags:
- users
swagger: "2.0"