[{"data":1,"prerenderedAt":2967},["ShallowReactive",2],{"docs-page-cn-\u002Fcn\u002Fapi_docs\u002Fmessage\u002Fget_message":3,"openapi-data-dashboardApi-dashboard\u002Fapi-cn":21,"surround-cn-\u002Fcn\u002Fapi_docs\u002Fmessage\u002Fget_message":2448,"snippet-cn-get_message":2459},{"id":4,"title":5,"avatar":6,"banner":6,"body":7,"category":6,"desc":6,"description":11,"extension":14,"links":6,"meta":15,"navigation":6,"path":17,"seo":18,"stem":19,"__hash__":20},"docs\u002Fcn\u002Fapi_docs\u002Fmessage\u002Fget_message.md","Get Message",null,{"type":8,"value":9,"toc":10},"minimark",[],{"title":11,"searchDepth":12,"depth":12,"links":13},"",2,[],"md",{"openapi":16},"POST \u002Fget\u002Fmessage","\u002Fcn\u002Fapi_docs\u002Fmessage\u002Fget_message",{"title":5,"description":11},"cn\u002Fapi_docs\u002Fmessage\u002Fget_message","Q2Po6luHSl30WMTrmalcq7xZ0iaduQLeVMCAWBsj5xE",[22,1395],{"id":23,"extension":24,"meta":25,"stem":1393,"__hash__":1394},"dashboardApi\u002Fcn\u002Fapi_docs\u002Fapi.json","json",{"openapi":26,"info":27,"servers":31,"security":35,"paths":38,"components":365},"3.1.0",{"title":28,"description":29,"version":30},"MemOS Dashboard APIs","Dashboard API for managing messages and searching memories in MemOS.","1.0.0",[32],{"url":33,"description":34},"https:\u002F\u002Fmemos.memtensor.cn\u002Fapi\u002Fopenmem\u002Fv1","Production server",[36],{"TokenAuth":37},[],{"\u002Fadd\u002Fmessage":39,"\u002Fget\u002Fmessage":75,"\u002Fsearch\u002Fmemory":93,"\u002Fchat":129,"\u002Fget\u002Fmemory":167,"\u002Fdelete\u002Fmemory":183,"\u002Fadd\u002Ffeedback":199,"\u002Fextract\u002Fmemory":215,"\u002Frerank":244,"\u002Fget\u002Fstatus":269,"\u002Fcreate\u002Fknowledgebase":285,"\u002Fdelete\u002Fknowledgebase":301,"\u002Fadd\u002Fknowledgebase-file":317,"\u002Fget\u002Fknowledgebase-file":333,"\u002Fdelete\u002Fknowledgebase-file":349},{"post":40},{"summary":41,"description":42,"operationId":43,"requestBody":44,"responses":68},"Add Message","该接口用于添加会话消息，支持多类型内容、批量添加。MemOS 会自动解析消息并处理记忆，用于后续对话时召回参考。","add_message",{"required":45,"content":46},true,{"application\u002Fjson":47},{"schema":48,"example":50},{"$ref":49},"#\u002Fcomponents\u002Fschemas\u002FAddMessageRequest",{"user_id":51,"conversation_id":52,"messages":53},"memos_user_123","0610",[54,57,60,62,64,66],{"role":55,"content":56},"user","我想暑假出去玩，你能帮我推荐下吗？",{"role":58,"content":59},"assistant","好的！是自己出行还是和家人朋友一起呢？",{"role":55,"content":61},"肯定要带孩子啊，我们家出门都是全家一起。",{"role":58,"content":63},"明白了，所以你们是父母带孩子一块儿旅行，对吗？",{"role":55,"content":65},"对，带上孩子和老人，一般都是全家行动。",{"role":58,"content":67},"收到，那我会帮你推荐适合家庭出游的目的地。",{"200":69},{"description":70,"content":71},"Successful Response",{"application\u002Fjson":72},{"schema":73},{"$ref":74},"#\u002Fcomponents\u002Fschemas\u002FAddMessageResponse",{"post":76},{"summary":5,"description":77,"operationId":78,"requestBody":79,"responses":87},"该接口用于获取指定会话的用户与助手历史对话记录，可按数量限制返回结果。","get_message",{"required":45,"content":80},{"application\u002Fjson":81},{"schema":82,"example":84},{"$ref":83},"#\u002Fcomponents\u002Fschemas\u002FGetMessageRequest",{"user_id":51,"conversation_id":85,"message_limit_number":86},"0928",6,{"200":88},{"description":70,"content":89},{"application\u002Fjson":90},{"schema":91},{"$ref":92},"#\u002Fcomponents\u002Fschemas\u002FGetMessageResponse",{"post":94},{"summary":95,"description":96,"operationId":97,"requestBody":98,"responses":123},"Search Memory","该接口用于检索指定用户的记忆，返回与输入查询内容最相关的记忆片段，供 Agent 使用。召回的记忆片段包括“事实记忆”、“偏好记忆”、“工具记忆”和“技能 Skill”。Skill 既可以来自用户对话自动生成，也可以来自知识库中上传的自定义 Skill 文件。","search_memory",{"required":45,"content":99},{"application\u002Fjson":100},{"schema":101,"example":103},{"$ref":102},"#\u002Fcomponents\u002Fschemas\u002FSearchMemoryRequest",{"query":104,"user_id":51,"conversation_id":85,"knowledgebase_ids":105,"filter":107},"帮我总结今年和阅读相关的记忆",[106],"kb_xxx",{"knowledgebase":108,"user":119},{"and":109},[110,113,116],{"tags":111},{"contains":112},"阅读",{"create_time":114},{"gte":115},"2025-01-01",{"create_time":117},{"lte":118},"2025-12-31",{"and":120},[121],{"scene":122},"chat",{"200":124},{"description":70,"content":125},{"application\u002Fjson":126},{"schema":127},{"$ref":128},"#\u002Fcomponents\u002Fschemas\u002FSearchMemoryResponse",{"post":130},{"summary":131,"description":11,"operationId":122,"requestBody":132,"responses":158},"Chat",{"required":45,"content":133},{"application\u002Fjson":134},{"schema":135,"example":137},{"$ref":136},"#\u002Fcomponents\u002Fschemas\u002FChatRequest",{"user_id":51,"stream":138,"query":139,"model_name":140,"conversation_id":141,"knowledgebase_ids":142,"filter":144,"system_prompt":149,"add_message_on_answer":138,"allow_public":138,"allow_knowledgebase_ids":150,"agent_id":151,"app_id":152,"tags":153,"info":154,"max_tokens":155,"temperature":156,"top_p":157},false,"上海有哪些好玩的","deepseek-r1","23006762-a064-456e-a33b-d2452bdfa09f",[143],"2448808afa784cc5f7595da21ae5a3fd",{"and":145},[146],{"create_time":147},{"gt":148},"2025-09-19","推荐公园",[],"agent_id_2025-12-15-01","app_id_2025-12-15-01",[],{},8192,0.7,0.95,{"200":159},{"description":70,"content":160},{"application\u002Fjson":161,"text\u002Fevent-stream":164},{"schema":162},{"$ref":163},"#\u002Fcomponents\u002Fschemas\u002FChatResponse",{"schema":165},{"$ref":166},"#\u002Fcomponents\u002Fschemas\u002FChatStreamResponse",{"post":168},{"summary":169,"description":170,"operationId":171,"requestBody":172,"responses":177},"Get Memory","该接口用于获取某个用户的记忆，包含事实记忆、偏好记忆与工具记忆。","get_memory",{"required":45,"content":173},{"application\u002Fjson":174},{"schema":175},{"$ref":176},"#\u002Fcomponents\u002Fschemas\u002FGetMemoryRequest",{"200":178},{"description":70,"content":179},{"application\u002Fjson":180},{"schema":181},{"$ref":182},"#\u002Fcomponents\u002Fschemas\u002FGetMemoryResponse",{"post":184},{"summary":185,"description":186,"operationId":187,"requestBody":188,"responses":193},"Delete Memory","该接口用于删除指定用户的记忆，支持批量删除。","delete_memory",{"required":45,"content":189},{"application\u002Fjson":190},{"schema":191},{"$ref":192},"#\u002Fcomponents\u002Fschemas\u002FDeleteMemoryRequest",{"200":194},{"description":70,"content":195},{"application\u002Fjson":196},{"schema":197},{"$ref":198},"#\u002Fcomponents\u002Fschemas\u002FDeleteMemoryResponse",{"post":200},{"summary":201,"description":202,"operationId":203,"requestBody":204,"responses":209},"Add Feedback","该接口用于添加对当前会话消息的反馈，MemOS能够基于用户的反馈更正记忆。","add_feedback",{"required":45,"content":205},{"application\u002Fjson":206},{"schema":207},{"$ref":208},"#\u002Fcomponents\u002Fschemas\u002FAddFeedbackRequest",{"200":210},{"description":70,"content":211},{"application\u002Fjson":212},{"schema":213},{"$ref":214},"#\u002Fcomponents\u002Fschemas\u002FAddFeedbackResponse",{"post":216},{"summary":217,"description":218,"operationId":219,"requestBody":220,"responses":238},"Extract Memory","基于 MemOS 自研抽取模型，从对话消息中直接抽取并返回事实与偏好记忆。","extract_memory",{"required":45,"content":221},{"application\u002Fjson":222},{"schema":223,"example":225},{"$ref":224},"#\u002Fcomponents\u002Fschemas\u002FExtractMemoryRequest",{"messages":226,"extraction_types":235},[227,229,231,233],{"role":55,"content":228},"我暑假定好去广州旅游，住宿的话有哪些连锁酒店可选？",{"role":58,"content":230},"您可以考虑【七天、全季、希尔顿】等等",{"role":55,"content":232},"我选七天",{"role":58,"content":234},"好的，有其他问题再问我。",[236,237],"memory","preference",{"200":239},{"description":70,"content":240},{"application\u002Fjson":241},{"schema":242},{"$ref":243},"#\u002Fcomponents\u002Fschemas\u002FExtractMemoryResponse",{"post":245},{"summary":246,"description":247,"operationId":248,"requestBody":249,"responses":263},"Rerank Memory","提供记忆重排接口，基于 memos-reranker 小模型，传入用户查询与候选记忆列表，一键完成记忆相关性重排。","rerank",{"required":45,"content":250},{"application\u002Fjson":251},{"schema":252,"example":254},{"$ref":253},"#\u002Fcomponents\u002Fschemas\u002FRerankRequest",{"model":255,"query":256,"documents":257},"memos-reranker-0.6b","用户有什么兴趣爱好",[258,259,260,261,262],"用户喜欢打羽毛球","用户在杭州做后端开发","用户偏好简洁的回复风格","用户比较喜欢酱香型白酒","用户下周三要去北京出差",{"200":264},{"description":70,"content":265},{"application\u002Fjson":266},{"schema":267},{"$ref":268},"#\u002Fcomponents\u002Fschemas\u002FRerankResponse",{"post":270},{"summary":271,"description":272,"operationId":273,"requestBody":274,"responses":279},"Get Task Status","获取异步处理任务的状态。","get_status",{"required":45,"content":275},{"application\u002Fjson":276},{"schema":277},{"$ref":278},"#\u002Fcomponents\u002Fschemas\u002FGetStatusRequest",{"200":280},{"description":70,"content":281},{"application\u002Fjson":282},{"schema":283},{"$ref":284},"#\u002Fcomponents\u002Fschemas\u002FGetStatusResponse",{"post":286},{"summary":287,"description":288,"operationId":289,"requestBody":290,"responses":295},"创建知识库","创建与项目关联的知识库","create_knowledgebase",{"required":45,"content":291},{"application\u002Fjson":292},{"schema":293},{"$ref":294},"#\u002Fcomponents\u002Fschemas\u002FCreateKnowledgebaseRequest",{"200":296},{"description":70,"content":297},{"application\u002Fjson":298},{"schema":299},{"$ref":300},"#\u002Fcomponents\u002Fschemas\u002FCreateKnowledgebaseResponse",{"post":302},{"summary":303,"description":304,"operationId":305,"requestBody":306,"responses":311},"移除知识库","从当前项目中移除知识库，彻底删除知识库需从控制台-知识库页面操作。","delete_knowledgebase",{"required":45,"content":307},{"application\u002Fjson":308},{"schema":309},{"$ref":310},"#\u002Fcomponents\u002Fschemas\u002FDeleteKnowledgebaseRequest",{"200":312},{"description":70,"content":313},{"application\u002Fjson":314},{"schema":315},{"$ref":316},"#\u002Fcomponents\u002Fschemas\u002FDeleteKnowledgebaseResponse",{"post":318},{"summary":319,"description":320,"operationId":321,"requestBody":322,"responses":327},"添加知识库文件","向指定知识库上传文件。默认上传普通文档；当 file[].type 为 skill 时，上传 Markdown Skill 文件或 ZIP 技能包。","add_knowledgebase-file",{"required":45,"content":323},{"application\u002Fjson":324},{"schema":325},{"$ref":326},"#\u002Fcomponents\u002Fschemas\u002FUploadFileRequest",{"200":328},{"description":70,"content":329},{"application\u002Fjson":330},{"schema":331},{"$ref":332},"#\u002Fcomponents\u002Fschemas\u002FUploadFileResponse",{"post":334},{"summary":335,"description":336,"operationId":337,"requestBody":338,"responses":343},"获取知识库文件","通过两种方式获取文件信息：传 file_ids 获取指定文件详情，或传 knowledgebase_id 获取某个知识库下的文件列表。两种方式只能选择一种；同时传 knowledgebase_id 和 file_ids 会报错。","get_knowledgebase-file",{"required":45,"content":339},{"application\u002Fjson":340},{"schema":341},{"$ref":342},"#\u002Fcomponents\u002Fschemas\u002FGetFileRequest",{"200":344},{"description":70,"content":345},{"application\u002Fjson":346},{"schema":347},{"$ref":348},"#\u002Fcomponents\u002Fschemas\u002FGetFileResponse",{"post":350},{"summary":351,"description":352,"operationId":353,"requestBody":354,"responses":359},"删除知识库文件","从指定知识库中删除文件。删除 Skill 文件时，与该文件关联的 Skill 会同步删除。","delete_knowledgebase-file",{"required":45,"content":355},{"application\u002Fjson":356},{"schema":357},{"$ref":358},"#\u002Fcomponents\u002Fschemas\u002FDeleteFileRequest",{"200":360},{"description":70,"content":361},{"application\u002Fjson":362},{"schema":363},{"$ref":364},"#\u002Fcomponents\u002Fschemas\u002FDeleteFileResponse",{"securitySchemes":366,"schemas":372},{"TokenAuth":367},{"type":368,"name":369,"in":370,"description":371},"apiKey","Authorization","header","Token API_key，可在 \u003Ca href=\"https:\u002F\u002Fmemos-dashboard.openmem.net\u002Fapikeys\u002F\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\" target=\"_blank\">API 控制台>接口密钥\u003C\u002Fa> 中查看",{"ChatRequest":373,"ChatResponseData":465,"ChatResponse":471,"ChatStreamResponse":485,"MessageInput":501,"AddMessageRequest":563,"OpenMemAddMessageResponse":601,"AddMessageResponse":617,"GetMessageRequest":628,"MessageDetail":639,"GetMessageResponseData":653,"GetMessageResponse":661,"SearchMemoryRequest":669,"MemoryDetail":703,"PreferenceDetail":741,"ToolUsedStatus":769,"ToolMemoryDetail":784,"SkillValue":817,"SkillDetail":844,"SearchMemoryResponseData":876,"SearchMemoryResponse":902,"GetMemoryRequest":910,"GetMemoryResponseData":930,"GetMemoryResponse":1017,"DeleteMemoryRequest":1026,"DeleteMemoryResponse":1035,"AddFeedbackRequest":1047,"AddFeedbackResponse":1071,"GetStatusRequest":1086,"GetStatusResponse":1093,"CreateKnowledgebaseRequest":1103,"CreateKnowledgebaseResponse":1114,"DeleteKnowledgebaseRequest":1125,"DeleteKnowledgebaseResponse":1133,"UploadFileRequest":1143,"UploadFileResponse":1164,"GetFileRequest":1188,"GetFileResponse":1207,"DeleteFileRequest":1235,"DeleteFileResponse":1243,"ExtractMemoryItem":1252,"ExtractPreferenceItem":1270,"ExtractMemoryResponseData":1282,"ExtractMemoryMessage":1295,"RerankRequest":1302,"RerankResult":1321,"RerankResponse":1341,"ExtractMemoryRequest":1372,"ExtractMemoryResponse":1385},{"type":374,"required":375,"properties":379,"title":464},"object",[376,377,378],"user_id","conversation_id","query",{"user_id":380,"conversation_id":384,"query":387,"filter":390,"knowledgebase_ids":394,"memory_limit_number":399,"include_preference":404,"preference_limit_number":408,"relativity":411,"model_name":418,"system_prompt":425,"stream":428,"max_tokens":431,"temperature":434,"top_p":437,"add_message_on_answer":440,"app_id":443,"agent_id":446,"tags":449,"info":453,"allow_public":457,"allow_knowledgebase_ids":460},{"type":381,"title":382,"description":383},"string","User ID","对话内容所关联的用户唯一标识符。",{"type":381,"title":385,"description":386},"Conversation ID","对话内容所在会话的唯一标识符，传入可明确当前会话，本会话的记忆应当比其他历史会话的权重高；不传可跨会话检索相关记忆，得到相关性更高的模型回答。",{"type":381,"title":388,"description":389},"Query","用户输入的对话内容。",{"type":374,"title":391,"description":392,"example":393},"Filter","记忆过滤的条件，用于在检索记忆前精确限定记忆范围。可用字段包括：\"agent_id\", \"app_id\", \"create_time\", \"update_time\"与\"info\"中的字段。支持逻辑运算符（and，or）和比较运算符（gte、lte、gt、lt）。对于\"info\"字段，支持过滤传入的\"business_type\", \"biz_id\", \"scene\"和其他自定义字段。","{\"and\": [{\"create_time\":{\"gte\":\"...\"}}]}",{"type":395,"items":396,"title":397,"description":398},"array",{"type":381},"Knowledgebase IDs","该字段用于限制当次搜索可访问的知识库范围，默认为空（即不检索任何知识库）。传入具体知识库 ID，则可检索指定知识库中的普通文档和已上传的 Skill；传入 all，则可检索该项目下所有关联知识库。",{"type":400,"title":401,"description":402,"default":403},"integer","Memory Limit Number","召回的事实记忆条数上限，在满足相关性阈值（relativity）的前提下最多返回该数量的记忆，不保证返回固定条数。默认值 9，最大值 25。",9,{"type":405,"title":406,"description":407,"default":45},"boolean","Include Preference","是否要召回偏好记忆，开启后系统会根据查询内容智能召回与用户偏好相关的记忆。默认 =true",{"type":400,"title":409,"description":410,"default":403},"Preference Limit Number","召回的偏好记忆条数上限，在满足相关性阈值（relativity）的前提下最多返回该数量的记忆，不保证返回固定条数。默认值 9，最大值 25。",{"type":412,"minimum":413,"maximum":414,"title":415,"description":416,"default":417},"number",0,1,"Relativity","召回记忆的相关性阈值（0~1）。用于过滤低相关记忆，并与限定返回的事实、偏好记忆最大条数，共同约束最终返回结果。不传时使用系统默认阈值，取值为0时表示不进行相关性过滤。",0.45,{"type":381,"enum":419,"title":422,"description":423,"default":424},[420,140,421],"qwen3-32b","qwen2.5-72b-instruct","Model Name","指定具体对话模型。","qwen2.5-72B-Instruct",{"type":381,"title":426,"description":427},"System Prompt","自定义系统指令。",{"type":405,"title":429,"description":430,"default":138},"Stream","是否启用流式返回。",{"type":400,"title":432,"description":433,"default":155},"Max Tokens","表示最大生成 token 数。",{"type":412,"title":435,"description":436,"default":156},"Temperature","控制生成随机性。取值范围：0 ≤ x ≤ 2",{"type":412,"title":438,"description":439,"default":157},"Top P","Nucleus 采样参数。取值范围：0 ≤ x ≤ 1",{"type":405,"title":441,"description":442,"default":45},"Add Message On Answer","是否自动将用户与助手的会话内容写入记忆。启用后，开发者无需再调用add\u002Fmessage接口添加消息为记忆。",{"type":381,"title":444,"description":445},"App ID","对话内容所关联的应用唯一标识符。",{"type":381,"title":447,"description":448},"Agent ID","对话内容所关联的Agent唯一标识符。",{"type":395,"items":450,"title":451,"description":452},{"type":381},"Tags","自定义标签列表，用于标记对话内容的主题或分类。",{"type":374,"additionalProperties":454,"title":455,"description":456},{"type":381},"Info","自定义元信息字段，能够存储任意与对话内容相关的结构化数据，例如位置、来源、版本等，主要用于在检索时精确过滤或追踪来源。",{"type":405,"title":458,"description":459,"default":138},"Allow Public","是否允许加入公共记忆。",{"type":395,"items":461,"title":462,"description":463},{"type":381},"Allow Knowledgebase IDs","添加的消息产生的记忆允许被写入的知识库列表。","ChatRequest",{"type":374,"title":466,"properties":467},"ChatResponseData",{"response":468},{"type":381,"title":469,"description":470},"Response","回答的具体内容。",{"type":374,"required":472,"properties":475,"title":484},[473,474],"code","message",{"code":476,"data":479,"message":481},{"type":400,"title":477,"description":478},"Code","接口状态码，更多内容可查阅\u003Ca href=\"\u002Fapi_docs\u002Fhelp\u002Ferror_codes\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\">错误码列表\u003C\u002Fa>了解详情。",{"$ref":480},"#\u002Fcomponents\u002Fschemas\u002FChatResponseData",{"type":381,"title":482,"description":483},"Message","提示信息","ChatResponse",{"type":374,"properties":486,"title":500},{"event":487,"data":489},{"type":381,"description":488,"default":474},"流式事件名称，当前默认为 message。",{"type":374,"description":490,"properties":491},"流式返回的数据内容。",{"type":492,"data":498},{"type":381,"description":493,"enum":494},"流式消息类型，用于标识当前数据的语义类别。\u003Cbr>reasoning：推理内容\u003Cbr>text：正常文本内容\u003Cbr>end：流式结束标识",[495,496,497],"reasoning","text","end",{"type":381,"description":499},"流式返回的文本内容。","ChatStreamResponse",{"type":374,"required":502,"properties":505,"title":562},[503,504],"role","content",{"chat_time":506,"role":509,"content":515,"tool_call_id":543,"tool_calls":545},{"type":381,"title":507,"description":508},"Chat Time","对话发生的时间，可传入结构化时间或中文时间描述。传入该参数能够让记忆携带时间信息。",{"type":381,"enum":510,"title":513,"description":514},[55,58,511,512],"system","tool","Role","消息创建者的角色。",{"oneOf":516,"description":542},[517,519],{"type":381,"description":518},"消息文本内容",{"type":395,"items":520,"description":541},{"type":374,"properties":521,"required":539},{"type":522,"text":527,"image_url":529,"file":534},{"type":381,"enum":523,"description":526},[496,524,525],"image_url","file","发送的消息类型",{"type":381,"description":528},"文本消息内容。type为text时必填。",{"type":374,"description":530,"properties":531},"图片消息内容对象。",{"url":532},{"type":381,"description":533},"图片消息URL。type为image_url时必填。",{"type":374,"description":535,"properties":536},"文件消息内容对象。",{"file_data":537},{"type":381,"description":538},"可访问的文件URL或者base64, 只支持七种类型txt \u002F pdf \u002F doc \u002F docx \u002F json \u002F md \u002F xml， 单文件不超过100MB、500页，总数不超过20个。type为file时必填。注意：该接口的总输入上限为20,000 Tokens。",[540],"type","多模态内容列表","消息内容文本。",{"type":381,"description":544},"role为tool时，工具调用消息的唯一标识。",{"type":395,"items":546,"description":561},{"type":374,"properties":547},{"id":548,"type":550,"function":554},{"type":381,"description":549},"工具调用的唯一标识，用于关联本次工具调用。tool_calls中必填。",{"type":381,"description":551,"enum":552},"工具调用类型，当前仅支持 function。tool_calls中必填。",[553],"function",{"type":374,"description":555,"properties":556},"被调用的工具定义，tool_calls中必填。",{"name":557,"arguments":559},{"type":381,"description":558},"工具（函数）名称，tool_calls中必填。",{"type":381,"description":560},"工具调用参数，需为 JSON 格式的字符串，tool_calls中必填。","role为assistant时，工具调用信息列表，用于在触发工具调用时传递。","MessageInput",{"type":374,"required":564,"properties":566,"title":600},[376,377,565],"messages",{"user_id":567,"conversation_id":569,"messages":571,"agent_id":576,"app_id":578,"tags":580,"info":584,"allow_public":592,"allow_knowledgebase_ids":594,"async_mode":598},{"type":381,"title":382,"description":568},"添加的消息所关联的用户唯一标识符。",{"type":381,"title":385,"description":570},"添加的消息所关联的会话唯一标识符，相同conversation_id下的多轮消息会被识别为同一上下文。",{"type":395,"title":572,"description":573,"items":574},"Messages","添加的消息对象数组，数组中所有消息的总token数上限为20k。",{"$ref":575},"#\u002Fcomponents\u002Fschemas\u002FMessageInput",{"type":381,"description":577},"添加的消息所关联的 Agent 唯一标识符，主要用于在检索记忆时查询某用户与该Agent的专属记忆。",{"type":381,"description":579},"添加的消息所关联的应用唯一标识符，主要用于在检索记忆时查询某用户在该App下的专属记忆。",{"type":395,"items":581,"description":582,"default":583},{"type":381},"自定义标签列表，用于标记添加消息的主题或分类。",[],{"type":374,"additionalProperties":585,"description":591},{"oneOf":586},[587,588,590],{"type":381},{"type":395,"items":589},{"type":381},{"type":412},"自定义元信息字段，能够存储任意与添加信息相关的结构化数据，例如位置、来源、版本等，主要用于在检索时精确过滤或追踪来源。",{"type":405,"description":593,"default":138},"添加的消息产生的记忆是否允许写入公共记忆库。开启后，生成的记忆可被项目下的其他用户检索。",{"type":395,"items":595,"description":596,"default":597},{"type":381},"添加的消息，产生的记忆允许被写入的知识库范围。",[],{"type":405,"description":599,"default":45},"是否启用异步添加记忆。开启后，记忆将在后台异步添加，避免阻塞调用链。","AddMessageRequest",{"type":374,"properties":602,"title":616},{"success":603,"task_id":606,"status":609},{"type":405,"title":604,"description":605,"example":45},"Success","是否添加成功。true表示成功，false表示失败。",{"type":381,"title":607,"description":608},"Task ID","记忆处理任务的唯一标识。",{"type":381,"title":610,"enum":611,"description":615},"Status",[612,613,614],"running","completed","failed","记忆处理任务当前的状态。","OpenMemAddMessageResponse",{"type":374,"required":618,"properties":619,"title":627},[473,474],{"code":620,"data":622,"message":624},{"type":400,"format":621,"title":477,"description":478,"example":413},"int32",{"$ref":623},"#\u002Fcomponents\u002Fschemas\u002FOpenMemAddMessageResponse",{"type":381,"title":482,"description":625,"example":626},"接口提示信息。","ok","AddMessageResponse",{"type":374,"required":629,"properties":630,"title":638},[376,377],{"user_id":631,"conversation_id":633,"message_limit_number":635},{"type":381,"title":382,"description":632},"与获取消息关联的用户的唯一标识符。",{"type":381,"title":385,"description":634},"与获取消息关联的会话的唯一标识符。",{"type":400,"format":621,"title":636,"description":637,"default":86},"Message Limit Number","限定返回的消息条数，用于控制消息列表的长度，不传时使用系统默认值6，最大值为50","GetMessageRequest",{"type":374,"properties":640,"title":652},{"role":641,"content":644,"create_time":646,"update_time":649},{"type":381,"enum":642,"title":513,"description":643,"example":55},[55,58],"消息发送者的角色。",{"type":381,"title":645,"description":542},"Content",{"type":381,"title":647,"description":648},"Create Time","消息创建时间。",{"type":381,"title":650,"description":651},"Update Time","消息最近一次更新时间。","MessageDetail",{"type":374,"properties":654,"title":660},{"message_detail_list":655},{"type":395,"title":656,"description":657,"items":658},"Message Detail List","消息添加结果对象。",{"$ref":659},"#\u002Fcomponents\u002Fschemas\u002FMessageDetail","GetMessageResponseData",{"type":374,"required":662,"properties":663,"title":668},[473,474],{"code":664,"data":665,"message":667},{"type":400,"format":621,"title":477,"description":478,"example":413},{"$ref":666},"#\u002Fcomponents\u002Fschemas\u002FGetMessageResponseData",{"type":381,"title":482,"description":625},"GetMessageResponse",{"type":374,"required":670,"properties":671,"title":702},[376,378],{"user_id":672,"conversation_id":674,"query":676,"filter":678,"knowledgebase_ids":681,"memory_limit_number":684,"include_preference":686,"preference_limit_number":688,"include_tool_memory":689,"tool_memory_limit_number":692,"include_skill":695,"skill_limit_number":698,"relativity":701},{"type":381,"title":382,"description":673},"与查询的记忆关联的用户的唯一标识符。",{"type":381,"title":385,"description":675},"查询内容所在会话的唯一标识符，传入可以明确当前会话，本会话的记忆应当比其他历史会话的权重高。",{"type":381,"title":388,"description":677},"要在记忆中查询的文本内容，单次查询文本的token上限为20k。",{"type":374,"title":391,"description":679,"example":680},"记忆过滤条件，用于在检索前精确限定候选记忆范围。支持两种写法：直接传入由 and\u002For 组成的全局过滤条件；或按记忆来源分别传入 knowledgebase、user、public 过滤条件。可用字段包括 agent_id、app_id、tags、create_time、update_time，以及添加消息时通过 info 写入的 business_type、biz_id、scene 等自定义字段。info 中的字段在 filter 中直接按字段名使用，例如 {\"scene\":\"chat\"}，不需要包一层 info。支持比较运算符 gte、lte、gt、lt，以及 tags.contains。","{\"knowledgebase\":{\"and\":[{\"tags\":{\"contains\":\"阅读\"}},{\"create_time\":{\"gte\":\"2025-01-01\"}},{\"create_time\":{\"lte\":\"2025-12-31\"}}]},\"user\":{\"and\":[{\"scene\":\"chat\"}]}}",{"type":395,"items":682,"description":683},{"type":381},"该字段用于限制当次搜索可访问的知识库范围，默认为空（即不检索任何知识库）。传入具体知识库 ID，则可检索指定的知识库；传入all，则可检索该项目下所有关联知识库。",{"type":400,"format":621,"title":401,"description":685,"default":403},"召回的记忆条数上限，在满足相关性阈值（relativity）的前提下最多返回该数量的记忆，不保证返回固定条数。默认值 9，最大值 25。",{"type":405,"title":406,"description":687,"default":45},"是否启用偏好记忆召回。开启后，将根据查询的内容智能召回用户的偏好记忆。不传时该功能默认开启。",{"type":400,"format":621,"title":409,"description":410,"default":403},{"type":405,"title":690,"description":691,"default":138},"Include Tool Memory","是否启用工具记忆召回。开启后，系统会根据查询内容智能召回工具相关的记忆。不传时该功能默认关闭。",{"type":400,"format":621,"title":693,"description":694,"default":86},"Tool Memroy Limit Number","限定返回的工具记忆条数，用于控制召回的工具记忆个数,仅在 include_tool_memory=true 时生效。不传时使用系统默认值6，最大值为25。",{"type":405,"title":696,"description":697},"Include Skill","是否启用技能（Skill）召回。开启后，系统会根据查询内容召回相关 Skill，包括用户对话自动生成的个性化 Skill，以及 knowledgebase_ids 范围内上传的自定义 Skill。不传时该功能默认关闭。",{"type":400,"format":621,"title":699,"description":700},"Skill Limit Number","限定返回的技能（Skill）条数，用于控制召回的技能个数,仅在 include_skill=true 时生效。不传时使用系统默认值6，最大值为25。",{"type":412,"minimum":413,"maximum":414,"title":415,"description":416,"default":417},"SearchMemoryRequest",{"type":374,"properties":704,"title":740},{"id":705,"memory_key":708,"memory_value":711,"memory_type":714,"create_time":721,"conversation_id":723,"status":725,"confidence":729,"tags":732,"update_time":735,"relativity":737},{"type":381,"title":706,"description":707},"ID","事实记忆的唯一标识符，系统内部用于区分不同的记忆条目。",{"type":381,"title":709,"description":710},"Memory Key","事实记忆的标题或关键词，用于概括该事实记忆的主要内容。",{"type":381,"title":712,"description":713},"Memory Value","事实记忆的具体内容。",{"type":381,"enum":715,"title":719,"description":720,"example":717},[716,717,718],"WorkingMemory","LongTermMemory","UserMemory","Memory Type","事实记忆类型。\u003Cbr>WorkingMemory：工作记忆，临时存储的短期信息。\u003Cbr>LongTermMemory：长期记忆，持久保存的重要信息或事实。\u003Cbr>UserMemory：用户记忆，与特定用户相关的个性化信息。",{"type":381,"title":647,"description":722},"事实记忆内容创建的时间，通常为 ISO 8601 格式。",{"type":381,"title":385,"description":724},"与该事实记忆关联的会话的唯一标识符。",{"type":381,"enum":726,"title":610,"description":728,"example":727},[727],"activated","事实记忆的状态，当前所有检索到的事实记忆都是activated。\u003Cbr>activated：激活状态，当前可检索和使用的事实记忆。",{"type":412,"minimum":413,"maximum":414,"title":730,"description":731,"example":157},"Confidence","事实记忆的置信度分数，范围 0~1，数值越接近 1 表示该事实记忆越准确可靠。\u003Cbr>置信度分数会随着模型对该事实记忆的推理次数增加而逐渐衰减，用于反映事实记忆随着时间或使用频率可能产生的不确定性。",{"type":395,"title":451,"description":733,"items":734},"与事实记忆相关的标签列表，用于分类、检索或主题标记。数组中的每个元素都是string，例如 [\"人物\", \"事件\", \"工作\"]。",{"type":381},{"type":381,"title":650,"description":736},"事实记忆最后一次被修改或更新的时间，通常为 ISO 8601 格式。",{"type":412,"minimum":413,"maximum":414,"title":415,"description":738,"example":739},"查询内容与该事实记忆的相关性分数，范围 0~1，数值越接近 1 表示越相关。",0.87,"MemoryDetail",{"type":374,"properties":742,"title":768},{"id":743,"preference_type":745,"preference":751,"reasoning":754,"create_time":757,"conversation_id":759,"status":761,"update_time":764,"relativity":766},{"type":381,"title":706,"description":744},"偏好记忆的唯一标识符，系统内部用于区分不同的记忆条目。",{"type":381,"enum":746,"title":749,"description":750,"example":747},[747,748],"explicit_preference","implicit_preference","Preference Type","偏好记忆类型。\u003Cbr>explicit_preference：显式偏好记忆。\u003Cbr>implicit_preference：隐式偏好记忆。",{"type":381,"title":752,"description":753},"Preference","偏好记忆的具体内容。",{"type":381,"title":755,"description":756},"Reasoning","偏好记忆提取的原因。",{"type":381,"title":647,"description":758},"偏好记忆内容创建的时间，通常为 ISO 8601 格式。",{"type":381,"title":385,"description":760},"与该偏好记忆关联的会话的唯一标识符。",{"type":381,"enum":762,"title":610,"description":763,"example":727},[727],"偏好记忆的状态，当前所有检索到的偏好记忆都是activated。\u003Cbr>activated：激活状态，当前可检索和使用的事实记忆。",{"type":381,"title":650,"description":765},"偏好记忆最后一次被修改或更新的时间，通常为 ISO 8601 格式。",{"type":412,"minimum":413,"maximum":414,"title":415,"description":767,"example":739},"查询内容与该偏好记忆的相关性分数，范围 0~1，数值越接近 1 表示越相关。","PreferenceDetail",{"type":374,"properties":770,"title":783},{"used_tool":771,"error_type":774,"success_rate":777,"tool_experience":780},{"type":381,"title":772,"description":773},"Used Tool","使用的工具名称。",{"type":381,"title":775,"description":776},"Error Type","调用失败时的错误描述。",{"type":412,"title":778,"description":779},"Success Rate","本次工具轨迹的成功率。",{"type":381,"title":781,"description":782},"Tool Experience","当前轨迹中该工具的经验。","ToolUsedStatus",{"type":374,"properties":785,"title":816},{"id":786,"tool_type":788,"tool_value":794,"tool_used_status":797,"create_time":802,"conversation_id":804,"status":806,"update_time":809,"relativity":811,"experience":813},{"type":381,"title":706,"description":787},"工具记忆片段的唯一标识符。",{"type":381,"title":789,"description":790,"enum":791},"Tool Type","工具记忆类型。ToolTrajectoryMemory 表示工具轨迹记忆；ToolSchema 表示工具信息记忆。",[792,793],"ToolTrajectoryMemory","ToolSchema",{"type":381,"title":795,"description":796},"Tool Value","工具记忆的具体内容。",{"type":395,"title":798,"description":799,"items":800},"Tool Used Status","工具轨迹记忆列表，每条记录包含使用的工具及经验信息。",{"$ref":801},"#\u002Fcomponents\u002Fschemas\u002FToolUsedStatus",{"type":381,"title":647,"description":803},"工具记忆创建时间（ISO 8601 格式）。",{"type":381,"title":385,"description":805},"与该工具记忆关联的会话唯一标识符。",{"type":381,"title":610,"description":807,"enum":808},"工具记忆状态，当前为 activated。",[727],{"type":381,"title":650,"description":810},"工具记忆最后一次更新的时间（ISO 8601 格式）。",{"type":412,"title":415,"description":812},"工具记忆与查询内容的相关性分数。",{"type":381,"title":814,"description":815},"Experience","整个轨迹的程序性经验，作为指导任务完成的总体经验。","ToolMemoryDetail",{"type":374,"properties":818},{"name":819,"description":822,"procedure":825,"experience":828,"preference":831,"examples":834,"script":838,"others":841},{"type":381,"title":820,"description":821},"Name","技能 Skill 的名称，用于展示与识别该能力。",{"type":381,"title":823,"description":824},"Description","技能 Skill 的描述。",{"type":381,"title":826,"description":827},"Procedure","完成该任务的推荐流程或操作步骤。",{"type":395,"title":814,"items":829,"description":830},{"type":381},"来自历史任务的经验沉淀，包括最佳实践、常见误区与避坑建议。",{"type":395,"title":752,"items":832,"description":833},{"type":381},"用户在该类任务中的偏好设定，例如风格、约束条件或优先级。",{"type":395,"title":835,"items":836,"description":837},"Examples",{"type":381},"该技能 Skill 的典型使用示例，帮助 Agent 理解输入输出形式与使用边界。",{"type":374,"title":839,"description":840},"Script","用于完成该 Skill 的可复用代码脚本或逻辑实现。",{"type":374,"title":842,"description":843},"Others","其他补充信息。",{"type":374,"properties":845,"title":875},{"id":846,"skill_value":848,"skill_url":853,"skill_type":856,"create_time":859,"conversation_id":861,"status":863,"confidence":866,"tags":868,"update_time":871,"relativity":873},{"type":381,"title":706,"description":847},"技能 Skill 的唯一标识符，系统内部用于区分不同的记忆条目。",{"type":374,"title":849,"description":850,"items":851},"Skill Value","技能 Skill 的结构化内容，可直接转为字符串后注入 Agent 的 prompt。",{"$ref":852},"#\u002Fcomponents\u002Fschemas\u002FSkillValue",{"type":381,"title":854,"description":855},"Skill Url","技能 Skill 的下载链接。Markdown Skill 可下载为 SKILL.md；ZIP 技能包可下载后获取 SKILL.md、脚本、参考资料等附件。",{"type":381,"title":857,"description":858},"Skill Type","技能 Skill 的类型。",{"type":381,"title":647,"description":860},"技能 Skill 内容创建的时间，通常为 ISO 8601 格式。",{"type":381,"title":385,"description":862},"与该技能 Skill 关联的会话的唯一标识符。",{"type":381,"title":610,"description":864,"enum":865},"技能 Skill 的状态，当前所有检索到的技能 Skill 都是 activated。activated：激活状态，当前可检索和使用的技能 Skill 。",[727],{"type":412,"title":730,"description":867},"技能 Skill 的置信度分数，范围 0~1，数值越接近 1 表示该技能 Skill 越准确可靠。\n置信度分数会随着模型对该技能 Skill 的推理次数增加而逐渐衰减，用于反映技能 Skill 随着时间或使用频率可能产生的不确定性。",{"type":395,"items":869,"description":870},{"type":381},"与技能 Skill 相关的标签列表，用于分类、检索或主题标记。数组中的每个元素都是string，例如 [\"人物\", \"事件\", \"工作\"]。",{"type":381,"title":650,"description":872},"技能 Skill 最后一次被修改或更新的时间，通常为 ISO 8601 格式",{"type":381,"title":415,"description":874},"查询内容与该技能 Skill 的相关性分数，范围 0~1，数值越接近 1 表示越相关。","SkillDetail",{"type":374,"title":877,"properties":878},"SearchMemoryResponseData",{"memory_detail_list":879,"preference_detail_list":884,"tool_memory_detail_list":889,"preference_note":894,"skill_detail_list":897},{"type":395,"title":880,"description":881,"items":882},"Memory Detail List","返回的事实记忆片段详情列表。",{"$ref":883},"#\u002Fcomponents\u002Fschemas\u002FMemoryDetail",{"type":395,"title":885,"description":886,"items":887},"Preference Detail List","返回的偏好记忆片段详情列表。",{"$ref":888},"#\u002Fcomponents\u002Fschemas\u002FPreferenceDetail",{"type":395,"title":890,"description":891,"items":892},"Tool Memory Detail List","返回的工具记忆片段详情列表。",{"$ref":893},"#\u002Fcomponents\u002Fschemas\u002FToolMemoryDetail",{"type":381,"title":895,"description":896},"Preference Note","召回偏好记忆时，返回的偏好使用说明。",{"type":395,"title":898,"description":899,"items":900},"Skill Detail List","返回的技能 Skill 详情列表。开启 include_skill 后返回，来源包括用户对话自动生成的 Skill 和知识库中上传的自定义 Skill。",{"$ref":901},"#\u002Fcomponents\u002Fschemas\u002FSkillDetail",{"type":374,"required":903,"properties":904,"title":909},[473,474],{"code":905,"data":906,"message":908},{"type":400,"format":621,"title":477,"description":478,"example":413},{"$ref":907},"#\u002Fcomponents\u002Fschemas\u002FSearchMemoryResponseData",{"type":381,"title":482,"description":625},"SearchMemoryResponse",{"type":374,"required":911,"properties":912,"title":929},[376],{"user_id":913,"page":915,"size":918,"filter":922,"include_preference":924,"include_tool_memory":927},{"type":381,"title":382,"description":914},"获取的记忆所关联的用户唯一标识符。",{"type":400,"title":916,"description":917,"default":414},"Page","分页页码，用于在返回结果较多时进行分页控制。",{"type":400,"title":919,"description":920,"default":921},"Size","指定每一类记忆在当前页返回的条目数量，最大值为50。",10,{"type":374,"title":391,"description":923,"example":393},"记忆过滤的条件，用于在获取记忆前精确限定记忆范围。可用字段包括：\"agent_id\", \"app_id\", \"create_time\", \"update_time\"以及\"info\"中的字段。支持逻辑运算符（and，or）和比较运算符（gte、lte、gt、lt）。对于\"info\"字段，支持过滤传入的\"business_type\", \"biz_id\", \"scene\"和其他自定义字段。",{"type":405,"title":925,"description":926,"default":45},"IncludePreference","是否要返回偏好记忆。",{"type":405,"title":690,"description":928,"default":45},"是否要返回工具记忆。","GetMemoryRequest",{"type":374,"title":931,"properties":932},"GetMemoryResponseData",{"memory_detail_list":933,"preference_detail_list":963,"tool_memory_detail_list":989,"total":1009,"size":1011,"current":1013,"pages":1015},{"type":395,"title":880,"description":934,"items":935},"获取的事实记忆列表。",{"type":374,"title":936,"properties":937},"Memory Detail",{"id":938,"memory_key":939,"memory_value":940,"memory_type":941,"create_time":944,"conversation_id":946,"status":948,"confidence":951,"tags":953,"update_time":956,"sources":958,"info":961},{"type":381,"description":707},{"type":381,"description":710},{"type":381,"description":713},{"type":381,"enum":942,"description":943},[716,717,718],"事实记忆类型。",{"type":381,"description":945},"事实记忆创建时间，ISO 8601 格式。",{"type":381,"description":947},"与该事实记忆关联的会话唯一标识符。",{"type":381,"description":949,"enum":950},"事实记忆状态，当前仅返回激活状态。",[727],{"type":412,"description":952},"事实记忆的置信度分数，范围 0~1，数值越大表示越可靠；该值可能随时间或使用频率衰减。",{"type":395,"items":954,"description":955},{"type":381},"与事实记忆相关的标签列表，用于分类或检索，例如 [\"人物\",\"事件\"]。",{"type":381,"description":957},"事实记忆最后一次更新的时间，ISO 8601 格式。",{"type":395,"items":959,"description":960},{"type":374,"additionalProperties":45},"事实记忆的原始消息内容列表。",{"type":374,"additionalProperties":45,"description":962},"添加消息时自定义的元信息字段。",{"type":395,"title":885,"description":964,"items":965},"偏好记忆列表。",{"type":374,"properties":966},{"id":967,"preference_type":969,"preference":972,"reasoning":974,"create_time":976,"conversation_id":978,"status":980,"update_time":983,"sources":985,"info":988},{"type":381,"description":968},"偏好记忆的唯一标识符。",{"type":381,"enum":970,"description":971},[747,748],"偏好记忆类型。",{"type":381,"description":973},"偏好记忆的具体内容描述。",{"type":381,"description":975},"该偏好记忆被提取或形成的原因说明。",{"type":381,"description":977},"偏好记忆创建时间，ISO 8601 格式。",{"type":381,"description":979},"与该偏好记忆关联的会话唯一标识符。",{"type":381,"description":981,"enum":982},"偏好记忆状态，当前仅返回激活状态。",[727],{"type":381,"description":984},"偏好记忆最后一次更新的时间，ISO 8601 格式。",{"type":395,"items":986,"description":987},{"type":374,"additionalProperties":45},"偏好记忆的原始消息内容列表。",{"type":374,"additionalProperties":45,"description":962},{"type":395,"title":890,"description":891,"items":990},{"type":374,"title":991,"properties":992},"Tool Memory Detail",{"id":993,"tool_type":994,"tool_value":996,"tool_used_status":997,"create_time":999,"conversation_id":1000,"status":1001,"update_time":1003,"experience":1004,"sources":1005,"info":1008},{"type":381,"title":706,"description":787},{"type":381,"title":789,"description":790,"enum":995},[792,793],{"type":381,"title":795,"description":796},{"type":395,"title":798,"description":799,"items":998},{"$ref":801},{"type":381,"title":647,"description":803},{"type":381,"title":385,"description":805},{"type":381,"title":610,"description":807,"enum":1002},[727],{"type":381,"title":650,"description":810},{"type":381,"title":814,"description":815},{"type":395,"items":1006,"description":1007},{"type":374,"additionalProperties":45},"工具记忆的原始消息内容列表。",{"type":374,"additionalProperties":45,"description":962},{"type":400,"description":1010},"获取的各类记忆总数中的最大值，用于判断是否存在下一页。",{"type":400,"description":1012},"每一类记忆在当前页返回的条目数量。",{"type":400,"description":1014},"当前获取的记忆所在页数。",{"type":400,"description":1016},"获取记忆的总页数。",{"type":374,"required":1018,"title":1019,"properties":1020},[473,474],"GetMemoryResponse",{"code":1021,"data":1023,"message":1025},{"type":412,"title":477,"description":1022},"接口状态码，更多内容可查阅错误码列表了解详情。",{"$ref":1024},"#\u002Fcomponents\u002Fschemas\u002FGetMemoryResponseData",{"type":381,"title":482,"description":625},{"type":374,"properties":1027,"title":1034},{"memory_ids":1028,"user_id":1032},{"type":395,"items":1029,"title":1030,"description":1031},{"type":381},"Memory IDs","需要删除的记忆 ID 列表。每个 ID 均来自 search\u002Fmemory 或 get\u002Fmemory 接口返回的 id 字段。",{"type":381,"title":382,"description":1033},"删除用户的所有记忆，该用户关联的唯一ID标识符。","DeleteMemoryRequest",{"type":374,"properties":1036,"title":1046},{"code":1037,"data":1038,"message":1044},{"type":400,"title":477,"description":478},{"type":374,"title":1039,"properties":1040,"description":1043},"Data",{"success":1041},{"type":405,"title":604,"description":1042,"example":45},"是否删除成功。true 表示成功，false 表示失败。","返回删除信息",{"type":381,"title":482,"description":1045},"删除提示信息","DeleteMemoryResponse",{"type":374,"required":1048,"properties":1050,"title":1070},[376,377,1049],"feedback_content",{"user_id":1051,"conversation_id":1053,"feedback_content":1055,"agent_id":1058,"app_id":1060,"feedback_time":1062,"allow_public":1065,"allow_knowledgebase_ids":1067},{"type":381,"title":382,"description":1052},"反馈内容所关联的用户唯一标识符。",{"type":381,"title":385,"description":1054},"反馈内容所关联的会话唯一标识符。",{"type":381,"title":1056,"description":1057},"Feedback Content","反馈内容文本。",{"type":381,"title":447,"description":1059},"反馈内容所关联的Agent唯一标识符，主要用于在检索记忆时查询某用户与该Agent的专属记忆。",{"type":381,"title":444,"description":1061},"反馈内容所关联的应用唯一标识符，主要用于在检索记忆时查询某用户在该App下的专属记忆。",{"type":381,"title":1063,"description":1064},"Feedback Time","反馈发生的时间，可传入结构化时间或自然语言时间描述。传入该参数能够让记忆携带时间信息。",{"type":405,"title":458,"description":1066,"default":138},"反馈内容，产生的记忆，是否允许写入公共记忆库。开启后，生成的记忆可被项目下的其他用户检索。 ",{"type":395,"items":1068,"title":462,"description":1069},{"type":381},"反馈内容产生的记忆，允许被写入的知识库列表。","AddFeedbackRequest",{"type":374,"required":1072,"properties":1073,"title":1085},[473,474],{"code":1074,"data":1075,"message":1083},{"type":400,"title":477,"description":478},{"type":374,"title":1039,"properties":1076},{"success":1077,"status":1079,"task_id":1081},{"type":405,"title":604,"description":1078},"是否添加成功。true 表示成功，false 表示失败。",{"type":381,"title":610,"description":1080},"任务状态：running（运行中），completed（完成）",{"type":381,"title":607,"description":1082},"任务id",{"type":381,"title":482,"description":1084},"接口提示信息","AddFeedbackResponse",{"type":374,"required":1087,"properties":1089,"title":1092},[1088],"task_id",{"task_id":1090},{"type":381,"title":607,"description":1091},"异步任务ID","GetStatusRequest",{"type":374,"required":1094,"properties":1095,"title":1102},[473,474],{"code":1096,"data":1097,"message":1101},{"type":400,"title":477,"description":478},{"type":374,"title":1039,"properties":1098},{"status":1099},{"type":381,"title":610,"enum":1100,"description":615},[612,613,614],{"type":381,"title":482,"description":1084},"GetStatusResponse",{"type":374,"required":1104,"properties":1106,"title":1113},[1105],"knowledgebase_name",{"knowledgebase_name":1107,"knowledgebase_description":1110},{"type":381,"title":1108,"description":1109},"Knowledgebase Name","知识库名称",{"type":381,"title":1111,"description":1112},"Knowledgebase Description","描述信息","CreateKnowledgebaseRequest",{"type":374,"required":1115,"properties":1116,"title":1124},[473,474],{"code":1117,"data":1118,"message":1123},{"type":400,"title":477,"description":478},{"type":374,"title":1039,"properties":1119},{"id":1120},{"type":381,"title":1121,"description":1122},"KNOWLEDGEBASE ID","创建成功后返回的知识库 ID",{"type":381,"title":482,"description":1084},"CreateKnowledgebaseResponse",{"type":374,"required":1126,"properties":1128,"title":1132},[1127],"knowledgebase_id",{"knowledgebase_id":1129},{"type":381,"title":1130,"description":1131},"Knowledgebase ID","要移除的知识库ID","DeleteKnowledgebaseRequest",{"type":374,"required":1134,"properties":1135,"title":1142},[473,474],{"code":1136,"data":1137,"message":1141},{"type":400,"title":477,"description":478},{"type":374,"title":1039,"properties":1138},{"success":1139},{"type":405,"title":604,"description":1140},"是否移除成功。true 表示成功，false 表示失败。",{"type":381,"title":482,"description":1084},"DeleteKnowledgebaseResponse",{"type":374,"required":1144,"properties":1145,"title":1163},[1127,525],{"knowledgebase_id":1146,"file":1148},{"type":381,"title":1130,"description":1147},"目标知识库ID",{"type":395,"title":1149,"description":1150,"items":1151},"File","上传文件列表。普通文档按文档解析流程处理；Skill 文件按 Skill 校验和解析流程处理。",{"type":374,"properties":1152},{"name":1153,"type":1155,"content":1161},{"type":381,"title":820,"description":1154},"上传的文件名称。上传 Base64 内容时建议填写；上传 URL 时可不填。",{"type":381,"title":1156,"enum":1157,"default":1158,"description":1160},"Type",[1158,1159],"document","skill","上传文件类型。document 表示普通知识库文档；skill 表示 Skill 文件，支持 .md 单文件或 .zip 技能包。",{"type":381,"title":645,"description":1162},"文件内容，支持 URL 或 Base64 编码。普通文档和 Skill 文件的支持格式、大小与数量限制，请查看\u003Ca href=\"\u002Fmemos_cloud\u002Ffeatures\u002Fadvanced\u002Fknowledge_base\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\">知识库要求\u003C\u002Fa>。","UploadFileRequest",{"type":374,"required":1165,"properties":1166,"title":1187},[473,474],{"code":1167,"data":1168,"message":1185},{"type":400,"title":477,"description":478},{"type":395,"title":1039,"description":1169,"items":1170},"上传文件的处理结果列表。",{"type":374,"properties":1171},{"id":1172,"type":1174,"name":1177,"sizeMB":1179,"status":1182},{"type":381,"title":706,"description":1173},"文件 ID",{"type":381,"title":1156,"enum":1175,"description":1176},[1158,1159],"文件类型。document 表示普通文档；skill 表示 Skill 文件。",{"type":381,"title":820,"description":1178},"文件名称",{"type":412,"title":1180,"description":1181},"Size MB","文件大小，单位 MB",{"type":381,"title":610,"description":1183,"enum":1184},"文件处理状态",[612,613,614],{"type":381,"title":482,"description":1186},"接口信息","UploadFileResponse",{"type":374,"description":1189,"properties":1190,"title":1206},"获取指定文件列表或指定知识库下的文件列表信息",{"knowledgebase_id":1191,"type":1193,"page":1196,"page_size":1198,"file_ids":1202},{"type":381,"title":1130,"description":1192},"目标知识库 ID，不能与 file_ids 同时传。",{"type":381,"title":1156,"enum":1194,"description":1195},[1158,1159],"文件类型筛选，仅在使用 knowledgebase_id 查询时生效。document 仅返回普通文档；skill 仅返回技能文件；不传则返回全部文件。",{"type":400,"format":621,"title":916,"description":1197,"default":414},"分页页码，仅在使用 knowledgebase_id 查询时生效。",{"type":400,"format":621,"title":1199,"description":1200,"default":1201},"Page Size","每页条数，仅在使用 knowledgebase_id 查询时生效。",20,{"type":395,"items":1203,"title":1204,"description":1205},{"type":381},"File IDs","目标文件 ID 列表，传入后返回指定文件详情。","GetFileRequest",{"type":374,"required":1208,"properties":1209,"title":1234},[473,474],{"code":1210,"data":1211,"message":1233},{"type":400,"title":477,"description":478},{"type":374,"title":1039,"properties":1212},{"total":1213,"page":1216,"page_size":1218,"file_detail_list":1220},{"type":400,"format":621,"title":1214,"description":1215},"Total","符合条件的文件总数",{"type":400,"format":621,"title":916,"description":1217},"当前页码",{"type":400,"format":621,"title":1199,"description":1219},"每页条数",{"type":395,"items":1221,"title":1232},{"type":374,"properties":1222},{"id":1223,"type":1224,"name":1227,"size":1228,"status":1230},{"type":381,"title":706,"description":1173},{"type":381,"title":1156,"enum":1225,"description":1226},[1158,1159],"文件类型。document 表示知识文档；skill 表示技能文件。",{"type":381,"title":820,"description":1178},{"type":381,"title":919,"description":1229},"文件大小",{"type":381,"title":610,"description":1183,"enum":1231},[612,613,614],"File Detail List",{"type":381,"title":482,"description":1084},"GetFileResponse",{"type":374,"required":1236,"properties":1238,"title":1242},[1237],"file_ids",{"file_ids":1239},{"type":395,"items":1240,"title":1204,"description":1241},{"type":381},"要删除的文件 ID 列表。可传入普通文档 ID 或 Skill 文件 ID。","DeleteFileRequest",{"type":374,"required":1244,"properties":1245,"title":1251},[473,474],{"code":1246,"data":1247,"message":1250},{"type":400,"title":477,"description":478},{"type":374,"title":1039,"properties":1248},{"success":1249},{"type":405,"title":604,"description":1042},{"type":381,"title":482,"description":1084},"DeleteFileResponse",{"type":374,"title":1253,"properties":1254},"ExtractMemoryItem",{"memory_key":1255,"memory_value":1258,"memory_type":1261,"tags":1263},{"type":381,"title":709,"description":1256,"example":1257},"记忆主题，对抽取到的事实记忆的概括性描述。","用户基本信息",{"type":381,"title":712,"description":1259,"example":1260},"记忆内容，对抽取到的事实记忆的详细描述。","用户张三，28岁，在杭州从事后端开发，喜欢打羽毛球。",{"type":381,"title":719,"description":1262,"example":718},"记忆类型分类标识。\u003Cbr>示例：UserMemory、LongTermMemory。",{"type":395,"items":1264,"title":451,"description":1265,"example":1266},{"type":381},"记忆标签列表，用于对记忆内容进行分类标注。",[1267,1268,1269],"人物","职业","爱好",{"type":374,"title":1271,"properties":1272},"ExtractPreferenceItem",{"preference":1273,"reasoning":1276,"preference_type":1279},{"type":381,"title":752,"description":1274,"example":1275},"偏好描述，对抽取到的用户偏好的具体内容。","用户明确表示希望回复尽量简洁。",{"type":381,"title":755,"description":1277,"example":1278},"推理依据，说明该偏好是如何从对话中推断得出的。","对话中用户直接说明偏好。",{"type":381,"title":749,"description":1280,"enum":1281,"example":747},"偏好类型：显性偏好为用户明确表达，隐性偏好为从行为或语境推断。",[747,748],{"type":374,"title":1283,"properties":1284},"ExtractMemoryResponseData",{"success":1285,"memory_detail_list":1287,"preference_detail_list":1291},{"type":405,"title":604,"description":1286},"是否抽取成功。",{"type":395,"title":880,"description":1288,"items":1289},"事实记忆列表。当请求中 extraction_types 包含 memory，或未传 extraction_types 时返回。",{"$ref":1290},"#\u002Fcomponents\u002Fschemas\u002FExtractMemoryItem",{"type":395,"title":885,"description":1292,"items":1293},"偏好记忆列表。当请求中 extraction_types 包含 preference，或未传 extraction_types 时返回；结果中可包含显性偏好与隐性偏好。",{"$ref":1294},"#\u002Fcomponents\u002Fschemas\u002FExtractPreferenceItem",{"type":374,"required":1296,"title":1297,"properties":1298},[503,504],"ExtractMemoryMessage",{"role":1299,"content":1301},{"type":381,"title":513,"enum":1300,"description":514},[55,58,511],{"type":381,"title":645,"description":542},{"type":374,"required":1303,"title":1305,"properties":1306},[378,1304],"documents","RerankRequest",{"model":1307,"query":1312,"documents":1314,"top_n":1318},{"type":381,"title":1308,"description":1309,"enum":1310},"Model","模型名称。",[255,1311],"memos-reranker-4b",{"type":381,"title":388,"description":1313},"用户查询文本，用于与候选文档进行相关性匹配。",{"type":395,"title":1315,"description":1316,"items":1317},"Documents","候选记忆\u002F文档列表，每条为一段文本。数组中所有文档的总 token 数上限为 8k。",{"type":381},{"type":400,"title":1319,"description":1320},"Top N","返回前 N 条最相关的结果。不传时默认返回全部结果。",{"type":374,"required":1322,"title":1325,"properties":1326},[1323,1158,1324],"index","relevance_score","RerankResult",{"index":1327,"document":1330,"relevance_score":1338},{"type":400,"title":1328,"description":1329},"Index","该文档在原始 documents 列表中的索引位置。",{"type":374,"title":1331,"description":1332,"required":1333,"properties":1334},"Document","文档对象。",[496],{"text":1335},{"type":381,"title":1336,"description":1337},"Text","文档原文内容。",{"type":412,"title":1339,"description":1340},"Relevance Score","相关性分数，范围 0~1，越高表示与 query 越相关。",{"type":374,"required":1342,"title":1347,"properties":1348},[1343,1344,1345,1346],"id","model","usage","results","RerankResponse",{"id":1349,"model":1352,"usage":1354,"results":1367},{"type":381,"title":1350,"description":1351},"Id","本次请求的唯一标识。",{"type":381,"title":1308,"description":1353},"使用的模型名称。",{"type":374,"title":1355,"description":1356,"required":1357,"properties":1360},"Usage","token 用量统计。",[1358,1359],"prompt_tokens","total_tokens",{"prompt_tokens":1361,"total_tokens":1364},{"type":400,"title":1362,"description":1363},"Prompt Tokens","输入消耗的 token 数。",{"type":400,"title":1365,"description":1366},"Total Tokens","总消耗 token 数。",{"type":395,"title":1368,"description":1369,"items":1370},"Results","重排结果列表，按 relevance_score 降序排列。",{"$ref":1371},"#\u002Fcomponents\u002Fschemas\u002FRerankResult",{"type":374,"required":1373,"title":1374,"properties":1375},[565],"ExtractMemoryRequest",{"messages":1376,"extraction_types":1380},{"type":395,"title":572,"description":1377,"items":1378},"需要抽取记忆的消息对象数组，数组中所有消息的总 Token 数上限为8k。",{"$ref":1379},"#\u002Fcomponents\u002Fschemas\u002FExtractMemoryMessage",{"type":395,"title":1381,"description":1382,"items":1383},"Extraction Types","\u003Cp>限定抽取的记忆类型；不传则抽取全部支持的类型。\u003C\u002Fp>\u003Cul>\u003Cli>\u003Ccode>memory\u003C\u002Fcode>：事实记忆，从对话中提取用户相关的事实性信息。\u003C\u002Fli>\u003Cli>\u003Ccode>preference\u003C\u002Fcode>：偏好记忆，从对话中提取用户的偏好信息，包含显性偏好（用户明确表达）和隐性偏好（从行为推断）。\u003C\u002Fli>\u003C\u002Ful>",{"type":381,"enum":1384},[236,237],{"type":374,"required":1386,"title":1387,"properties":1388},[473,474],"ExtractMemoryResponse",{"code":1389,"data":1390,"message":1392},{"type":400,"format":621,"title":477,"description":478,"example":413},{"$ref":1391},"#\u002Fcomponents\u002Fschemas\u002FExtractMemoryResponseData",{"type":381,"title":482,"description":625,"example":626},"cn\u002Fapi_docs\u002Fapi","_yhN6jILPtXndYbBWpGJxDSIYNrOKlbkSrn15rJ6VjA",{"id":1396,"extension":24,"meta":1397,"stem":2446,"__hash__":2447},"dashboardApi\u002Fen\u002Fapi_docs\u002Fapi.json",{"openapi":26,"info":1398,"servers":1399,"security":1401,"paths":1404,"components":1652},{"title":28,"description":29,"version":30},[1400],{"url":33,"description":34},[1402],{"TokenAuth":1403},[],{"\u002Fadd\u002Fmessage":1405,"\u002Fget\u002Fmessage":1431,"\u002Fsearch\u002Fmemory":1444,"\u002Fchat":1472,"\u002Fget\u002Fmemory":1496,"\u002Fdelete\u002Fmemory":1508,"\u002Fadd\u002Ffeedback":1520,"\u002Fextract\u002Fmemory":1532,"\u002Frerank":1555,"\u002Fget\u002Fstatus":1575,"\u002Fcreate\u002Fknowledgebase":1587,"\u002Fdelete\u002Fknowledgebase":1600,"\u002Fadd\u002Fknowledgebase-file":1613,"\u002Fget\u002Fknowledgebase-file":1626,"\u002Fdelete\u002Fknowledgebase-file":1639},{"post":1406},{"summary":41,"description":1407,"operationId":43,"requestBody":1408,"responses":1426},"This API allows you to add one or more messages to a specific conversation. As illustrated in the examples bellow, you can add messages in real time during a user-assistant interaction, import historical messages in bulk, or enrich the conversation with user preferences and behavior data. All added messages are transformed into memories by MemOS, enabling their retrieval in future conversations to support chat history management, user behavior tracking, and personalized interactions.",{"required":45,"content":1409},{"application\u002Fjson":1410},{"schema":1411,"example":1412},{"$ref":49},{"user_id":51,"conversation_id":52,"messages":1413},[1414,1416,1418,1420,1422,1424],{"role":55,"content":1415},"I want to travel during summer vacation, can you recommend something?",{"role":58,"content":1417},"Sure! Are you traveling alone, with family or with friends?",{"role":55,"content":1419},"I'm bringing my kid. My family always travels together.",{"role":58,"content":1421},"Got it, so you're traveling with your children as a family, right?",{"role":55,"content":1423},"Yes, with both kids and elderly, we usually travel as a whole family.",{"role":58,"content":1425},"Understood, I'll recommend destinations suitable for family trips.",{"200":1427},{"description":70,"content":1428},{"application\u002Fjson":1429},{"schema":1430},{"$ref":74},{"post":1432},{"summary":5,"description":1433,"operationId":78,"requestBody":1434,"responses":1439},"This API retrieves the historical conversation records between a user and the assistant for a specified session, with the option to limit the number of results. As shown in the examples bellow, you can use the returned recent messages as references for the model when generating responses, maintaining dialogue coherence and contextual understanding. It can also be used to restore chat context when a user refreshes or reopens the app, ensuring a seamless user experience and supporting personalized interactions.",{"required":45,"content":1435},{"application\u002Fjson":1436},{"schema":1437,"example":1438},{"$ref":83},{"user_id":51,"conversation_id":85,"message_limit_number":86},{"200":1440},{"description":70,"content":1441},{"application\u002Fjson":1442},{"schema":1443},{"$ref":92},{"post":1445},{"summary":95,"description":1446,"operationId":97,"requestBody":1447,"responses":1467},"This API queries a user’s memory and returns the fragments most relevant to the input for the Agent to use. Returned memory can include Fact Memory, Preference Memory, Tool Memory, and Skill. Skills can be auto-generated from user conversations or uploaded as custom Skill files in a Knowledge Base.",{"required":45,"content":1448},{"application\u002Fjson":1449},{"schema":1450,"example":1451},{"$ref":102},{"query":1452,"user_id":51,"conversation_id":85,"knowledgebase_ids":1453,"filter":1454},"Summarize my memories related to reading this year",[106],{"knowledgebase":1455,"user":1464},{"and":1456},[1457,1460,1462],{"tags":1458},{"contains":1459},"reading",{"create_time":1461},{"gte":115},{"create_time":1463},{"lte":118},{"and":1465},[1466],{"scene":122},{"200":1468},{"description":70,"content":1469},{"application\u002Fjson":1470},{"schema":1471},{"$ref":128},{"post":1473},{"summary":131,"description":11,"operationId":122,"requestBody":1474,"responses":1489},{"required":45,"content":1475},{"application\u002Fjson":1476},{"schema":1477,"example":1478},{"$ref":136},{"user_id":51,"stream":138,"query":1479,"model_name":140,"conversation_id":141,"knowledgebase_ids":1480,"filter":1481,"system_prompt":1485,"add_message_on_answer":138,"allow_public":138,"allow_knowledgebase_ids":1486,"agent_id":151,"app_id":152,"tags":1487,"info":1488,"max_tokens":155,"temperature":156,"top_p":157},"What fun places are in Shanghai?",[143],{"and":1482},[1483],{"create_time":1484},{"gt":148},"Recommend parks",[],[],{},{"200":1490},{"description":70,"content":1491},{"application\u002Fjson":1492,"text\u002Fevent-stream":1494},{"schema":1493},{"$ref":163},{"schema":1495},{"$ref":166},{"post":1497},{"summary":169,"description":1498,"operationId":171,"requestBody":1499,"responses":1503},"Retrieve a user’s memories, including factual, preference, and tool memories.",{"required":45,"content":1500},{"application\u002Fjson":1501},{"schema":1502},{"$ref":176},{"200":1504},{"description":70,"content":1505},{"application\u002Fjson":1506},{"schema":1507},{"$ref":182},{"post":1509},{"summary":185,"description":1510,"operationId":187,"requestBody":1511,"responses":1515},"This API is used to delete specified user memories, supporting batch deletion.",{"required":45,"content":1512},{"application\u002Fjson":1513},{"schema":1514},{"$ref":192},{"200":1516},{"description":70,"content":1517},{"application\u002Fjson":1518},{"schema":1519},{"$ref":198},{"post":1521},{"summary":201,"description":1522,"operationId":203,"requestBody":1523,"responses":1527},"This API is used to add feedback to current session messages, allowing MemOS to correct memories based on user feedback.",{"required":45,"content":1524},{"application\u002Fjson":1525},{"schema":1526},{"$ref":208},{"200":1528},{"description":70,"content":1529},{"application\u002Fjson":1530},{"schema":1531},{"$ref":214},{"post":1533},{"summary":217,"description":1534,"operationId":219,"requestBody":1535,"responses":1550},"Uses MemOS’s self-developed extraction model to extract and return fact and preference memories directly from conversation messages.",{"required":45,"content":1536},{"application\u002Fjson":1537},{"schema":1538,"example":1539},{"$ref":224},{"messages":1540,"extraction_types":1549},[1541,1543,1545,1547],{"role":55,"content":1542},"I’ve planned a summer trip to Guangzhou. What chain hotels can you recommend for accommodation?",{"role":58,"content":1544},"You can consider options like 7 Days Inn, All Seasons, Hilton, and others.",{"role":55,"content":1546},"I’ll go with 7 Days Inn.",{"role":58,"content":1548},"Alright—ask me anytime if you have more questions.",[236,237],{"200":1551},{"description":70,"content":1552},{"application\u002Fjson":1553},{"schema":1554},{"$ref":243},{"post":1556},{"summary":246,"description":1557,"operationId":248,"requestBody":1558,"responses":1570},"Provides a memory reranking API based on the memos-reranker small model. It takes a user query and a list of candidate memories and completes memory relevance reranking with a single call.",{"required":45,"content":1559},{"application\u002Fjson":1560},{"schema":1561,"example":1562},{"$ref":253},{"model":255,"query":1563,"documents":1564},"What are the user's hobbies?",[1565,1566,1567,1568,1569],"User likes playing badminton.","User is a backend developer in Hangzhou.","User prefers concise replies.","User prefers Jiangxiang-flavored baijiu.","User is going on a business trip to Beijing next Wednesday.",{"200":1571},{"description":70,"content":1572},{"application\u002Fjson":1573},{"schema":1574},{"$ref":268},{"post":1576},{"summary":271,"description":1577,"operationId":273,"requestBody":1578,"responses":1582},"Get the status of an asynchronous processing task.",{"required":45,"content":1579},{"application\u002Fjson":1580},{"schema":1581},{"$ref":278},{"200":1583},{"description":70,"content":1584},{"application\u002Fjson":1585},{"schema":1586},{"$ref":284},{"post":1588},{"summary":1589,"description":1590,"operationId":289,"requestBody":1591,"responses":1595},"Create Knowledgebase","Create a knowledgebase associated with the project.",{"required":45,"content":1592},{"application\u002Fjson":1593},{"schema":1594},{"$ref":294},{"200":1596},{"description":70,"content":1597},{"application\u002Fjson":1598},{"schema":1599},{"$ref":300},{"post":1601},{"summary":1602,"description":1603,"operationId":305,"requestBody":1604,"responses":1608},"Delete Knowledgebase","Delete a knowledgebase from the current project. To permanently delete it, please operate from the Console - Knowledgebase page.",{"required":45,"content":1605},{"application\u002Fjson":1606},{"schema":1607},{"$ref":310},{"200":1609},{"description":70,"content":1610},{"application\u002Fjson":1611},{"schema":1612},{"$ref":316},{"post":1614},{"summary":1615,"description":1616,"operationId":321,"requestBody":1617,"responses":1621},"Create Knowledgebase File","Upload files to a specified Knowledge Base. By default, files are uploaded as documents. When file[].type is skill, upload a Markdown Skill file or ZIP Skill package.",{"required":45,"content":1618},{"application\u002Fjson":1619},{"schema":1620},{"$ref":326},{"200":1622},{"description":70,"content":1623},{"application\u002Fjson":1624},{"schema":1625},{"$ref":332},{"post":1627},{"summary":1628,"description":1629,"operationId":337,"requestBody":1630,"responses":1634},"Get Knowledgebase File","Get file information in one of two ways: pass file_ids to retrieve specific file details, or pass knowledgebase_id to list files under a Knowledge Base. Choose only one mode; passing both knowledgebase_id and file_ids returns an error.",{"required":45,"content":1631},{"application\u002Fjson":1632},{"schema":1633},{"$ref":342},{"200":1635},{"description":70,"content":1636},{"application\u002Fjson":1637},{"schema":1638},{"$ref":348},{"post":1640},{"summary":1641,"description":1642,"operationId":353,"requestBody":1643,"responses":1647},"Delete Knowledgebase File","Delete files from a specified Knowledge Base. When a Skill file is deleted, the associated Skill is deleted as well.",{"required":45,"content":1644},{"application\u002Fjson":1645},{"schema":1646},{"$ref":358},{"200":1648},{"description":70,"content":1649},{"application\u002Fjson":1650},{"schema":1651},{"$ref":364},{"securitySchemes":1653,"schemas":1656},{"TokenAuth":1654},{"type":368,"name":369,"in":370,"description":1655},"Token API_key, available in \u003Ca href=\"https:\u002F\u002Fmemos-dashboard.openmem.net\u002Fapikeys\u002F\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\" target=\"_blank\">API Console > API Keys\u003C\u002Fa>",{"ChatRequest":1657,"ChatResponseData":1709,"ChatResponse":1713,"ChatStreamResponse":1720,"AddMessageRequest":1732,"MessageInput":1766,"AddMessageResponse":1817,"OpenMemAddMessageResponse":1825,"GetMessageRequest":1835,"GetMessageResponse":1844,"GetMessageResponseData":1852,"MessageDetail":1858,"SearchMemoryRequest":1869,"SearchMemoryResponse":1898,"SearchMemoryResponseData":1905,"MemoryDetail":1922,"PreferenceDetail":1949,"ToolUsedStatus":1971,"ToolMemoryDetail":1981,"SkillValue":2006,"SkillDetail":2027,"GetMemoryRequest":2054,"GetMemoryResponseData":2068,"GetMemoryResponse":2150,"DeleteMemoryRequest":2158,"DeleteMemoryResponse":2165,"AddFeedbackRequest":2175,"AddFeedbackResponse":2195,"GetStatusRequest":2207,"GetStatusResponse":2212,"CreateKnowledgebaseRequest":2221,"CreateKnowledgebaseResponse":2227,"DeleteKnowledgebaseRequest":2236,"DeleteKnowledgebaseResponse":2241,"UploadFileRequest":2250,"UploadFileResponse":2266,"GetFileRequest":2287,"GetFileResponse":2302,"DeleteFileRequest":2326,"DeleteFileResponse":2332,"ExtractMemoryItem":2340,"ExtractPreferenceItem":2357,"ExtractMemoryResponseData":2368,"RerankRequest":2378,"RerankResult":2391,"RerankResponse":2404,"ExtractMemoryMessage":2422,"ExtractMemoryRequest":2430,"ExtractMemoryResponse":2440},{"type":374,"required":1658,"properties":1659,"title":464},[376,377,378],{"user_id":1660,"conversation_id":1662,"query":1664,"filter":1666,"knowledgebase_ids":1668,"memory_limit_number":1671,"include_preference":1673,"preference_limit_number":1675,"relativity":1677,"model_name":1679,"system_prompt":1682,"stream":1684,"max_tokens":1686,"temperature":1688,"top_p":1690,"add_message_on_answer":1692,"app_id":1694,"agent_id":1696,"tags":1698,"info":1701,"allow_public":1704,"allow_knowledgebase_ids":1706},{"type":381,"title":382,"description":1661},"Unique identifier of the user associated with the conversation.",{"type":381,"title":385,"description":1663},"Unique identifier of the conversation. Providing this clarifies the current session, prioritizing its memory over historical sessions. If omitted, cross-session memory retrieval is performed for more relevant responses.",{"type":381,"title":388,"description":1665},"User input content.",{"type":374,"title":391,"description":1667,"example":393},"Filter conditions, used to precisely limit the memory scope before retrieval. Available fields include: \"agent_id\", \"app_id\", \"create_time\", \"update_time\", and specific fields in \"info\". Supports logical operators (and, or) and comparison operators (gte, lte, gt, lt). For the \"info\" field, supports filtering by \"business_type\", \"biz_id\", \"scene\", and other custom fields.",{"type":395,"items":1669,"title":397,"description":1670},{"type":381},"Specifies the scope of Knowledge Bases accessible for the current search. Defaults to empty, meaning no Knowledge Bases are searched. Pass specific Knowledge Base IDs to search ordinary documents and uploaded Skills in those Knowledge Bases; pass \"all\" to search across all associated Knowledge Bases within the project.",{"type":400,"title":401,"description":1672,"default":403},"Maximum number of memories that can be recalled: as long as the relevance threshold (relativity) is met, up to this many memories may be returned. Default is 9, maximum is 25.",{"type":405,"title":406,"description":1674,"default":45},"Whether to recall preference memories. When enabled, the system intelligently recalls memories related to user preferences based on the query. Default = true.",{"type":400,"title":409,"description":1676,"default":403},"Maximum number of preferred memories that can be recalled: as long as the relevance threshold (relativity) is met, up to this many preference memories may be returned. Default is 9, maximum is 25.",{"type":412,"minimum":413,"maximum":414,"title":415,"description":1678,"default":417},"Relevance threshold (0–1) for recalled memories. Filters out low-relevance memories and, together with the maximum counts for factual and preferred recalls, constrains the final results. When omitted, the system default threshold is used. A value of 0 disables relevance filtering.",{"type":381,"enum":1680,"title":422,"description":1681,"default":421},[420,140,421],"Specifies the concrete conversation model.",{"type":381,"title":426,"description":1683},"Custom system instructions.",{"type":405,"title":429,"description":1685,"default":138},"Whether to enable streaming response.",{"type":400,"title":432,"description":1687,"default":155},"Indicates the maximum number of generated tokens.",{"type":412,"title":435,"description":1689,"default":156},"Controls generation randomness. Range: 0 ≤ x ≤ 2.",{"type":412,"title":438,"description":1691,"default":157},"Nucleus sampling parameter. Range: 0 ≤ x ≤ 1.",{"type":405,"title":441,"description":1693,"default":45},"Whether to automatically write user and assistant conversation content into memory. When enabled, developers do not need to call the add\u002Fmessage API to add messages as memory.",{"type":381,"title":444,"description":1695},"Unique identifier of the application associated with the conversation.",{"type":381,"title":447,"description":1697},"Unique identifier of the Agent associated with the conversation.",{"type":395,"items":1699,"title":451,"description":1700},{"type":381},"List of custom tags used to mark the topic or category of the conversation.",{"type":374,"additionalProperties":1702,"title":455,"description":1703},{"type":381},"Custom metadata field capable of storing any structured data related to the conversation, such as location, source, version, etc., primarily for precise filtering or source tracking during retrieval.",{"type":405,"title":458,"description":1705,"default":138},"Whether to allow adding to public memory.",{"type":395,"items":1707,"title":462,"description":1708},{"type":381},"List of knowledgebases where memories generated from added messages are allowed to be written.",{"type":374,"title":466,"properties":1710},{"response":1711},{"type":381,"title":469,"description":1712},"Specific content of the answer.",{"type":374,"required":1714,"properties":1715,"title":484},[473,474],{"code":1716,"data":1718,"message":1719},{"type":400,"title":477,"description":1717},"API status code. See \u003Ca href=\"\u002Fapi_docs\u002Fhelp\u002Ferror_codes\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\">Error Code List\u003C\u002Fa> for details.",{"$ref":480},{"type":381,"title":482,"description":482},{"type":374,"properties":1721,"title":500},{"event":1722,"data":1724},{"type":381,"description":1723,"default":474},"Stream event name, currently defaults to message.",{"type":374,"description":1725,"properties":1726},"Streamed data content.",{"type":1727,"data":1730},{"type":381,"description":1728,"enum":1729},"Stream message type, used to identify the semantic category of the current data.\u003Cbr>reasoning: Reasoning content\u003Cbr>text: Normal text content\u003Cbr>end: End of stream indicator",[495,496,497],{"type":381,"description":1731},"Streamed text content.",{"type":374,"required":1733,"properties":1734,"title":600},[376,377,565],{"user_id":1735,"conversation_id":1737,"messages":1739,"agent_id":1742,"app_id":1744,"tags":1746,"info":1750,"allow_public":1758,"allow_knowledgebase_ids":1760,"async_mode":1764},{"type":381,"title":382,"description":1736},"Unique identifier of the user associated with the message.",{"type":381,"title":385,"description":1738},"Unique identifier of the conversation.",{"type":395,"title":572,"description":1740,"items":1741},"Array of message objects representing the memory content. The total token limit for the message array is 20k. Each object contains:",{"$ref":575},{"type":381,"description":1743},"Unique identifier of the Agent associated with the added message, primarily used to query exclusive memories between a user and that Agent during retrieval.",{"type":381,"description":1745},"Unique identifier of the App associated with the added message, primarily used to query exclusive memories of a user under that App during retrieval.",{"type":395,"items":1747,"description":1748,"default":1749},{"type":381},"List of custom tags used to mark the topic or category of the added message.",[],{"type":374,"additionalProperties":1751,"description":1757},{"oneOf":1752},[1753,1754,1756],{"type":381},{"type":395,"items":1755},{"type":381},{"type":412},"Custom metadata field capable of storing any structured data related to the added message, such as location, source, version, etc., primarily for precise filtering or source tracking during retrieval.",{"type":405,"description":1759,"default":138},"Whether memories generated from the added message are allowed to be written to the public memory store. When enabled, generated memories can be retrieved by other users in the project.",{"type":395,"items":1761,"description":1762,"default":1763},{"type":381},"Scope of knowledgebases where memories generated from the added message are allowed to be written.",[],{"type":405,"description":1765,"default":45},"Whether to enable asynchronous memory addition. When enabled, memory will be added asynchronously in the background to avoid blocking the call chain.",{"type":374,"required":1767,"properties":1768,"title":562},[503,504],{"chat_time":1769,"role":1771,"content":1774,"tool_call_id":1799,"tool_calls":1801},{"type":381,"title":507,"description":1770},"Time of the conversation, as a structured timestamp or Chinese text. Providing this parameter allows memory to include time information.",{"type":381,"enum":1772,"title":513,"description":1773},[55,58,511,512],"Sender role.",{"title":645,"description":1775,"oneOf":1776},"Content of the message.",[1777,1779],{"type":381,"description":1778},"Message text content",{"type":395,"items":1780,"description":1798},{"type":374,"properties":1781,"required":1797},{"type":1782,"text":1785,"image_url":1787,"file":1792},{"type":381,"enum":1783,"description":1784},[496,524,525],"Type of the message sent",{"type":381,"description":1786},"Text message content. Required when type is text.",{"type":374,"description":1788,"properties":1789},"Image message content object.",{"url":1790},{"type":381,"description":1791},"Image message URL. Required when type is image_url.",{"type":374,"description":1793,"properties":1794},"File message content object.",{"file_data":1795},{"type":381,"description":1796},"Accessible file URL or base64. Supports txt \u002F pdf \u002F doc \u002F docx \u002F json \u002F md \u002F xml. Single file max 100MB, 500 pages, total max 20 files. Required when type is file.",[540],"List of multi-modal content",{"type":381,"description":1800},"Unique identifier for the tool call message when role is tool.",{"type":395,"items":1802,"description":1816},{"type":374,"properties":1803},{"id":1804,"type":1806,"function":1809},{"type":381,"description":1805},"Unique identifier for the tool call, used to associate with this tool call. Required in tool_calls.",{"type":381,"description":1807,"enum":1808},"Tool call type, currently only supports function. Required in tool_calls.",[553],{"type":374,"description":1810,"properties":1811},"Defined tool to be called. Required in tool_calls.",{"name":1812,"arguments":1814},{"type":381,"description":1813},"Tool (function) name. Required in tool_calls.",{"type":381,"description":1815},"Tool call arguments, must be a JSON formatted string. Required in tool_calls.","List of tool call information when role is assistant, used to pass when triggering tool calls.",{"type":374,"required":1818,"properties":1819,"title":627},[473,474],{"code":1820,"data":1822,"message":1823},{"type":400,"format":621,"title":477,"description":1821,"example":413},"API status code. See \u003Ca href=\"https:\u002F\u002Fmemos-dashboard.openmem.net\u002Fapikeys\u002F\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\">Error Code\u003C\u002Fa> for details",{"$ref":623},{"type":381,"title":482,"description":1824,"example":626},"API response message, e.g., \"Message added successfully\".",{"type":374,"properties":1826,"title":616,"description":1834},{"success":1827,"task_id":1829,"status":1831},{"type":405,"title":604,"description":1828,"example":45},"Indicates if the message was added successfully. true = success, false = failure.",{"type":381,"title":607,"description":1830},"Unique identifier of the memory processing task.",{"type":381,"title":610,"enum":1832,"description":1833},[612,613,614],"Current status of the memory processing task.","Object representing the result of adding the message.",{"type":374,"required":1836,"properties":1837,"title":638},[376,377],{"user_id":1838,"conversation_id":1840,"message_limit_number":1842},{"type":381,"title":382,"description":1839},"Unique identifier of the user associated with the messages being retrieved.",{"type":381,"title":385,"description":1841},"Unique identifier of the conversation associated with the messages.",{"type":400,"format":621,"title":636,"description":1843,"default":86},"Limits the number of messages returned, controlling the length of the message list. Defaults to 6 if not provided. The maximum allowed value is 50.",{"type":374,"required":1845,"properties":1846,"title":668},[473,474],{"code":1847,"data":1849,"message":1850},{"type":400,"format":621,"title":477,"description":1848,"example":413},"API status code. See \u003Ca href=\"https:\u002F\u002Fmemos-dashboard.openmem.net\u002Fapikeys\u002F\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\">Error Code\u003C\u002Fa> for details.",{"$ref":666},{"type":381,"title":482,"description":1851},"API response message.",{"type":374,"properties":1853,"title":660,"description":1857},{"message_detail_list":1854},{"type":395,"title":656,"description":1855,"items":1856},"List of retrieved message details. Each item includes:",{"$ref":659},"Object containing the retrieved messages.",{"type":374,"properties":1859,"title":652,"description":1855},{"role":1860,"content":1863,"create_time":1865,"update_time":1867},{"type":381,"enum":1861,"title":513,"description":1862,"example":55},[55,58],"Role of the message sender.",{"type":381,"title":645,"description":1864},"Text content of the message.",{"type":381,"title":647,"description":1866},"Creation time of the message.",{"type":381,"title":650,"description":1868},"Last update time of the message.",{"type":374,"required":1870,"properties":1871,"title":702},[376,378],{"user_id":1872,"conversation_id":1874,"query":1876,"filter":1878,"knowledgebase_ids":1881,"memory_limit_number":1884,"include_preference":1885,"preference_limit_number":1887,"include_tool_memory":1889,"tool_memory_limit_number":1891,"include_skill":1893,"skill_limit_number":1895,"relativity":1897},{"type":381,"title":382,"description":1873},"Unique identifier of the user associated with the memory being queried.",{"type":381,"title":385,"description":1875},"Unique identifier of the conversation containing the memory. Providing this ensures the current conversation’s memories have higher priority over other historical.",{"type":381,"title":388,"description":1877},"Text content to search within the memories.The token limit for a single query is 4k.",{"type":374,"title":391,"description":1879,"example":1880},"Memory filter conditions used to precisely limit candidate memories before retrieval. Supports two formats: pass a global filter condition composed of and\u002For directly, or pass source-specific filters under knowledgebase, user, and public. Available fields include agent_id, app_id, tags, create_time, update_time, and custom fields written through info when adding messages, such as business_type, biz_id, and scene. Fields in info are used directly by field name in filter, for example {\"scene\":\"chat\"}; do not wrap them in another info object. Supports comparison operators gte, lte, gt, lt, and tags.contains.","{\"knowledgebase\":{\"and\":[{\"tags\":{\"contains\":\"reading\"}},{\"create_time\":{\"gte\":\"2025-01-01\"}},{\"create_time\":{\"lte\":\"2025-12-31\"}}]},\"user\":{\"and\":[{\"scene\":\"chat\"}]}}",{"type":395,"items":1882,"description":1883},{"type":381},"Specifies the scope of knowledge bases accessible for the current search. Defaults to empty, meaning no knowledge bases are searched.Pass specific Knowledgebase IDs to search within that designated repository; pass \"all\" to search across all associated knowledgebases within the project.",{"type":400,"format":621,"title":401,"description":1672,"default":403},{"type":405,"title":406,"description":1886,"default":45},"Whether to enable preference memory recall. When enabled, the system will intelligently retrieve the user’s preference memories based on the query. Defaults to true if not provided.",{"type":400,"format":621,"title":409,"description":1888,"default":403},"Maximum number of preference memories that can be recalled: as long as the relevance threshold (relativity) is met, up to this many preferred memories may be returned. Default is 9, maximum is 25.",{"type":405,"title":690,"description":1890,"default":138},"Whether to enable tool memory recall. When enabled, the system will intelligently retrieve tool-related memories based on the query. Default is false if not provided.",{"type":400,"format":621,"title":693,"description":1892,"default":86},"Limits the number of tool memory items returned, controlling the count of recalled tool memories. Effective only when include_tool_memory=true. Default is 6 if not provided, max is 25.",{"type":405,"title":696,"description":1894},"Whether to enable Skill recall. When enabled, the system recalls relevant Skills based on the query, including personalized Skills auto-generated from user conversations and custom Skills uploaded within the knowledgebase_ids scope. Default is disabled if not provided.",{"type":400,"format":621,"title":699,"description":1896},"Limits the number of returned Skills, controlling the count of recalled skills. Effective only when `include_skill=true`. Default is 6 if not provided, max is 25.",{"type":412,"minimum":413,"maximum":414,"title":415,"description":1678,"default":417},{"type":374,"required":1899,"properties":1900,"title":909},[473,474],{"code":1901,"data":1903,"message":1904},{"type":400,"format":621,"title":477,"description":1902,"example":413},"API status code. See \u003Ca href=\"\u002Fapi_docs\u002Fhelp\u002Ferror_codes\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\">Error Code\u003C\u002Fa> for details.",{"$ref":907},{"type":381,"title":482,"description":1851},{"type":374,"title":877,"properties":1906,"description":1921},{"memory_detail_list":1907,"preference_detail_list":1910,"tool_memory_detail_list":1913,"preference_note":1916,"skill_detail_list":1918},{"type":395,"title":880,"description":1908,"items":1909},"List of memory fragment details returned. Each item includes:",{"$ref":883},{"type":395,"title":885,"description":1911,"items":1912},"List of preference memory details returned. Each item includes:",{"$ref":888},{"type":395,"title":890,"description":1914,"items":1915},"List of tool memory fragment details returned.",{"$ref":893},{"type":381,"title":895,"description":1917},"Preference memory usage note when it is retrieved.",{"type":395,"title":898,"description":1919,"items":1920},"List of Skill details returned when include_skill is enabled. Sources include Skills auto-generated from user conversations and custom Skills uploaded to Knowledge Bases.",{"$ref":901},"Object containing the query result.",{"type":374,"properties":1923,"title":740,"description":1908},{"id":1924,"memory_key":1926,"memory_value":1928,"memory_type":1930,"create_time":1933,"conversation_id":1935,"status":1937,"confidence":1940,"tags":1942,"update_time":1945,"relativity":1947},{"type":381,"title":706,"description":1925},"Unique identifier of fact memory, used internally by the system.",{"type":381,"title":709,"description":1927},"Title or keyword summarizing fact memory.",{"type":381,"title":712,"description":1929},"Detailed content of fact memory.",{"type":381,"enum":1931,"title":719,"description":1932,"example":717},[716,717,718],"WorkingMemory: short-term working memory, temporarily stored.\u003Cbr>LongTermMemory: long-term memory, important information or facts stored persistently.\u003Cbr>UserMemory: user-specific memory, personalized information related to a specific user.",{"type":381,"title":647,"description":1934},"Creation time of fact memory, usually in ISO 8601 format.",{"type":381,"title":385,"description":1936},"Unique identifier of the conversation associated with fact memory.",{"type":381,"enum":1938,"title":610,"description":1939,"example":727},[727],"Fact memory status. All retrieved fact memories are currently activated.\u003Cbr>activated: active fact memory, available for retrieval and use.",{"type":412,"minimum":413,"maximum":414,"title":730,"description":1941,"example":157},"Confidence score of fact memory, ranging from 0 to 1. Values closer to 1 indicate higher reliability. \u003Cbr>The score may gradually decay over time or with repeated model reasoning to reflect uncertainty.",{"type":395,"title":451,"description":1943,"items":1944},"List of tags associated with fact memory for categorization or retrieval. Each element is a string, e.g., [\"person\", \"event\", \"work\"].",{"type":381},{"type":381,"title":650,"description":1946},"Last modification or update time of fact memory, usually in ISO 8601 format.",{"type":412,"minimum":413,"maximum":414,"title":415,"description":1948,"example":739},"Relevance score of fact memory to the query, ranging from 0 to 1. Higher values indicate stronger relevance.",{"type":374,"properties":1950,"title":768},{"id":1951,"preference":1953,"preference_type":1955,"reasoning":1958,"create_time":1960,"conversation_id":1962,"status":1964,"update_time":1967,"relativity":1969},{"type":381,"title":706,"description":1952},"Unique identifier of preference memory, used internally by the system.",{"type":381,"title":752,"description":1954},"Detailed content of preference memory.",{"type":381,"enum":1956,"title":749,"description":1957,"example":747},[747,748],"explicit_preference: Explicit preference memory.\u003Cbr>implicit_preference: Implicit preference memory.",{"type":381,"title":755,"description":1959},"The reason why preference memory was extracted.",{"type":381,"title":647,"description":1961},"Creation time of preference memory, usually in ISO 8601 format.",{"type":381,"title":385,"description":1963},"Unique identifier of the conversation associated with preference memory.",{"type":381,"enum":1965,"title":610,"description":1966,"example":727},[727],"Preference memory status. All retrieved preference memories are currently activated.\u003Cbr>activated: active preference memory, available for retrieval and use.",{"type":381,"title":650,"description":1968},"Last modification or update time of preference memory, usually in ISO 8601 format.",{"type":412,"minimum":413,"maximum":414,"title":415,"description":1970,"example":739},"Relevance score of preference memory to the query, ranging from 0 to 1. Higher values indicate stronger relevance.",{"type":374,"properties":1972,"title":783},{"used_tool":1973,"error_type":1975,"success_rate":1977,"tool_experience":1979},{"type":381,"title":772,"description":1974},"Name of the tool used.",{"type":381,"title":775,"description":1976},"Error description when call fails.",{"type":412,"title":778,"description":1978},"Success rate of this tool trajectory.",{"type":381,"title":781,"description":1980},"Experience with this tool in the current trajectory.",{"type":374,"properties":1982,"title":816},{"id":1983,"tool_type":1985,"tool_value":1988,"tool_used_status":1990,"create_time":1993,"conversation_id":1995,"status":1997,"update_time":2000,"relativity":2002,"experience":2004},{"type":381,"title":706,"description":1984},"Unique identifier of the tool memory fragment.",{"type":381,"title":789,"description":1986,"enum":1987},"Tool memory type. ToolTrajectoryMemory: tool trajectory memory; ToolSchema: tool info memory.",[792,793],{"type":381,"title":795,"description":1989},"Specific content of the tool memory.",{"type":395,"title":798,"description":1991,"items":1992},"List of tool trajectory memories, each record contains tool used and experience info.",{"$ref":801},{"type":381,"title":647,"description":1994},"Tool memory creation time (ISO 8601 format).",{"type":381,"title":385,"description":1996},"Unique identifier of the conversation associated with the tool memory.",{"type":381,"title":610,"description":1998,"enum":1999},"Tool memory status, currently activated.",[727],{"type":381,"title":650,"description":2001},"Last update time of the tool memory (ISO 8601 format).",{"type":412,"title":415,"description":2003},"Relevance score of the tool memory to the query content.",{"type":381,"title":814,"description":2005},"Procedural experience of the entire trajectory, serving as overall guidance for task completion.",{"type":374,"properties":2007},{"name":2008,"description":2010,"procedure":2012,"experience":2014,"preference":2017,"examples":2020,"script":2023,"others":2025},{"type":381,"title":820,"description":2009},"The name of the Skill, used for display and identification of the capability.",{"type":381,"title":823,"description":2011},"The description of the Skill.",{"type":381,"title":826,"description":2013},"Recommended procedures or operational steps to complete the task.",{"type":395,"title":814,"items":2015,"description":2016},{"type":381},"Experience accumulated from historical tasks, including best practices, common pitfalls, and avoidance suggestions.",{"type":395,"title":752,"items":2018,"description":2019},{"type":381},"User preference settings for this type of task, such as style, constraints, or priorities.",{"type":395,"title":835,"items":2021,"description":2022},{"type":381},"Typical usage examples of the Skill, helping the Agent understand input\u002Foutput formats and usage boundaries.",{"type":374,"title":839,"description":2024},"Reusable code scripts or logic implementations used to complete the Skill.",{"type":374,"title":842,"description":2026},"Other supplementary information.",{"type":374,"properties":2028,"title":875},{"id":2029,"skill_value":2031,"skill_url":2034,"skill_type":2036,"create_time":2038,"conversation_id":2040,"status":2042,"confidence":2045,"tags":2047,"update_time":2050,"relativity":2052},{"type":381,"title":706,"description":2030},"The unique identifier of the Skill, used internally by the system to distinguish different memory entries.",{"type":374,"title":849,"description":2032,"items":2033},"Structured Skill content. You can convert it to a string and inject it into the Agent prompt.",{"$ref":852},{"type":381,"title":854,"description":2035},"Download link for the Skill. A Markdown Skill can be downloaded as SKILL.md; a ZIP Skill package can include SKILL.md, scripts, references, assets, and other attachments.",{"type":381,"title":857,"description":2037},"The type of the Skill.",{"type":381,"title":647,"description":2039},"The creation time of the Skill content, usually in ISO 8601 format.",{"type":381,"title":385,"description":2041},"The unique identifier of the conversation associated with the Skill.",{"type":381,"title":610,"description":2043,"enum":2044},"The status of the Skill. Currently, all retrieved Skills are 'activated'. activated: Active status, the Skill is currently retrievable and usable.",[727],{"type":412,"title":730,"description":2046},"The confidence score of the Skill, ranging from 0 to 1. A value closer to 1 indicates the Skill is more accurate and reliable.\nThe confidence score gradually decays as the model infers this Skill more times, reflecting the uncertainty that may arise over time or usage frequency.",{"type":395,"items":2048,"description":2049},{"type":381},"A list of tags associated with the Skill, used for classification, retrieval, or topic marking. Each element in the array is a string, e.g., [\"Person\", \"Event\", \"Work\"].",{"type":381,"title":650,"description":2051},"The time when the Skill was last modified or updated, usually in ISO 8601 format.",{"type":381,"title":415,"description":2053},"The relevance score between the query content and the Skill, ranging from 0 to 1. A value closer to 1 indicates higher relevance.",{"type":374,"required":2055,"properties":2056,"title":929},[376],{"user_id":2057,"page":2059,"size":2061,"filter":2063,"include_preference":2064,"include_tool_memory":2066},{"type":381,"title":382,"description":2058},"Unique identifier of the user whose memories are being retrieved.",{"type":400,"title":916,"description":2060,"default":414},"Page number for pagination when many results are returned.",{"type":400,"title":919,"description":2062,"default":921},"Number of entries returned per memory category on the current page, up to 50.",{"type":374,"title":391,"description":1667,"example":393},{"type":405,"title":406,"description":2065,"default":45},"Whether preference memories should be included.",{"type":405,"title":690,"description":2067,"default":45},"Whether tool memories should be included.",{"type":374,"title":931,"properties":2069},{"memory_detail_list":2070,"preference_detail_list":2101,"tool_memory_detail_list":2123,"total":2142,"size":2144,"current":2146,"pages":2148},{"type":395,"title":880,"description":2071,"items":2072},"Returned factual memories.",{"type":374,"title":936,"properties":2073},{"id":2074,"memory_key":2076,"memory_value":2078,"memory_type":2080,"create_time":2083,"conversation_id":2085,"status":2087,"confidence":2089,"tags":2091,"update_time":2094,"sources":2096,"info":2099},{"type":381,"description":2075},"Unique identifier of a factual memory entry.",{"type":381,"description":2077},"Title or keyword summarizing the factual memory.",{"type":381,"description":2079},"Content of the factual memory.",{"type":381,"enum":2081,"description":2082},[716,717,718],"Type of factual memory.",{"type":381,"description":2084},"Creation time in ISO 8601 format.",{"type":381,"description":2086},"Conversation identifier linked to this memory.",{"type":381,"description":2088},"Current status, only activated is returned.",{"type":412,"description":2090},"Confidence score between 0 and 1; higher means more reliable.",{"type":395,"items":2092,"description":2093},{"type":381},"Tag list for classification or retrieval.",{"type":381,"description":2095},"Last update time in ISO 8601 format.",{"type":395,"items":2097,"description":2098},{"type":374,"additionalProperties":45},"Source message objects associated with the memory.",{"type":374,"additionalProperties":45,"description":2100},"Custom metadata provided when adding the message.",{"type":395,"title":885,"description":2102,"items":2103},"Returned preference memories.",{"type":374,"properties":2104},{"id":2105,"preference_type":2107,"preference":2110,"reasoning":2112,"create_time":2114,"conversation_id":2115,"status":2117,"update_time":2118,"sources":2119,"info":2122},{"type":381,"description":2106},"Unique identifier of the preference memory.",{"type":381,"enum":2108,"description":2109},[747,748],"Preference memory type.",{"type":381,"description":2111},"Description of the preference.",{"type":381,"description":2113},"Reasoning for extracting or deriving the preference.",{"type":381,"description":2084},{"type":381,"description":2116},"Conversation identifier linked to this preference.",{"type":381,"description":2088},{"type":381,"description":2095},{"type":395,"items":2120,"description":2121},{"type":374,"additionalProperties":45},"Source messages associated with the preference.",{"type":374,"additionalProperties":45,"description":2100},{"type":395,"title":890,"description":1914,"items":2124},{"type":374,"title":991,"properties":2125},{"id":2126,"tool_type":2127,"tool_value":2129,"tool_used_status":2130,"create_time":2132,"conversation_id":2133,"status":2134,"update_time":2136,"experience":2137,"sources":2138,"info":2141},{"type":381,"title":706,"description":1984},{"type":381,"title":789,"description":1986,"enum":2128},[792,793],{"type":381,"title":795,"description":1989},{"type":395,"title":798,"description":1991,"items":2131},{"$ref":801},{"type":381,"title":647,"description":1994},{"type":381,"title":385,"description":1996},{"type":381,"title":610,"description":1998,"enum":2135},[727],{"type":381,"title":650,"description":2001},{"type":381,"title":814,"description":2005},{"type":395,"items":2139,"description":2140},{"type":374,"additionalProperties":45},"List of original message content associated with the tool memory.",{"type":374,"additionalProperties":45,"description":2100},{"type":400,"description":2143},"Maximum count across memory types, used to check if another page exists.",{"type":400,"description":2145},"Number of entries per memory type on the current page.",{"type":400,"description":2147},"Index of the current page.",{"type":400,"description":2149},"Total number of pages.",{"type":374,"required":2151,"title":1019,"properties":2152},[473,474],{"code":2153,"data":2155,"message":2156},{"type":412,"title":477,"description":2154},"API status code; refer to the error-code list for details.",{"$ref":1024},{"type":381,"title":482,"description":2157},"API message.",{"type":374,"properties":2159,"title":1034},{"memory_ids":2160,"user_id":2163},{"type":395,"items":2161,"title":1030,"description":2162},{"type":381},"IDs of the memories to be deleted, obtained from the `id` field returned by the `search\u002Fmemory` or `get\u002Fmemory` API.",{"type":381,"title":382,"description":2164},"Unique identifier of the user whose memories are being deleted.",{"type":374,"properties":2166,"title":1046},{"code":2167,"data":2168,"message":2173},{"type":400,"title":477,"description":1902},{"type":374,"title":1039,"properties":2169,"description":2172},{"success":2170},{"type":405,"title":604,"description":2171,"example":45},"Whether deletion was successful. true for success, false for failure.","Returned deletion information",{"type":381,"title":482,"description":2174},"API response message",{"type":374,"required":2176,"properties":2177,"title":1070},[376,377,1049],{"user_id":2178,"conversation_id":2180,"feedback_content":2182,"agent_id":2184,"app_id":2186,"feedback_time":2188,"allow_public":2190,"allow_knowledgebase_ids":2192},{"type":381,"title":382,"description":2179},"Unique identifier of the user associated with the feedback content.",{"type":381,"title":385,"description":2181},"Unique identifier of the conversation associated with the feedback content.",{"type":381,"title":1056,"description":2183},"Feedback content text.",{"type":381,"title":447,"description":2185},"Unique identifier of the Agent associated with the feedback content, primarily used to query exclusive memories between a user and that Agent during retrieval.",{"type":381,"title":444,"description":2187},"Unique identifier of the App associated with the feedback content, primarily used to query exclusive memories of a user under that App during retrieval.",{"type":381,"title":1063,"description":2189},"Time when the feedback occurred, can be a structured timestamp or natural language time description. Providing this parameter allows memory to include time information.",{"type":405,"title":458,"description":2191,"default":138},"Whether memories generated from the feedback content are allowed to be written to the public memory store. When enabled, generated memories can be retrieved by other users in the project.",{"type":395,"items":2193,"title":462,"description":2194},{"type":381},"List of knowledgebases where memories generated from the feedback content are allowed to be written.",{"type":374,"required":2196,"properties":2197,"title":1085},[473,474],{"code":2198,"data":2199,"message":2206},{"type":400,"title":477,"description":1902},{"type":374,"title":1039,"properties":2200},{"success":2201,"status":2203,"task_id":2205},{"type":405,"title":604,"description":2202},"Whether addition was successful. true for success, false for failure.",{"type":381,"title":610,"description":2204},"Task status: running, completed",{"type":381,"title":607,"description":607},{"type":381,"title":482,"description":2174},{"type":374,"required":2208,"properties":2209,"title":1092},[1088],{"task_id":2210},{"type":381,"title":607,"description":2211},"Async Task ID",{"type":374,"required":2213,"properties":2214,"title":1102},[473,474],{"code":2215,"data":2216,"message":2220},{"type":400,"title":477,"description":1902},{"type":374,"title":1039,"properties":2217},{"status":2218},{"type":381,"title":610,"enum":2219,"description":1833},[612,613,614],{"type":381,"title":482,"description":2174},{"type":374,"required":2222,"properties":2223,"title":1113},[1105],{"knowledgebase_name":2224,"knowledgebase_description":2225},{"type":381,"title":1108,"description":1108},{"type":381,"title":1111,"description":2226},"Description information",{"type":374,"required":2228,"properties":2229,"title":1124},[473,474],{"code":2230,"data":2231,"message":2235},{"type":400,"title":477,"description":1902},{"type":374,"title":1039,"properties":2232},{"id":2233},{"type":381,"title":1121,"description":2234},"Knowledgebase ID returned after successful creation",{"type":381,"title":482,"description":2174},{"type":374,"required":2237,"properties":2238,"title":1132},[1127],{"knowledgebase_id":2239},{"type":381,"title":1130,"description":2240},"Knowledgebase ID to be deleted",{"type":374,"required":2242,"properties":2243,"title":1142},[473,474],{"code":2244,"data":2245,"message":2249},{"type":400,"title":477,"description":1902},{"type":374,"title":1039,"properties":2246},{"success":2247},{"type":405,"title":604,"description":2248},"Whether removal was successful. true for success, false for failure.",{"type":381,"title":482,"description":2174},{"type":374,"required":2251,"properties":2252,"title":1163},[1127,525],{"knowledgebase_id":2253,"file":2255},{"type":381,"title":1130,"description":2254},"Target Knowledgebase ID",{"type":395,"title":1149,"description":2256,"items":2257},"List of files to upload. Ordinary documents follow the document parsing pipeline; Skill files follow the Skill validation and parsing pipeline.",{"type":374,"properties":2258},{"name":2259,"type":2261,"content":2264},{"type":381,"title":820,"description":2260},"File name. Recommended when uploading Base64 content; optional when uploading by URL.",{"type":381,"title":1156,"enum":2262,"default":1158,"description":2263},[1158,1159],"Uploaded file type. document means ordinary Knowledge Base document; skill means Skill file, supporting a .md single file or .zip Skill package.",{"type":381,"title":645,"description":2265},"File content. Supports URL or Base64 encoding. For supported formats, size limits, and quantity limits for ordinary documents and Skill files, see \u003Ca href=\"\u002Fmemos_cloud\u002Ffeatures\u002Fadvanced\u002Fknowledge_base\" class=\"text-primary border-b border-transparent hover:border-primary font-medium focus-visible:outline-primary [&amp;&gt;code]:border-dashed hover:[&amp;&gt;code]:border-primary hover:[&amp;&gt;code]:text-primary transition-colors [&amp;&gt;code]:transition-colors\">Knowledge Base requirements\u003C\u002Fa>.",{"type":374,"required":2267,"properties":2268,"title":1187},[473,474],{"code":2269,"data":2270,"message":2286},{"type":400,"title":477,"description":1902},{"type":395,"title":1039,"description":2271,"items":2272},"Processing results for uploaded files.",{"type":374,"properties":2273},{"id":2274,"type":2276,"name":2279,"sizeMB":2281,"status":2283},{"type":381,"title":706,"description":2275},"File ID",{"type":381,"title":1156,"enum":2277,"description":2278},[1158,1159],"File type. document means ordinary document; skill means Skill file.",{"type":381,"title":820,"description":2280},"File name",{"type":412,"title":1180,"description":2282},"File size in MB",{"type":381,"title":610,"description":2284,"enum":2285},"File processing status",[612,613,614],{"type":381,"title":482,"description":2174},{"type":374,"description":2288,"properties":2289,"title":1206},"Supports two query modes: pass file_ids to retrieve specific file details; or pass knowledgebase_id to list files under a Knowledge Base, optionally with type, page, and page_size for filtering and pagination. Choose exactly one mode. Passing both knowledgebase_id and file_ids returns an error; passing neither also returns an error.",{"knowledgebase_id":2290,"type":2292,"page":2295,"page_size":2297,"file_ids":2299},{"type":381,"title":1130,"description":2291},"Query mode 1: target Knowledge Base ID. Returns files under the Knowledge Base and can be used with type, page, and page_size. Do not pass it together with file_ids.",{"type":381,"title":1156,"enum":2293,"description":2294},[1158,1159],"File type filter, effective only when querying by knowledgebase_id. document returns only ordinary documents; skill returns only Skill files; omit this field to return all files. Do not use it with the file_ids query mode.",{"type":400,"format":621,"title":916,"description":2296,"default":414},"Page number, effective only when querying by knowledgebase_id. Do not use it with the file_ids query mode.",{"type":400,"format":621,"title":1199,"description":2298,"default":1201},"Items per page, effective only when querying by knowledgebase_id. Do not use it with the file_ids query mode.",{"type":395,"items":2300,"title":1204,"description":2301},{"type":381},"Query mode 2: file ID list. Returns details for the specified files. When using this mode, pass only file_ids and do not pass knowledgebase_id, type, page, or page_size.",{"type":374,"required":2303,"properties":2304,"title":1234},[473,474],{"code":2305,"data":2306,"message":2325},{"type":400,"title":477,"description":1902},{"type":374,"title":1039,"properties":2307},{"total":2308,"page":2310,"page_size":2312,"file_detail_list":2314},{"type":400,"format":621,"title":1214,"description":2309},"Total number of matched files",{"type":400,"format":621,"title":916,"description":2311},"Current page number",{"type":400,"format":621,"title":1199,"description":2313},"Items per page",{"type":395,"items":2315,"title":1232},{"type":374,"properties":2316},{"id":2317,"type":2318,"name":2320,"size":2321,"status":2323},{"type":381,"title":706,"description":2275},{"type":381,"title":1156,"enum":2319,"description":2278},[1158,1159],{"type":381,"title":820,"description":2280},{"type":381,"title":919,"description":2322},"File size",{"type":381,"title":610,"description":2284,"enum":2324},[612,613,614],{"type":381,"title":482,"description":2174},{"type":374,"required":2327,"properties":2328,"title":1242},[1237],{"file_ids":2329},{"type":395,"items":2330,"title":1204,"description":2331},{"type":381},"List of file IDs to delete. You can pass ordinary document IDs or Skill file IDs.",{"type":374,"required":2333,"properties":2334,"title":1251},[473,474],{"code":2335,"data":2336,"message":2339},{"type":400,"title":477,"description":1902},{"type":374,"title":1039,"properties":2337},{"success":2338},{"type":405,"title":604,"description":2171},{"type":381,"title":482,"description":2174},{"type":374,"title":1253,"properties":2341},{"memory_key":2342,"memory_value":2345,"memory_type":2348,"tags":2350},{"type":381,"title":709,"description":2343,"example":2344},"High-level topic or title summarizing the extracted factual memory.","User profile basics",{"type":381,"title":712,"description":2346,"example":2347},"Detailed content of the extracted factual memory.","User Zhang San, 28, backend developer in Hangzhou, enjoys badminton.",{"type":381,"title":719,"description":2349,"example":718},"Memory type classifier.\u003Cbr>Examples: UserMemory, LongTermMemory.",{"type":395,"items":2351,"title":451,"description":2352,"example":2353},{"type":381},"Tags for categorizing the memory content.",[2354,2355,2356],"person","job","hobby",{"type":374,"title":1271,"properties":2358},{"preference":2359,"reasoning":2362,"preference_type":2365},{"type":381,"title":752,"description":2360,"example":2361},"Concrete preference text extracted from the dialogue.","The user asked for replies to stay concise.",{"type":381,"title":755,"description":2363,"example":2364},"How this preference was inferred from the conversation.","The user stated this preference explicitly in the chat.",{"type":381,"title":749,"description":2366,"enum":2367,"example":747},"explicit_preference: clearly stated by the user; implicit_preference: inferred from behavior or context.",[747,748],{"type":374,"title":1283,"properties":2369},{"success":2370,"memory_detail_list":2372,"preference_detail_list":2375},{"type":405,"title":604,"description":2371},"Whether extraction succeeded.",{"type":395,"title":880,"description":2373,"items":2374},"Factual memories. Returned when the request includes memory in extraction_types, or when extraction_types is omitted.",{"$ref":1290},{"type":395,"title":885,"description":2376,"items":2377},"Preference memories. Returned when the request includes preference in extraction_types, or when extraction_types is omitted; may mix explicit and implicit preferences.",{"$ref":1294},{"type":374,"required":2379,"title":1305,"properties":2380},[378,1304],{"model":2381,"query":2384,"documents":2386,"top_n":2389},{"type":381,"title":1308,"description":2382,"enum":2383},"Model name to use.",[255,1311],{"type":381,"title":388,"description":2385},"The user query.",{"type":395,"title":1315,"description":2387,"items":2388},"A list of document texts to rerank.",{"type":381},{"type":400,"title":1319,"description":2390},"Return the top N most relevant results. If omitted, returns all results by default.",{"type":374,"required":2392,"title":1325,"properties":2393},[1323,1158,1324],{"index":2394,"document":2396,"relevance_score":2402},{"type":400,"title":1328,"description":2395},"The index position of this document in the original documents list.",{"type":374,"title":1331,"description":2397,"required":2398,"properties":2399},"Document object.",[496],{"text":2400},{"type":381,"title":1336,"description":2401},"The original text content of the document.",{"type":412,"title":1339,"description":2403},"Relevance score, ranging from 0 to 1, higher indicates more relevant to the query.",{"type":374,"required":2405,"title":1347,"properties":2406},[1343,1344,1345,1346],{"id":2407,"model":2409,"usage":2411,"results":2419},{"type":381,"title":1350,"description":2408},"Unique identifier for this request.",{"type":381,"title":1308,"description":2410},"Model name used.",{"type":374,"title":1355,"description":2412,"required":2413,"properties":2414},"Token usage statistics.",[1358,1359],{"prompt_tokens":2415,"total_tokens":2417},{"type":400,"title":1362,"description":2416},"Number of tokens consumed by the prompt.",{"type":400,"title":1365,"description":2418},"Total number of tokens consumed.",{"type":395,"title":1368,"description":2420,"items":2421},"List of reranked results, sorted in descending order by relevance_score.",{"$ref":1371},{"type":374,"required":2423,"title":1297,"properties":2424},[503,504],{"role":2425,"content":2428},{"type":381,"title":513,"enum":2426,"description":2427},[55,58,511],"Creator role of the message.",{"type":381,"title":645,"description":2429},"Message body text.",{"type":374,"required":2431,"title":1374,"properties":2432},[565],{"messages":2433,"extraction_types":2436},{"type":395,"title":572,"description":2434,"items":2435},"Array of message objects from which to extract memories. The combined Token count of all messages must not exceed 8k.",{"$ref":1379},{"type":395,"title":1381,"description":2437,"items":2438},"\u003Cp>Limits which memory types to extract; omit to extract all supported types.\u003C\u002Fp>\u003Cul>\u003Cli>\u003Ccode>memory\u003C\u002Fcode>: factual memories—user-related factual information extracted from the dialogue.\u003C\u002Fli>\u003Cli>\u003Ccode>preference\u003C\u002Fcode>: preference memories—user preferences from the dialogue, including explicit preferences (clearly stated) and implicit preferences (inferred from behavior).\u003C\u002Fli>\u003C\u002Ful>",{"type":381,"enum":2439},[236,237],{"type":374,"required":2441,"title":1387,"properties":2442},[473,474],{"code":2443,"data":2444,"message":2445},{"type":400,"format":621,"title":477,"description":1902,"example":413},{"$ref":1391},{"type":381,"title":482,"description":1851,"example":626},"en\u002Fapi_docs\u002Fapi","OlIg_PJcFYBQnIvDbR_Uxrk0eYji2HOA-4ZfSOK5a2w",[2449,2454],{"title":246,"path":2450,"stem":2451,"icon":2452,"framework":6,"module":6,"class":2453,"target":-1,"active":138,"defaultOpen":138,"children":-1,"description":-1},"\u002Fcn\u002Fapi_docs\u002Fcore\u002Frerank","api_docs\u002Fcore\u002Frerank","i-ri-sort-desc",[],{"title":271,"path":2455,"stem":2456,"icon":2457,"framework":6,"module":6,"class":2458,"target":-1,"active":138,"defaultOpen":138,"children":-1,"description":-1},"\u002Fcn\u002Fapi_docs\u002Fmessage\u002Fget_status","api_docs\u002Fmessage\u002Fget_status","i-ri-task-line",[],{"id":2460,"title":2461,"avatar":6,"banner":6,"body":2462,"category":6,"desc":6,"description":11,"extension":14,"links":6,"meta":2962,"navigation":6,"path":2963,"seo":2964,"stem":2965,"__hash__":2966},"docs\u002Fcn\u002Fapi_docs\u002Fsnippets\u002Fget_message.md","GetMessage",{"type":8,"value":2463,"toc":2960},[2464,2956],[2465,2466,2467,2865],"code-group",{},[2468,2469,2474],"pre",{"className":2470,"code":2471,"filename":2472,"language":2473,"meta":11,"style":11},"language-python shiki shiki-themes material-theme-lighter github-light-high-contrast github-dark-default","import os\nimport requests\nimport json\n\n# 替换成你的 API Key\nos.environ[\"MEMOS_API_KEY\"] = \"YOUR_API_KEY\"\nos.environ[\"MEMOS_BASE_URL\"] = \"https:\u002F\u002Fmemos.memtensor.cn\u002Fapi\u002Fopenmem\u002Fv1\"\n\ndata = {\n  \"user_id\": \"memos_user_123\",\n  \"conversation_id\": \"0610\"\n}\nheaders = {\n  \"Content-Type\": \"application\u002Fjson\",\n  \"Authorization\": f\"Token {os.environ['MEMOS_API_KEY']}\"\n}\nurl = f\"{os.environ['MEMOS_BASE_URL']}\u002Fget\u002Fmessage\"\n\nres = requests.post(url=url, headers=headers, data=json.dumps(data))\n\nprint(f\"result: {res.json()}\")\n","Python (HTTP)","python",[473,2475,2476,2488,2495,2503,2509,2516,2558,2586,2591,2602,2623,2640,2646,2656,2677,2721,2726,2761,2766,2827,2831],{"__ignoreMap":11},[2477,2478,2480,2484],"span",{"class":2479,"line":414},"line",[2477,2481,2483],{"class":2482},"sBMTB","import",[2477,2485,2487],{"class":2486},"s5ojA"," os\n",[2477,2489,2490,2492],{"class":2479,"line":12},[2477,2491,2483],{"class":2482},[2477,2493,2494],{"class":2486}," requests\n",[2477,2496,2498,2500],{"class":2479,"line":2497},3,[2477,2499,2483],{"class":2482},[2477,2501,2502],{"class":2486}," json\n",[2477,2504,2506],{"class":2479,"line":2505},4,[2477,2507,2508],{"emptyLinePlaceholder":45},"\n",[2477,2510,2512],{"class":2479,"line":2511},5,[2477,2513,2515],{"class":2514},"sfVK4","# 替换成你的 API Key\n",[2477,2517,2518,2521,2525,2529,2532,2536,2540,2542,2545,2549,2552,2555],{"class":2479,"line":86},[2477,2519,2520],{"class":2486},"os",[2477,2522,2524],{"class":2523},"suWxN",".",[2477,2526,2528],{"class":2527},"s5qkx","environ",[2477,2530,2531],{"class":2523},"[",[2477,2533,2535],{"class":2534},"sjUum","\"",[2477,2537,2539],{"class":2538},"sp1uZ","MEMOS_API_KEY",[2477,2541,2535],{"class":2534},[2477,2543,2544],{"class":2523},"]",[2477,2546,2548],{"class":2547},"saN0X"," =",[2477,2550,2551],{"class":2534}," \"",[2477,2553,2554],{"class":2538},"YOUR_API_KEY",[2477,2556,2557],{"class":2534},"\"\n",[2477,2559,2561,2563,2565,2567,2569,2571,2574,2576,2578,2580,2582,2584],{"class":2479,"line":2560},7,[2477,2562,2520],{"class":2486},[2477,2564,2524],{"class":2523},[2477,2566,2528],{"class":2527},[2477,2568,2531],{"class":2523},[2477,2570,2535],{"class":2534},[2477,2572,2573],{"class":2538},"MEMOS_BASE_URL",[2477,2575,2535],{"class":2534},[2477,2577,2544],{"class":2523},[2477,2579,2548],{"class":2547},[2477,2581,2551],{"class":2534},[2477,2583,33],{"class":2538},[2477,2585,2557],{"class":2534},[2477,2587,2589],{"class":2479,"line":2588},8,[2477,2590,2508],{"emptyLinePlaceholder":45},[2477,2592,2593,2596,2599],{"class":2479,"line":403},[2477,2594,2595],{"class":2486},"data ",[2477,2597,2598],{"class":2547},"=",[2477,2600,2601],{"class":2523}," {\n",[2477,2603,2604,2607,2609,2611,2614,2616,2618,2620],{"class":2479,"line":921},[2477,2605,2606],{"class":2534},"  \"",[2477,2608,376],{"class":2538},[2477,2610,2535],{"class":2534},[2477,2612,2613],{"class":2523},":",[2477,2615,2551],{"class":2534},[2477,2617,51],{"class":2538},[2477,2619,2535],{"class":2534},[2477,2621,2622],{"class":2523},",\n",[2477,2624,2626,2628,2630,2632,2634,2636,2638],{"class":2479,"line":2625},11,[2477,2627,2606],{"class":2534},[2477,2629,377],{"class":2538},[2477,2631,2535],{"class":2534},[2477,2633,2613],{"class":2523},[2477,2635,2551],{"class":2534},[2477,2637,52],{"class":2538},[2477,2639,2557],{"class":2534},[2477,2641,2643],{"class":2479,"line":2642},12,[2477,2644,2645],{"class":2523},"}\n",[2477,2647,2649,2652,2654],{"class":2479,"line":2648},13,[2477,2650,2651],{"class":2486},"headers ",[2477,2653,2598],{"class":2547},[2477,2655,2601],{"class":2523},[2477,2657,2659,2661,2664,2666,2668,2670,2673,2675],{"class":2479,"line":2658},14,[2477,2660,2606],{"class":2534},[2477,2662,2663],{"class":2538},"Content-Type",[2477,2665,2535],{"class":2534},[2477,2667,2613],{"class":2523},[2477,2669,2551],{"class":2534},[2477,2671,2672],{"class":2538},"application\u002Fjson",[2477,2674,2535],{"class":2534},[2477,2676,2622],{"class":2523},[2477,2678,2680,2682,2684,2686,2688,2692,2695,2699,2701,2703,2705,2707,2710,2712,2714,2716,2719],{"class":2479,"line":2679},15,[2477,2681,2606],{"class":2534},[2477,2683,369],{"class":2538},[2477,2685,2535],{"class":2534},[2477,2687,2613],{"class":2523},[2477,2689,2691],{"class":2690},"sZ6T4"," f",[2477,2693,2694],{"class":2538},"\"Token ",[2477,2696,2698],{"class":2697},"scyET","{",[2477,2700,2520],{"class":2486},[2477,2702,2524],{"class":2523},[2477,2704,2528],{"class":2527},[2477,2706,2531],{"class":2523},[2477,2708,2709],{"class":2534},"'",[2477,2711,2539],{"class":2538},[2477,2713,2709],{"class":2534},[2477,2715,2544],{"class":2523},[2477,2717,2718],{"class":2697},"}",[2477,2720,2557],{"class":2538},[2477,2722,2724],{"class":2479,"line":2723},16,[2477,2725,2645],{"class":2523},[2477,2727,2729,2732,2734,2736,2738,2740,2742,2744,2746,2748,2750,2752,2754,2756,2758],{"class":2479,"line":2728},17,[2477,2730,2731],{"class":2486},"url ",[2477,2733,2598],{"class":2547},[2477,2735,2691],{"class":2690},[2477,2737,2535],{"class":2538},[2477,2739,2698],{"class":2697},[2477,2741,2520],{"class":2486},[2477,2743,2524],{"class":2523},[2477,2745,2528],{"class":2527},[2477,2747,2531],{"class":2523},[2477,2749,2709],{"class":2534},[2477,2751,2573],{"class":2538},[2477,2753,2709],{"class":2534},[2477,2755,2544],{"class":2523},[2477,2757,2718],{"class":2697},[2477,2759,2760],{"class":2538},"\u002Fget\u002Fmessage\"\n",[2477,2762,2764],{"class":2479,"line":2763},18,[2477,2765,2508],{"emptyLinePlaceholder":45},[2477,2767,2769,2772,2774,2777,2779,2783,2786,2790,2792,2794,2797,2800,2802,2805,2807,2810,2812,2814,2816,2819,2821,2824],{"class":2479,"line":2768},19,[2477,2770,2771],{"class":2486},"res ",[2477,2773,2598],{"class":2547},[2477,2775,2776],{"class":2486}," requests",[2477,2778,2524],{"class":2523},[2477,2780,2782],{"class":2781},"sa-2m","post",[2477,2784,2785],{"class":2523},"(",[2477,2787,2789],{"class":2788},"sp4zP","url",[2477,2791,2598],{"class":2547},[2477,2793,2789],{"class":2781},[2477,2795,2796],{"class":2523},",",[2477,2798,2799],{"class":2788}," headers",[2477,2801,2598],{"class":2547},[2477,2803,2804],{"class":2781},"headers",[2477,2806,2796],{"class":2523},[2477,2808,2809],{"class":2788}," data",[2477,2811,2598],{"class":2547},[2477,2813,24],{"class":2781},[2477,2815,2524],{"class":2523},[2477,2817,2818],{"class":2781},"dumps",[2477,2820,2785],{"class":2523},[2477,2822,2823],{"class":2781},"data",[2477,2825,2826],{"class":2523},"))\n",[2477,2828,2829],{"class":2479,"line":1201},[2477,2830,2508],{"emptyLinePlaceholder":45},[2477,2832,2834,2838,2840,2843,2846,2848,2851,2853,2855,2858,2860,2862],{"class":2479,"line":2833},21,[2477,2835,2837],{"class":2836},"svxCd","print",[2477,2839,2785],{"class":2523},[2477,2841,2842],{"class":2690},"f",[2477,2844,2845],{"class":2538},"\"result: ",[2477,2847,2698],{"class":2697},[2477,2849,2850],{"class":2781},"res",[2477,2852,2524],{"class":2523},[2477,2854,24],{"class":2781},[2477,2856,2857],{"class":2523},"()",[2477,2859,2718],{"class":2697},[2477,2861,2535],{"class":2538},[2477,2863,2864],{"class":2523},")\n",[2468,2866,2871],{"className":2867,"code":2868,"filename":2869,"language":2870,"meta":11,"style":11},"language-bash shiki shiki-themes material-theme-lighter github-light-high-contrast github-dark-default","curl --request POST \\\n  --url https:\u002F\u002Fmemos.memtensor.cn\u002Fapi\u002Fopenmem\u002Fv1\u002Fget\u002Fmessage \\\n  --header 'Authorization: Token YOUR_API_KEY' \\\n  --header 'Content-Type: application\u002Fjson' \\\n  --data '{\n    \"user_id\": \"memos_user_123\",\n    \"conversation_id\": \"0610\"\n  }'\n","Curl","bash",[473,2872,2873,2890,2900,2915,2928,2938,2943,2948],{"__ignoreMap":11},[2477,2874,2875,2879,2883,2886],{"class":2479,"line":414},[2477,2876,2878],{"class":2877},"saonL","curl",[2477,2880,2882],{"class":2881},"sp2SP"," --request",[2477,2884,2885],{"class":2538}," POST",[2477,2887,2889],{"class":2888},"seOsA"," \\\n",[2477,2891,2892,2895,2898],{"class":2479,"line":12},[2477,2893,2894],{"class":2881},"  --url",[2477,2896,2897],{"class":2538}," https:\u002F\u002Fmemos.memtensor.cn\u002Fapi\u002Fopenmem\u002Fv1\u002Fget\u002Fmessage",[2477,2899,2889],{"class":2888},[2477,2901,2902,2905,2908,2911,2913],{"class":2479,"line":2497},[2477,2903,2904],{"class":2881},"  --header",[2477,2906,2907],{"class":2534}," '",[2477,2909,2910],{"class":2538},"Authorization: Token YOUR_API_KEY",[2477,2912,2709],{"class":2534},[2477,2914,2889],{"class":2888},[2477,2916,2917,2919,2921,2924,2926],{"class":2479,"line":2505},[2477,2918,2904],{"class":2881},[2477,2920,2907],{"class":2534},[2477,2922,2923],{"class":2538},"Content-Type: application\u002Fjson",[2477,2925,2709],{"class":2534},[2477,2927,2889],{"class":2888},[2477,2929,2930,2933,2935],{"class":2479,"line":2511},[2477,2931,2932],{"class":2881},"  --data",[2477,2934,2907],{"class":2534},[2477,2936,2937],{"class":2538},"{\n",[2477,2939,2940],{"class":2479,"line":86},[2477,2941,2942],{"class":2538},"    \"user_id\": \"memos_user_123\",\n",[2477,2944,2945],{"class":2479,"line":2560},[2477,2946,2947],{"class":2538},"    \"conversation_id\": \"0610\"\n",[2477,2949,2950,2953],{"class":2479,"line":2588},[2477,2951,2952],{"class":2538},"  }",[2477,2954,2955],{"class":2534},"'\n",[2957,2958,2959],"style",{},"html pre.shiki code .sBMTB, html code.shiki .sBMTB{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#A0111F;--shiki-default-font-style:inherit;--shiki-dark:#FF7B72;--shiki-dark-font-style:inherit}html pre.shiki code .s5ojA, html code.shiki .s5ojA{--shiki-light:#90A4AE;--shiki-default:#0E1116;--shiki-dark:#E6EDF3}html pre.shiki code .sfVK4, html code.shiki .sfVK4{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#66707B;--shiki-default-font-style:inherit;--shiki-dark:#8B949E;--shiki-dark-font-style:inherit}html pre.shiki code .suWxN, html code.shiki .suWxN{--shiki-light:#39ADB5;--shiki-default:#0E1116;--shiki-dark:#E6EDF3}html pre.shiki code .s5qkx, html code.shiki .s5qkx{--shiki-light:#E53935;--shiki-default:#0E1116;--shiki-dark:#E6EDF3}html pre.shiki code .sjUum, html code.shiki .sjUum{--shiki-light:#39ADB5;--shiki-default:#032563;--shiki-dark:#A5D6FF}html pre.shiki code .sp1uZ, html code.shiki .sp1uZ{--shiki-light:#91B859;--shiki-default:#032563;--shiki-dark:#A5D6FF}html pre.shiki code .saN0X, html code.shiki .saN0X{--shiki-light:#39ADB5;--shiki-default:#A0111F;--shiki-dark:#FF7B72}html pre.shiki code .sZ6T4, html code.shiki .sZ6T4{--shiki-light:#9C3EDA;--shiki-default:#A0111F;--shiki-dark:#FF7B72}html pre.shiki code .scyET, html code.shiki .scyET{--shiki-light:#F76D47;--shiki-default:#A0111F;--shiki-dark:#FF7B72}html pre.shiki code .sa-2m, html code.shiki .sa-2m{--shiki-light:#6182B8;--shiki-default:#0E1116;--shiki-dark:#E6EDF3}html pre.shiki code .sp4zP, html code.shiki .sp4zP{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#702C00;--shiki-default-font-style:inherit;--shiki-dark:#FFA657;--shiki-dark-font-style:inherit}html pre.shiki code .svxCd, html code.shiki .svxCd{--shiki-light:#6182B8;--shiki-default:#023B95;--shiki-dark:#79C0FF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .saonL, html code.shiki .saonL{--shiki-light:#E2931D;--shiki-default:#702C00;--shiki-dark:#FFA657}html pre.shiki code .sp2SP, html code.shiki .sp2SP{--shiki-light:#91B859;--shiki-default:#023B95;--shiki-dark:#79C0FF}html pre.shiki code .seOsA, html code.shiki .seOsA{--shiki-light:#90A4AE;--shiki-default:#A0111F;--shiki-dark:#FF7B72}",{"title":11,"searchDepth":12,"depth":12,"links":2961},[],{},"\u002Fcn\u002Fapi_docs\u002Fsnippets\u002Fget_message",{"description":11},"cn\u002Fapi_docs\u002Fsnippets\u002Fget_message","w1xbcxqDMVTHna_L4mYGgLvLkJbZ0HvLKauKTQFp3w4",1778836916665]