{"openapi":"3.1.0","info":{"title":"Agent Mailer","version":"0.1.0"},"paths":{"/agents/register":{"post":{"summary":"Register Agent","operationId":"register_agent_agents_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/address":{"patch":{"summary":"Update Address","operationId":"update_address_agents__agent_id__address_patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdateAddressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents":{"get":{"summary":"List Agents","operationId":"list_agents_agents_get","parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentResponse"},"title":"Response List Agents Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}":{"get":{"summary":"Get Agent","operationId":"get_agent_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/setup":{"get":{"summary":"Get Agent Setup","description":"返回该 Agent 的 AGENT.md 内容和 CLAUDE.md 模板，用于工作目录初始化。","operationId":"get_agent_setup_agents__agent_id__setup_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/send":{"post":{"summary":"Send Message","operationId":"send_message_messages_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MessageResponse"},{"items":{"$ref":"#/components/schemas/MessageResponse"},"type":"array"}],"title":"Response Send Message Messages Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/inbox/{address}":{"get":{"summary":"Inbox","operationId":"inbox_messages_inbox__address__get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/thread/{thread_id}":{"get":{"summary":"Thread","operationId":"thread_messages_thread__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageResponse"},"title":"Response Thread Messages Thread  Thread Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/{message_id}/read":{"patch":{"summary":"Mark Read","operationId":"mark_read_messages__message_id__read_patch","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/messages/{message_id}/unread":{"patch":{"summary":"Mark Unread","operationId":"mark_unread_messages__message_id__unread_patch","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/agents":{"get":{"summary":"Admin List Agents","operationId":"admin_list_agents_admin_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Response Admin List Agents Admin Agents Get"}}}}}}},"/admin/human-operator":{"get":{"summary":"Get Human Operator","operationId":"get_human_operator_admin_human_operator_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/messages/thread/{thread_id}":{"get":{"summary":"Admin Thread","operationId":"admin_thread_admin_messages_thread__thread_id__get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MessageResponse"},"title":"Response Admin Thread Admin Messages Thread  Thread Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/messages/{message_id}/read":{"patch":{"summary":"Admin Mark Read","operationId":"admin_mark_read_admin_messages__message_id__read_patch","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/messages/{message_id}/unread":{"patch":{"summary":"Admin Mark Unread","operationId":"admin_mark_unread_admin_messages__message_id__unread_patch","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/agents/stats":{"get":{"summary":"Agents Stats","operationId":"agents_stats_admin_agents_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AgentStats"},"type":"array","title":"Response Agents Stats Admin Agents Stats Get"}}}}}}},"/admin/agents/{agent_id}/tags":{"put":{"summary":"Update Agent Tags","operationId":"update_agent_tags_admin_agents__agent_id__tags_put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdateTagsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/agents/{agent_id}":{"delete":{"summary":"Delete Agent","operationId":"delete_agent_admin_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/threads/summary":{"get":{"summary":"Threads Summary","operationId":"threads_summary_admin_threads_summary_get","parameters":[{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Archived"}},{"name":"trashed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Trashed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ThreadSummary"},"title":"Response Threads Summary Admin Threads Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/threads/{thread_id}/status":{"get":{"summary":"Thread Operator Status","operationId":"thread_operator_status_admin_threads__thread_id__status_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadOperatorStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/threads/{thread_id}/archive":{"get":{"summary":"Thread Archive Status","operationId":"thread_archive_status_admin_threads__thread_id__archive_get","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadArchiveStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Archive Thread","operationId":"archive_thread_admin_threads__thread_id__archive_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/threads/{thread_id}/unarchive":{"post":{"summary":"Unarchive Thread","operationId":"unarchive_thread_admin_threads__thread_id__unarchive_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/threads/{thread_id}/trash":{"post":{"summary":"Trash Thread","operationId":"trash_thread_admin_threads__thread_id__trash_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/threads/{thread_id}/restore":{"post":{"summary":"Restore Thread From Trash","operationId":"restore_thread_from_trash_admin_threads__thread_id__restore_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/threads/{thread_id}/purge":{"post":{"summary":"Purge Thread","operationId":"purge_thread_admin_threads__thread_id__purge_post","parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/messages/inbox/{address}":{"get":{"summary":"Admin Inbox","operationId":"admin_inbox_admin_messages_inbox__address__get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}},{"name":"page","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}},{"name":"from_team_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/messages/send":{"post":{"summary":"Admin Send","operationId":"admin_send_admin_messages_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MessageResponse"},{"items":{"$ref":"#/components/schemas/MessageResponse"},"type":"array"}],"title":"Response Admin Send Admin Messages Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/trash/messages":{"get":{"summary":"List Trashed Messages","operationId":"list_trashed_messages_admin_trash_messages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TrashedMessageListItem"},"type":"array","title":"Response List Trashed Messages Admin Trash Messages Get"}}}}}}},"/admin/trash/messages/{message_id}":{"get":{"summary":"Get Trashed Message","operationId":"get_trashed_message_admin_trash_messages__message_id__get","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrashedMessageDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/messages/{message_id}/trash":{"post":{"summary":"Trash Single Message","operationId":"trash_single_message_admin_messages__message_id__trash_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/messages/{message_id}/restore":{"post":{"summary":"Restore Single Message","operationId":"restore_single_message_admin_messages__message_id__restore_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/messages/{message_id}/purge":{"post":{"summary":"Purge Single Message","operationId":"purge_single_message_admin_messages__message_id__purge_post","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/search":{"get":{"summary":"Admin Search","operationId":"admin_search_admin_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/ui":{"get":{"summary":"Ui","operationId":"ui_admin_ui_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/users/registration-config":{"get":{"tags":["users"],"summary":"Registration Config","description":"Public endpoint — lets the registration page detect whether to ask for an invite code.","operationId":"registration_config_users_registration_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationConfigResponse"}}}}}}},"/users/register":{"post":{"tags":["users"],"summary":"Register","operationId":"register_users_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/login":{"post":{"tags":["users"],"summary":"Login","operationId":"login_users_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/logout":{"post":{"tags":["users"],"summary":"Logout","operationId":"logout_users_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/users/me":{"get":{"tags":["users"],"summary":"Get Me","operationId":"get_me_users_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}}},"/users/me/filter-tags":{"put":{"tags":["users"],"summary":"Update Filter Tags","operationId":"update_filter_tags_users_me_filter_tags_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFilterTagsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me/password":{"put":{"tags":["users"],"summary":"Change Password","operationId":"change_password_users_me_password_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/api-keys":{"get":{"tags":["users"],"summary":"List Api Keys","operationId":"list_api_keys_users_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Api Keys Users Api Keys Get"}}}}}},"post":{"tags":["users"],"summary":"Create Api Key","operationId":"create_api_key_users_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/api-keys/{key_id}/deactivate":{"post":{"tags":["users"],"summary":"Deactivate Api Key","operationId":"deactivate_api_key_users_api_keys__key_id__deactivate_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/api-keys/{key_id}/reactivate":{"post":{"tags":["users"],"summary":"Reactivate Api Key","operationId":"reactivate_api_key_users_api_keys__key_id__reactivate_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/api-keys/{key_id}":{"delete":{"tags":["users"],"summary":"Delete Api Key","description":"Permanently remove an API key.\n\nUse ``POST /api-keys/{id}/deactivate`` for the recoverable variant — this\nendpoint hard-deletes the row so it disappears from the user's list. The\n``key_hash`` is freed for reuse and any in-flight calls authenticating with\nthat key fall through to the standard 401 path (``dependencies.py`` filters\non ``is_active = 1``, and a missing row is just as authoritative).\n\nRefuses with 409 when the key is bound to an active agent — agent-bound\nkeys have ``name = 'agent:{agent_id}'`` and silently revoking one would\nbreak the agent's auth without warning the operator.","operationId":"delete_api_key_users_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me/agents":{"get":{"tags":["me-agents"],"summary":"List My Agents","operationId":"list_my_agents_users_me_agents_get","parameters":[{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserAgentResponse"},"title":"Response List My Agents Users Me Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["me-agents"],"summary":"Create My Agent","operationId":"create_my_agent_users_me_agents_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAgentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAgentCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me/agents/{agent_id}":{"get":{"tags":["me-agents"],"summary":"Get My Agent","operationId":"get_my_agent_users_me_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["me-agents"],"summary":"Update My Agent","operationId":"update_my_agent_users_me_agents__agent_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAgentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["me-agents"],"summary":"Delete My Agent","operationId":"delete_my_agent_users_me_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me/agents/{agent_id}/regenerate-key":{"post":{"tags":["me-agents"],"summary":"Regenerate My Agent Key","operationId":"regenerate_my_agent_key_users_me_agents__agent_id__regenerate_key_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAgentRegenerateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me/agents/{agent_id}/export":{"get":{"tags":["me-agents"],"summary":"Export My Agent Md","operationId":"export_my_agent_md_users_me_agents__agent_id__export_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"agent_md","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAgentExportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/invite-codes":{"get":{"tags":["superadmin"],"summary":"List Invite Codes","operationId":"list_invite_codes_superadmin_invite_codes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InviteCodeResponse"},"type":"array","title":"Response List Invite Codes Superadmin Invite Codes Get"}}}}}},"post":{"tags":["superadmin"],"summary":"Create Invite Code","operationId":"create_invite_code_superadmin_invite_codes_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCodeResponse"}}}}}}},"/superadmin/users":{"get":{"tags":["superadmin"],"summary":"List Users","operationId":"list_users_superadmin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Response List Users Superadmin Users Get"}}}}}}},"/superadmin/settings":{"get":{"tags":["superadmin"],"summary":"Get System Settings","operationId":"get_system_settings_superadmin_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemSettingsResponse"}}}}}},"put":{"tags":["superadmin"],"summary":"Update System Settings","operationId":"update_system_settings_superadmin_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemSettingsUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/agents":{"get":{"tags":["superadmin"],"summary":"Admin List Agents","operationId":"admin_list_agents_superadmin_agents_get","parameters":[{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminAgentResponse"},"title":"Response Admin List Agents Superadmin Agents Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["superadmin"],"summary":"Admin Create Agent","operationId":"admin_create_agent_superadmin_agents_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/agents/{agent_id}":{"put":{"tags":["superadmin"],"summary":"Admin Update Agent","operationId":"admin_update_agent_superadmin_agents__agent_id__put","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["superadmin"],"summary":"Admin Delete Agent","operationId":"admin_delete_agent_superadmin_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/agents/{agent_id}/regenerate-key":{"post":{"tags":["superadmin"],"summary":"Admin Regenerate Agent Key","operationId":"admin_regenerate_agent_key_superadmin_agents__agent_id__regenerate_key_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentRegenerateKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/agents/{agent_id}/export":{"get":{"tags":["superadmin"],"summary":"Admin Export Agent Md","operationId":"admin_export_agent_md_superadmin_agents__agent_id__export_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"agent_md","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentExportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/superadmin/login-as/{user_id}":{"post":{"tags":["superadmin"],"summary":"Login As","operationId":"login_as_superadmin_login_as__user_id__post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/upload":{"post":{"tags":["files"],"summary":"Upload File","operationId":"upload_file_files_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_files_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/{file_id}":{"get":{"tags":["files"],"summary":"Get File","operationId":"get_file_files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/teams":{"get":{"summary":"List Teams","operationId":"list_teams_admin_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeamResponse"},"type":"array","title":"Response List Teams Admin Teams Get"}}}}}},"post":{"summary":"Create Team","operationId":"create_team_admin_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/teams/{team_id}":{"get":{"summary":"Get Team","operationId":"get_team_admin_teams__team_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Team","operationId":"update_team_admin_teams__team_id__put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Team","operationId":"delete_team_admin_teams__team_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/teams/{team_id}/agents":{"post":{"summary":"Add Agent To Team","operationId":"add_agent_to_team_admin_teams__team_id__agents_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamAddAgentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/teams/{team_id}/agents/{agent_id}":{"delete":{"summary":"Remove Agent From Team","operationId":"remove_agent_from_team_admin_teams__team_id__agents__agent_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/teams/{team_id}/memories":{"post":{"summary":"Create Memory","operationId":"create_memory_admin_teams__team_id__memories_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Memories","operationId":"list_memories_admin_teams__team_id__memories_get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemoryResponse"},"title":"Response List Memories Admin Teams  Team Id  Memories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/teams/{team_id}/memories/{memory_id}":{"get":{"summary":"Get Memory","operationId":"get_memory_admin_teams__team_id__memories__memory_id__get","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Memory","operationId":"update_memory_admin_teams__team_id__memories__memory_id__put","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Memory","operationId":"delete_memory_admin_teams__team_id__memories__memory_id__delete","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/teams/{team_id}/memories/upsert":{"post":{"summary":"Upsert Memory","description":"Save-or-append by title.\n\nIf a memory with the given title already exists in this team, append the\nnew content to the existing content separated by a Markdown horizontal\nrule. Otherwise create a new memory. No count limit — used by the\n`Save to Team` email flow.","operationId":"upsert_memory_admin_teams__team_id__memories_upsert_post","parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/memories/{memory_id}":{"get":{"summary":"Get Memory By Agent","operationId":"get_memory_by_agent_memories__memory_id__get","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/setup.md":{"get":{"summary":"Setup Guide","operationId":"setup_guide_setup_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/robots.txt":{"get":{"summary":"Robots Txt","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap Xml","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms-full.txt":{"get":{"summary":"Llms Full Txt","operationId":"llms_full_txt_llms_full_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ai.txt":{"get":{"summary":"Ai Txt","operationId":"ai_txt_ai_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/humans.txt":{"get":{"summary":"Humans Txt","operationId":"humans_txt_humans_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/ai-plugin.json":{"get":{"summary":"Ai Plugin Json","operationId":"ai_plugin_json__well_known_ai_plugin_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/security.txt":{"get":{"summary":"Security Txt","operationId":"security_txt__well_known_security_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/readme.md":{"get":{"summary":"Readme Md","operationId":"readme_md_readme_md_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/readme.zh.md":{"get":{"summary":"Readme Zh Md","operationId":"readme_zh_md_readme_zh_md_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/spec.md":{"get":{"summary":"Spec Md","operationId":"spec_md_spec_md_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AdminAgentCreateRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"address_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Local"},"role":{"type":"string","title":"Role","default":""},"description":{"type":"string","title":"Description","default":""},"system_prompt":{"type":"string","title":"System Prompt","default":""},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},"type":"object","required":["name"],"title":"AdminAgentCreateRequest"},"AdminAgentCreateResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"role":{"type":"string","title":"Role"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"status":{"type":"string","title":"Status","default":"active"},"created_at":{"type":"string","title":"Created At"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"api_key_masked":{"type":"string","title":"Api Key Masked","default":""},"api_key_plaintext":{"type":"string","title":"Api Key Plaintext"}},"type":"object","required":["id","name","address","role","description","system_prompt","created_at","api_key_plaintext"],"title":"AdminAgentCreateResponse"},"AdminAgentExportResponse":{"properties":{"filename":{"type":"string","title":"Filename"},"content":{"type":"string","title":"Content"}},"type":"object","required":["filename","content"],"title":"AdminAgentExportResponse"},"AdminAgentRegenerateKeyResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"api_key_masked":{"type":"string","title":"Api Key Masked"},"api_key_plaintext":{"type":"string","title":"Api Key Plaintext"}},"type":"object","required":["agent_id","api_key_masked","api_key_plaintext"],"title":"AdminAgentRegenerateKeyResponse"},"AdminAgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"role":{"type":"string","title":"Role"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"status":{"type":"string","title":"Status","default":"active"},"created_at":{"type":"string","title":"Created At"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"api_key_masked":{"type":"string","title":"Api Key Masked","default":""}},"type":"object","required":["id","name","address","role","description","system_prompt","created_at"],"title":"AdminAgentResponse"},"AdminAgentUpdateRequest":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},"type":"object","title":"AdminAgentUpdateRequest"},"AdminSendRequest":{"properties":{"to_agent":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"To Agent"},"action":{"type":"string","title":"Action","default":"send"},"subject":{"type":"string","title":"Subject","default":""},"body":{"type":"string","title":"Body","default":""},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"forward_scope":{"anyOf":[{"type":"string","enum":["message","thread"]},{"type":"null"}],"title":"Forward Scope"}},"type":"object","required":["to_agent"],"title":"AdminSendRequest"},"AgentRegisterRequest":{"properties":{"name":{"type":"string","title":"Name"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"role":{"type":"string","title":"Role"},"description":{"type":"string","title":"Description","default":""},"system_prompt":{"type":"string","title":"System Prompt"}},"type":"object","required":["name","role","system_prompt"],"title":"AgentRegisterRequest"},"AgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"role":{"type":"string","title":"Role"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"created_at":{"type":"string","title":"Created At"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"status":{"type":"string","title":"Status","default":"offline"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},"type":"object","required":["id","name","address","role","description","system_prompt","created_at"],"title":"AgentResponse"},"AgentSetupResponse":{"properties":{"agent_md":{"type":"string","title":"Agent Md"},"claude_md":{"type":"string","title":"Claude Md"},"infiniti_md":{"type":"string","title":"Infiniti Md"},"instructions":{"type":"string","title":"Instructions"}},"type":"object","required":["agent_md","claude_md","infiniti_md","instructions"],"title":"AgentSetupResponse"},"AgentStats":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"role":{"type":"string","title":"Role"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"messages_received":{"type":"integer","title":"Messages Received","default":0},"messages_read":{"type":"integer","title":"Messages Read","default":0},"messages_unread":{"type":"integer","title":"Messages Unread","default":0},"messages_sent":{"type":"integer","title":"Messages Sent","default":0},"messages_replied":{"type":"integer","title":"Messages Replied","default":0},"messages_forwarded":{"type":"integer","title":"Messages Forwarded","default":0},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"status":{"type":"string","title":"Status","default":"offline"}},"type":"object","required":["agent_id","name","address","role"],"title":"AgentStats"},"AgentUpdateAddressRequest":{"properties":{"address":{"type":"string","title":"Address"}},"type":"object","required":["address"],"title":"AgentUpdateAddressRequest"},"AgentUpdateTagsRequest":{"properties":{"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["tags"],"title":"AgentUpdateTagsRequest"},"ApiKeyCreateRequest":{"properties":{"name":{"type":"string","title":"Name","default":""}},"type":"object","title":"ApiKeyCreateRequest"},"ApiKeyCreateResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"is_active":{"type":"boolean","title":"Is Active"},"raw_key":{"type":"string","title":"Raw Key"}},"type":"object","required":["id","name","key_prefix","created_at","last_used_at","is_active","raw_key"],"title":"ApiKeyCreateResponse"},"ApiKeyResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","name","key_prefix","created_at","last_used_at","is_active"],"title":"ApiKeyResponse"},"Body_upload_file_files_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_files_upload_post"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InviteCodeResponse":{"properties":{"code":{"type":"string","title":"Code"},"created_by":{"type":"string","title":"Created By"},"used_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Used By"},"used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Used At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["code","created_by","used_by","used_at","created_at"],"title":"InviteCodeResponse"},"LoginResponse":{"properties":{"token":{"type":"string","title":"Token"},"user":{"$ref":"#/components/schemas/UserResponse"}},"type":"object","required":["token","user"],"title":"LoginResponse"},"MemoryCreateRequest":{"properties":{"title":{"type":"string","maxLength":100,"minLength":1,"title":"Title"},"content":{"type":"string","maxLength":200000,"title":"Content"}},"type":"object","required":["title","content"],"title":"MemoryCreateRequest"},"MemoryResponse":{"properties":{"id":{"type":"string","title":"Id"},"team_id":{"type":"string","title":"Team Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"content_html":{"type":"string","title":"Content Html","default":""},"user_id":{"type":"string","title":"User Id"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"updated_by":{"type":"string","title":"Updated By"}},"type":"object","required":["id","team_id","title","content","user_id","created_at","updated_at","updated_by"],"title":"MemoryResponse"},"MemoryUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string","maxLength":200000},{"type":"null"}],"title":"Content"}},"type":"object","title":"MemoryUpdateRequest"},"MemoryUpsertRequest":{"properties":{"title":{"type":"string","maxLength":100,"minLength":1,"title":"Title"},"content":{"type":"string","maxLength":200000,"title":"Content"}},"type":"object","required":["title","content"],"title":"MemoryUpsertRequest"},"MessageResponse":{"properties":{"id":{"type":"string","title":"Id"},"thread_id":{"type":"string","title":"Thread Id"},"from_agent":{"type":"string","title":"From Agent"},"to_agent":{"type":"string","title":"To Agent"},"action":{"type":"string","title":"Action"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"body_html":{"type":"string","title":"Body Html"},"attachments":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array","title":"Attachments"},"is_read":{"type":"boolean","title":"Is Read"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","thread_id","from_agent","to_agent","action","subject","body","body_html","attachments","is_read","parent_id","created_at"],"title":"MessageResponse"},"RegistrationConfigResponse":{"properties":{"invite_required":{"type":"boolean","title":"Invite Required"}},"type":"object","required":["invite_required"],"title":"RegistrationConfigResponse"},"SearchResponse":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/SearchResultItem"},"type":"array","title":"Messages"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"},"query":{"type":"string","title":"Query"}},"type":"object","required":["messages","total","page","page_size","total_pages","query"],"title":"SearchResponse"},"SearchResultItem":{"properties":{"message_id":{"type":"string","title":"Message Id"},"thread_id":{"type":"string","title":"Thread Id"},"subject":{"type":"string","title":"Subject"},"body_snippet":{"type":"string","title":"Body Snippet"},"from_agent":{"type":"string","title":"From Agent"},"to_agent":{"type":"string","title":"To Agent"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["message_id","thread_id","subject","body_snippet","from_agent","to_agent","created_at"],"title":"SearchResultItem"},"SendRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"from_agent":{"type":"string","title":"From Agent"},"to_agent":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"To Agent"},"action":{"type":"string","title":"Action","default":"send"},"subject":{"type":"string","title":"Subject","default":""},"body":{"type":"string","title":"Body","default":""},"attachments":{"items":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"}]},"type":"array","title":"Attachments","default":[]},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"forward_scope":{"anyOf":[{"type":"string","enum":["message","thread"]},{"type":"null"}],"title":"Forward Scope"}},"type":"object","required":["agent_id","from_agent","to_agent"],"title":"SendRequest"},"SystemSettingsResponse":{"properties":{"invite_required":{"type":"boolean","title":"Invite Required"}},"type":"object","required":["invite_required"],"title":"SystemSettingsResponse"},"SystemSettingsUpdateRequest":{"properties":{"invite_required":{"type":"boolean","title":"Invite Required"}},"type":"object","required":["invite_required"],"title":"SystemSettingsUpdateRequest"},"TeamAddAgentRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id"}},"type":"object","required":["agent_id"],"title":"TeamAddAgentRequest"},"TeamCreateRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["name"],"title":"TeamCreateRequest"},"TeamDetailResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"user_id":{"type":"string","title":"User Id"},"created_at":{"type":"string","title":"Created At"},"agent_count":{"type":"integer","title":"Agent Count","default":0},"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Agents","default":[]}},"type":"object","required":["id","name","description","user_id","created_at"],"title":"TeamDetailResponse"},"TeamResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"user_id":{"type":"string","title":"User Id"},"created_at":{"type":"string","title":"Created At"},"agent_count":{"type":"integer","title":"Agent Count","default":0}},"type":"object","required":["id","name","description","user_id","created_at"],"title":"TeamResponse"},"TeamUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TeamUpdateRequest"},"ThreadArchiveStatus":{"properties":{"archived":{"type":"boolean","title":"Archived"},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["archived"],"title":"ThreadArchiveStatus"},"ThreadOperatorStatus":{"properties":{"archived":{"type":"boolean","title":"Archived"},"trashed":{"type":"boolean","title":"Trashed"},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived At"},"trashed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trashed At"}},"type":"object","required":["archived","trashed"],"title":"ThreadOperatorStatus","description":"Archive + trash flags for operator console thread actions."},"ThreadSummary":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"last_activity":{"type":"string","title":"Last Activity"},"message_count":{"type":"integer","title":"Message Count"},"unread_count":{"type":"integer","title":"Unread Count"},"preview_subject":{"type":"string","title":"Preview Subject","default":""},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived At"},"trashed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trashed At"}},"type":"object","required":["thread_id","last_activity","message_count","unread_count"],"title":"ThreadSummary"},"TrashedMessageDetail":{"properties":{"trashed_at":{"type":"string","title":"Trashed At"},"message":{"$ref":"#/components/schemas/MessageResponse"}},"type":"object","required":["trashed_at","message"],"title":"TrashedMessageDetail"},"TrashedMessageListItem":{"properties":{"message_id":{"type":"string","title":"Message Id"},"thread_id":{"type":"string","title":"Thread Id"},"trashed_at":{"type":"string","title":"Trashed At"},"from_agent":{"type":"string","title":"From Agent"},"to_agent":{"type":"string","title":"To Agent"},"action":{"type":"string","title":"Action"},"subject":{"type":"string","title":"Subject"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["message_id","thread_id","trashed_at","from_agent","to_agent","action","subject","created_at"],"title":"TrashedMessageListItem"},"UpdateFilterTagsRequest":{"properties":{"filter_tags":{"items":{"type":"string"},"type":"array","title":"Filter Tags"}},"type":"object","required":["filter_tags"],"title":"UpdateFilterTagsRequest"},"UserAgentCreateRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"address_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Local"},"role":{"type":"string","title":"Role","default":""},"description":{"type":"string","title":"Description","default":""},"system_prompt":{"type":"string","title":"System Prompt","default":""},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},"type":"object","required":["name"],"title":"UserAgentCreateRequest"},"UserAgentCreateResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"role":{"type":"string","title":"Role"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"status":{"type":"string","title":"Status","default":"active"},"created_at":{"type":"string","title":"Created At"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"api_key_masked":{"type":"string","title":"Api Key Masked","default":""},"api_key_plaintext":{"type":"string","title":"Api Key Plaintext"}},"type":"object","required":["id","name","address","role","description","system_prompt","created_at","api_key_plaintext"],"title":"UserAgentCreateResponse"},"UserAgentExportResponse":{"properties":{"filename":{"type":"string","title":"Filename"},"content":{"type":"string","title":"Content"}},"type":"object","required":["filename","content"],"title":"UserAgentExportResponse"},"UserAgentRegenerateKeyResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"api_key_masked":{"type":"string","title":"Api Key Masked"},"api_key_plaintext":{"type":"string","title":"Api Key Plaintext"}},"type":"object","required":["agent_id","api_key_masked","api_key_plaintext"],"title":"UserAgentRegenerateKeyResponse"},"UserAgentResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"address":{"type":"string","title":"Address"},"role":{"type":"string","title":"Role"},"description":{"type":"string","title":"Description"},"system_prompt":{"type":"string","title":"System Prompt"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"status":{"type":"string","title":"Status","default":"active"},"created_at":{"type":"string","title":"Created At"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"api_key_masked":{"type":"string","title":"Api Key Masked","default":""}},"type":"object","required":["id","name","address","role","description","system_prompt","created_at"],"title":"UserAgentResponse"},"UserAgentUpdateRequest":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"}},"type":"object","title":"UserAgentUpdateRequest"},"UserLoginRequest":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"}},"type":"object","required":["username","password"],"title":"UserLoginRequest"},"UserRegisterRequest":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"invite_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invite Code"}},"type":"object","required":["username","password"],"title":"UserRegisterRequest"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"username":{"type":"string","title":"Username"},"is_superadmin":{"type":"boolean","title":"Is Superadmin"},"created_at":{"type":"string","title":"Created At"},"filter_tags":{"items":{"type":"string"},"type":"array","title":"Filter Tags","default":[]}},"type":"object","required":["id","username","is_superadmin","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}