[{"data":1,"prerenderedAt":1475},["ShallowReactive",2],{"docs-page-en-\u002Fmemos_cloud\u002Fgetting_started\u002Fquick_start":3,"surround-en-\u002Fmemos_cloud\u002Fgetting_started\u002Fquick_start":1462},{"id":4,"title":5,"avatar":6,"banner":6,"body":7,"category":6,"desc":1454,"description":1455,"extension":1456,"links":6,"meta":1457,"navigation":6,"path":1458,"seo":1459,"stem":1460,"__hash__":1461},"docs\u002Fen\u002Fmemos_cloud\u002Fgetting_started\u002Fquick_start.md","Quick Start",null,{"type":8,"value":9,"toc":1443},"minimark",[10,20,37,44,47,52,74,76,80,1406,1408,1412,1439],[11,12,13,14,19],"p",{},"When you integrate MemOS into an AI application, the full flow looks like this. MemOS provides two core APIs: ",[15,16,18],"a",{"href":17},"\u002Fapi_docs\u002Fcore\u002Fadd_message","see API docs",".",[21,22,23,31],"ul",{},[24,25,26,30],"li",{},[27,28,29],"code",{},"addMessage",": send raw conversations to MemOS. MemOS automatically processes and stores them as memories.",[24,32,33,36],{},[27,34,35],{},"searchMemory",": recall memories in later conversations, so AI responses better match user needs.",[11,38,39],{},[40,41],"img",{"alt":42,"src":43},"image.svg","https:\u002F\u002Fcdn.memtensor.com.cn\u002Fimg\u002F1762434889291_h9co0h_compressed.png",[45,46],"br",{},[48,49,51],"h2",{"id":50},"_1-before-calling-the-api","1. Before Calling the API",[21,53,54,63,71],{},[24,55,56,57,19],{},"Register and sign in to ",[15,58,62],{"href":59,"rel":60},"https:\u002F\u002Fmemos-dashboard.openmem.net\u002Fquickstart",[61],"nofollow","MemOS Cloud",[24,64,65,66,19],{},"Get an API Key from the ",[15,67,70],{"href":68,"rel":69},"https:\u002F\u002Fmemos-dashboard.openmem.net\u002Fapikeys",[61],"API Key page",[24,72,73],{},"Prepare an environment that can send HTTP requests, such as Python or cURL.",[45,75],{},[48,77,79],{"id":78},"_2-create-a-memory","2. Create a Memory",[81,82,84,89,92,121,125,291,295,298,1019,1023,1026,1348,1353,1356,1364,1368,1371],"steps",{"level":83},"3",[85,86,88],"h3",{"id":87},"install-the-sdk","Install the SDK",[11,90,91],{},"If you choose the Python SDK, make sure Python 3.10+ is installed, then run:",[93,94,99],"pre",{"className":95,"code":96,"language":97,"meta":98,"style":98},"language-bash shiki shiki-themes material-theme-lighter github-light-high-contrast github-dark-default","pip install MemoryOS -U\n","bash","",[27,100,101],{"__ignoreMap":98},[102,103,106,110,114,117],"span",{"class":104,"line":105},"line",1,[102,107,109],{"class":108},"saonL","pip",[102,111,113],{"class":112},"sp1uZ"," install",[102,115,116],{"class":112}," MemoryOS",[102,118,120],{"class":119},"sp2SP"," -U\n",[85,122,124],{"id":123},"set-the-api-key","Set the API Key",[126,127,128,189,253],"code-group",{},[93,129,134],{"className":130,"code":131,"filename":132,"language":133,"meta":98,"style":98},"language-python shiki shiki-themes material-theme-lighter github-light-high-contrast github-dark-default","import requests\n\nAPI_KEY = \"YOUR_API_KEY\"\nBASE_URL = \"https:\u002F\u002Fmemos.memtensor.cn\u002Fapi\u002Fopenmem\u002Fv1\"\n","Python (HTTP)","python",[27,135,136,146,153,174],{"__ignoreMap":98},[102,137,138,142],{"class":104,"line":105},[102,139,141],{"class":140},"sBMTB","import",[102,143,145],{"class":144},"s5ojA"," requests\n",[102,147,149],{"class":104,"line":148},2,[102,150,152],{"emptyLinePlaceholder":151},true,"\n",[102,154,156,160,164,168,171],{"class":104,"line":155},3,[102,157,159],{"class":158},"sZaqd","API_KEY",[102,161,163],{"class":162},"saN0X"," =",[102,165,167],{"class":166},"sjUum"," \"",[102,169,170],{"class":112},"YOUR_API_KEY",[102,172,173],{"class":166},"\"\n",[102,175,177,180,182,184,187],{"class":104,"line":176},4,[102,178,179],{"class":158},"BASE_URL",[102,181,163],{"class":162},[102,183,167],{"class":166},[102,185,186],{"class":112},"https:\u002F\u002Fmemos.memtensor.cn\u002Fapi\u002Fopenmem\u002Fv1",[102,188,173],{"class":166},[93,190,193],{"className":130,"code":191,"filename":192,"language":133,"meta":98,"style":98},"from memos.api.client import MemOSClient\n\nclient = MemOSClient(api_key=\"YOUR_API_KEY\")\n","Python (SDK)",[27,194,195,219,223],{"__ignoreMap":98},[102,196,197,200,203,206,209,211,214,216],{"class":104,"line":105},[102,198,199],{"class":140},"from",[102,201,202],{"class":144}," memos",[102,204,19],{"class":205},"suWxN",[102,207,208],{"class":144},"api",[102,210,19],{"class":205},[102,212,213],{"class":144},"client ",[102,215,141],{"class":140},[102,217,218],{"class":144}," MemOSClient\n",[102,220,221],{"class":104,"line":148},[102,222,152],{"emptyLinePlaceholder":151},[102,224,225,227,230,234,237,241,243,246,248,250],{"class":104,"line":155},[102,226,213],{"class":144},[102,228,229],{"class":162},"=",[102,231,233],{"class":232},"sa-2m"," MemOSClient",[102,235,236],{"class":205},"(",[102,238,240],{"class":239},"sp4zP","api_key",[102,242,229],{"class":162},[102,244,245],{"class":166},"\"",[102,247,170],{"class":112},[102,249,245],{"class":166},[102,251,252],{"class":205},")\n",[93,254,257],{"className":95,"code":255,"filename":256,"language":97,"meta":98,"style":98},"export MEMOS_API_KEY=\"YOUR_API_KEY\"\nexport MEMOS_BASE_URL=\"https:\u002F\u002Fmemos.memtensor.cn\u002Fapi\u002Fopenmem\u002Fv1\"\n","Curl",[27,258,259,276],{"__ignoreMap":98},[102,260,261,265,268,270,272,274],{"class":104,"line":105},[102,262,264],{"class":263},"sZ6T4","export",[102,266,267],{"class":144}," MEMOS_API_KEY",[102,269,229],{"class":162},[102,271,245],{"class":166},[102,273,170],{"class":112},[102,275,173],{"class":166},[102,277,278,280,283,285,287,289],{"class":104,"line":148},[102,279,264],{"class":263},[102,281,282],{"class":144}," MEMOS_BASE_URL",[102,284,229],{"class":162},[102,286,245],{"class":166},[102,288,186],{"class":112},[102,290,173],{"class":166},[85,292,294],{"id":293},"add-raw-information","Add Raw Information",[11,296,297],{},"Session A happened on 2025-06-10. The user chose 7 Days Inn as the hotel for a summer trip to Guangzhou. You only need to pass the raw conversation records to MemOS.",[126,299,300,665,906],{},[93,301,303],{"className":130,"code":302,"filename":132,"language":133,"meta":98,"style":98},"data = {\n  \"user_id\": \"memos_user_123\",\n  \"conversation_id\": \"0610\",\n  \"messages\": [\n    {\"role\": \"user\", \"content\": \"I have booked a summer trip to Guangzhou. Which hotel chains are available?\"},\n    {\"role\": \"assistant\", \"content\": \"You can consider 7 Days Inn, Ji Hotel, Hilton, and others.\"},\n    {\"role\": \"user\", \"content\": \"I will choose 7 Days Inn.\"},\n    {\"role\": \"assistant\", \"content\": \"Got it. Feel free to ask if you have other questions.\"}\n  ]\n}\n\nres = requests.post(\n  f\"{BASE_URL}\u002Fadd\u002Fmessage\",\n  headers={\"Authorization\": f\"Token {API_KEY}\"},\n  json=data\n)\n\nprint(res.json())\n",[27,304,305,315,338,358,372,416,455,493,532,538,543,548,567,590,625,636,641,646],{"__ignoreMap":98},[102,306,307,310,312],{"class":104,"line":105},[102,308,309],{"class":144},"data ",[102,311,229],{"class":162},[102,313,314],{"class":205}," {\n",[102,316,317,320,323,325,328,330,333,335],{"class":104,"line":148},[102,318,319],{"class":166},"  \"",[102,321,322],{"class":112},"user_id",[102,324,245],{"class":166},[102,326,327],{"class":205},":",[102,329,167],{"class":166},[102,331,332],{"class":112},"memos_user_123",[102,334,245],{"class":166},[102,336,337],{"class":205},",\n",[102,339,340,342,345,347,349,351,354,356],{"class":104,"line":155},[102,341,319],{"class":166},[102,343,344],{"class":112},"conversation_id",[102,346,245],{"class":166},[102,348,327],{"class":205},[102,350,167],{"class":166},[102,352,353],{"class":112},"0610",[102,355,245],{"class":166},[102,357,337],{"class":205},[102,359,360,362,365,367,369],{"class":104,"line":176},[102,361,319],{"class":166},[102,363,364],{"class":112},"messages",[102,366,245],{"class":166},[102,368,327],{"class":205},[102,370,371],{"class":205}," [\n",[102,373,375,378,380,383,385,387,389,392,394,397,399,402,404,406,408,411,413],{"class":104,"line":374},5,[102,376,377],{"class":205},"    {",[102,379,245],{"class":166},[102,381,382],{"class":112},"role",[102,384,245],{"class":166},[102,386,327],{"class":205},[102,388,167],{"class":166},[102,390,391],{"class":112},"user",[102,393,245],{"class":166},[102,395,396],{"class":205},",",[102,398,167],{"class":166},[102,400,401],{"class":112},"content",[102,403,245],{"class":166},[102,405,327],{"class":205},[102,407,167],{"class":166},[102,409,410],{"class":112},"I have booked a summer trip to Guangzhou. Which hotel chains are available?",[102,412,245],{"class":166},[102,414,415],{"class":205},"},\n",[102,417,419,421,423,425,427,429,431,434,436,438,440,442,444,446,448,451,453],{"class":104,"line":418},6,[102,420,377],{"class":205},[102,422,245],{"class":166},[102,424,382],{"class":112},[102,426,245],{"class":166},[102,428,327],{"class":205},[102,430,167],{"class":166},[102,432,433],{"class":112},"assistant",[102,435,245],{"class":166},[102,437,396],{"class":205},[102,439,167],{"class":166},[102,441,401],{"class":112},[102,443,245],{"class":166},[102,445,327],{"class":205},[102,447,167],{"class":166},[102,449,450],{"class":112},"You can consider 7 Days Inn, Ji Hotel, Hilton, and others.",[102,452,245],{"class":166},[102,454,415],{"class":205},[102,456,458,460,462,464,466,468,470,472,474,476,478,480,482,484,486,489,491],{"class":104,"line":457},7,[102,459,377],{"class":205},[102,461,245],{"class":166},[102,463,382],{"class":112},[102,465,245],{"class":166},[102,467,327],{"class":205},[102,469,167],{"class":166},[102,471,391],{"class":112},[102,473,245],{"class":166},[102,475,396],{"class":205},[102,477,167],{"class":166},[102,479,401],{"class":112},[102,481,245],{"class":166},[102,483,327],{"class":205},[102,485,167],{"class":166},[102,487,488],{"class":112},"I will choose 7 Days Inn.",[102,490,245],{"class":166},[102,492,415],{"class":205},[102,494,496,498,500,502,504,506,508,510,512,514,516,518,520,522,524,527,529],{"class":104,"line":495},8,[102,497,377],{"class":205},[102,499,245],{"class":166},[102,501,382],{"class":112},[102,503,245],{"class":166},[102,505,327],{"class":205},[102,507,167],{"class":166},[102,509,433],{"class":112},[102,511,245],{"class":166},[102,513,396],{"class":205},[102,515,167],{"class":166},[102,517,401],{"class":112},[102,519,245],{"class":166},[102,521,327],{"class":205},[102,523,167],{"class":166},[102,525,526],{"class":112},"Got it. Feel free to ask if you have other questions.",[102,528,245],{"class":166},[102,530,531],{"class":205},"}\n",[102,533,535],{"class":104,"line":534},9,[102,536,537],{"class":205},"  ]\n",[102,539,541],{"class":104,"line":540},10,[102,542,531],{"class":205},[102,544,546],{"class":104,"line":545},11,[102,547,152],{"emptyLinePlaceholder":151},[102,549,551,554,556,559,561,564],{"class":104,"line":550},12,[102,552,553],{"class":144},"res ",[102,555,229],{"class":162},[102,557,558],{"class":144}," requests",[102,560,19],{"class":205},[102,562,563],{"class":232},"post",[102,565,566],{"class":205},"(\n",[102,568,570,573,575,579,582,585,588],{"class":104,"line":569},13,[102,571,572],{"class":263},"  f",[102,574,245],{"class":112},[102,576,578],{"class":577},"scyET","{",[102,580,179],{"class":581},"svxCd",[102,583,584],{"class":577},"}",[102,586,587],{"class":112},"\u002Fadd\u002Fmessage\"",[102,589,337],{"class":205},[102,591,593,596,598,600,602,605,607,609,612,615,617,619,621,623],{"class":104,"line":592},14,[102,594,595],{"class":239},"  headers",[102,597,229],{"class":162},[102,599,578],{"class":205},[102,601,245],{"class":166},[102,603,604],{"class":112},"Authorization",[102,606,245],{"class":166},[102,608,327],{"class":205},[102,610,611],{"class":263}," f",[102,613,614],{"class":112},"\"Token ",[102,616,578],{"class":577},[102,618,159],{"class":581},[102,620,584],{"class":577},[102,622,245],{"class":112},[102,624,415],{"class":205},[102,626,628,631,633],{"class":104,"line":627},15,[102,629,630],{"class":239},"  json",[102,632,229],{"class":162},[102,634,635],{"class":232},"data\n",[102,637,639],{"class":104,"line":638},16,[102,640,252],{"class":205},[102,642,644],{"class":104,"line":643},17,[102,645,152],{"emptyLinePlaceholder":151},[102,647,649,652,654,657,659,662],{"class":104,"line":648},18,[102,650,651],{"class":581},"print",[102,653,236],{"class":205},[102,655,656],{"class":232},"res",[102,658,19],{"class":205},[102,660,661],{"class":232},"json",[102,663,664],{"class":205},"())\n",[93,666,668],{"className":130,"code":667,"filename":192,"language":133,"meta":98,"style":98},"messages = [\n  {\"role\": \"user\", \"content\": \"I have booked a summer trip to Guangzhou. Which hotel chains are available?\"},\n  {\"role\": \"assistant\", \"content\": \"You can consider 7 Days Inn, Ji Hotel, Hilton, and others.\"},\n  {\"role\": \"user\", \"content\": \"I will choose 7 Days Inn.\"},\n  {\"role\": \"assistant\", \"content\": \"Got it. Feel free to ask if you have other questions.\"}\n]\n\nres = client.add_message(\n  messages=messages,\n  user_id=\"memos_user_123\",\n  conversation_id=\"0610\"\n)\n\nprint(res)\n",[27,669,670,679,716,752,788,824,829,833,849,860,875,888,892,896],{"__ignoreMap":98},[102,671,672,675,677],{"class":104,"line":105},[102,673,674],{"class":144},"messages ",[102,676,229],{"class":162},[102,678,371],{"class":205},[102,680,681,684,686,688,690,692,694,696,698,700,702,704,706,708,710,712,714],{"class":104,"line":148},[102,682,683],{"class":205},"  {",[102,685,245],{"class":166},[102,687,382],{"class":112},[102,689,245],{"class":166},[102,691,327],{"class":205},[102,693,167],{"class":166},[102,695,391],{"class":112},[102,697,245],{"class":166},[102,699,396],{"class":205},[102,701,167],{"class":166},[102,703,401],{"class":112},[102,705,245],{"class":166},[102,707,327],{"class":205},[102,709,167],{"class":166},[102,711,410],{"class":112},[102,713,245],{"class":166},[102,715,415],{"class":205},[102,717,718,720,722,724,726,728,730,732,734,736,738,740,742,744,746,748,750],{"class":104,"line":155},[102,719,683],{"class":205},[102,721,245],{"class":166},[102,723,382],{"class":112},[102,725,245],{"class":166},[102,727,327],{"class":205},[102,729,167],{"class":166},[102,731,433],{"class":112},[102,733,245],{"class":166},[102,735,396],{"class":205},[102,737,167],{"class":166},[102,739,401],{"class":112},[102,741,245],{"class":166},[102,743,327],{"class":205},[102,745,167],{"class":166},[102,747,450],{"class":112},[102,749,245],{"class":166},[102,751,415],{"class":205},[102,753,754,756,758,760,762,764,766,768,770,772,774,776,778,780,782,784,786],{"class":104,"line":176},[102,755,683],{"class":205},[102,757,245],{"class":166},[102,759,382],{"class":112},[102,761,245],{"class":166},[102,763,327],{"class":205},[102,765,167],{"class":166},[102,767,391],{"class":112},[102,769,245],{"class":166},[102,771,396],{"class":205},[102,773,167],{"class":166},[102,775,401],{"class":112},[102,777,245],{"class":166},[102,779,327],{"class":205},[102,781,167],{"class":166},[102,783,488],{"class":112},[102,785,245],{"class":166},[102,787,415],{"class":205},[102,789,790,792,794,796,798,800,802,804,806,808,810,812,814,816,818,820,822],{"class":104,"line":374},[102,791,683],{"class":205},[102,793,245],{"class":166},[102,795,382],{"class":112},[102,797,245],{"class":166},[102,799,327],{"class":205},[102,801,167],{"class":166},[102,803,433],{"class":112},[102,805,245],{"class":166},[102,807,396],{"class":205},[102,809,167],{"class":166},[102,811,401],{"class":112},[102,813,245],{"class":166},[102,815,327],{"class":205},[102,817,167],{"class":166},[102,819,526],{"class":112},[102,821,245],{"class":166},[102,823,531],{"class":205},[102,825,826],{"class":104,"line":418},[102,827,828],{"class":205},"]\n",[102,830,831],{"class":104,"line":457},[102,832,152],{"emptyLinePlaceholder":151},[102,834,835,837,839,842,844,847],{"class":104,"line":495},[102,836,553],{"class":144},[102,838,229],{"class":162},[102,840,841],{"class":144}," client",[102,843,19],{"class":205},[102,845,846],{"class":232},"add_message",[102,848,566],{"class":205},[102,850,851,854,856,858],{"class":104,"line":534},[102,852,853],{"class":239},"  messages",[102,855,229],{"class":162},[102,857,364],{"class":232},[102,859,337],{"class":205},[102,861,862,865,867,869,871,873],{"class":104,"line":540},[102,863,864],{"class":239},"  user_id",[102,866,229],{"class":162},[102,868,245],{"class":166},[102,870,332],{"class":112},[102,872,245],{"class":166},[102,874,337],{"class":205},[102,876,877,880,882,884,886],{"class":104,"line":545},[102,878,879],{"class":239},"  conversation_id",[102,881,229],{"class":162},[102,883,245],{"class":166},[102,885,353],{"class":112},[102,887,173],{"class":166},[102,889,890],{"class":104,"line":550},[102,891,252],{"class":205},[102,893,894],{"class":104,"line":569},[102,895,152],{"emptyLinePlaceholder":151},[102,897,898,900,902,904],{"class":104,"line":592},[102,899,651],{"class":581},[102,901,236],{"class":205},[102,903,656],{"class":232},[102,905,252],{"class":205},[93,907,909],{"className":95,"code":908,"filename":256,"language":97,"meta":98,"style":98},"curl \"$MEMOS_BASE_URL\u002Fadd\u002Fmessage\" \\\n  -H \"Authorization: Token $MEMOS_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"user_id\": \"memos_user_123\",\n    \"conversation_id\": \"0610\",\n    \"messages\": [\n      {\"role\": \"user\", \"content\": \"I have booked a summer trip to Guangzhou. Which hotel chains are available?\"},\n      {\"role\": \"assistant\", \"content\": \"You can consider 7 Days Inn, Ji Hotel, Hilton, and others.\"},\n      {\"role\": \"user\", \"content\": \"I will choose 7 Days Inn.\"},\n      {\"role\": \"assistant\", \"content\": \"Got it. Feel free to ask if you have other questions.\"}\n    ]\n  }'\n",[27,910,911,930,947,960,971,976,981,986,991,996,1001,1006,1011],{"__ignoreMap":98},[102,912,913,916,918,921,924,926],{"class":104,"line":105},[102,914,915],{"class":108},"curl",[102,917,167],{"class":166},[102,919,920],{"class":144},"$MEMOS_BASE_URL",[102,922,923],{"class":112},"\u002Fadd\u002Fmessage",[102,925,245],{"class":166},[102,927,929],{"class":928},"seOsA"," \\\n",[102,931,932,935,937,940,943,945],{"class":104,"line":148},[102,933,934],{"class":119},"  -H",[102,936,167],{"class":166},[102,938,939],{"class":112},"Authorization: Token ",[102,941,942],{"class":144},"$MEMOS_API_KEY",[102,944,245],{"class":166},[102,946,929],{"class":928},[102,948,949,951,953,956,958],{"class":104,"line":155},[102,950,934],{"class":119},[102,952,167],{"class":166},[102,954,955],{"class":112},"Content-Type: application\u002Fjson",[102,957,245],{"class":166},[102,959,929],{"class":928},[102,961,962,965,968],{"class":104,"line":176},[102,963,964],{"class":119},"  -d",[102,966,967],{"class":166}," '",[102,969,970],{"class":112},"{\n",[102,972,973],{"class":104,"line":374},[102,974,975],{"class":112},"    \"user_id\": \"memos_user_123\",\n",[102,977,978],{"class":104,"line":418},[102,979,980],{"class":112},"    \"conversation_id\": \"0610\",\n",[102,982,983],{"class":104,"line":457},[102,984,985],{"class":112},"    \"messages\": [\n",[102,987,988],{"class":104,"line":495},[102,989,990],{"class":112},"      {\"role\": \"user\", \"content\": \"I have booked a summer trip to Guangzhou. Which hotel chains are available?\"},\n",[102,992,993],{"class":104,"line":534},[102,994,995],{"class":112},"      {\"role\": \"assistant\", \"content\": \"You can consider 7 Days Inn, Ji Hotel, Hilton, and others.\"},\n",[102,997,998],{"class":104,"line":540},[102,999,1000],{"class":112},"      {\"role\": \"user\", \"content\": \"I will choose 7 Days Inn.\"},\n",[102,1002,1003],{"class":104,"line":545},[102,1004,1005],{"class":112},"      {\"role\": \"assistant\", \"content\": \"Got it. Feel free to ask if you have other questions.\"}\n",[102,1007,1008],{"class":104,"line":550},[102,1009,1010],{"class":112},"    ]\n",[102,1012,1013,1016],{"class":104,"line":569},[102,1014,1015],{"class":112},"  }",[102,1017,1018],{"class":166},"'\n",[85,1020,1022],{"id":1021},"search-relevant-memories","Search Relevant Memories",[11,1024,1025],{},"Session B happened on 2025-09-28. The user asks the AI to recommend a National Day travel destination and hotel. Use the user's message as the query to search MemOS memories.",[126,1027,1028,1195,1274],{},[93,1029,1031],{"className":130,"code":1030,"filename":132,"language":133,"meta":98,"style":98},"data = {\n  \"query\": \"I want to travel during the National Day holiday. Please recommend a city I have not been to and a hotel brand I have not stayed at.\",\n  \"user_id\": \"memos_user_123\",\n  \"conversation_id\": \"0928\"\n}\n\nres = requests.post(\n  f\"{BASE_URL}\u002Fsearch\u002Fmemory\",\n  headers={\"Authorization\": f\"Token {API_KEY}\"},\n  json=data\n)\n\nprint(res.json())\n",[27,1032,1033,1041,1061,1079,1096,1100,1104,1118,1135,1165,1173,1177,1181],{"__ignoreMap":98},[102,1034,1035,1037,1039],{"class":104,"line":105},[102,1036,309],{"class":144},[102,1038,229],{"class":162},[102,1040,314],{"class":205},[102,1042,1043,1045,1048,1050,1052,1054,1057,1059],{"class":104,"line":148},[102,1044,319],{"class":166},[102,1046,1047],{"class":112},"query",[102,1049,245],{"class":166},[102,1051,327],{"class":205},[102,1053,167],{"class":166},[102,1055,1056],{"class":112},"I want to travel during the National Day holiday. Please recommend a city I have not been to and a hotel brand I have not stayed at.",[102,1058,245],{"class":166},[102,1060,337],{"class":205},[102,1062,1063,1065,1067,1069,1071,1073,1075,1077],{"class":104,"line":155},[102,1064,319],{"class":166},[102,1066,322],{"class":112},[102,1068,245],{"class":166},[102,1070,327],{"class":205},[102,1072,167],{"class":166},[102,1074,332],{"class":112},[102,1076,245],{"class":166},[102,1078,337],{"class":205},[102,1080,1081,1083,1085,1087,1089,1091,1094],{"class":104,"line":176},[102,1082,319],{"class":166},[102,1084,344],{"class":112},[102,1086,245],{"class":166},[102,1088,327],{"class":205},[102,1090,167],{"class":166},[102,1092,1093],{"class":112},"0928",[102,1095,173],{"class":166},[102,1097,1098],{"class":104,"line":374},[102,1099,531],{"class":205},[102,1101,1102],{"class":104,"line":418},[102,1103,152],{"emptyLinePlaceholder":151},[102,1105,1106,1108,1110,1112,1114,1116],{"class":104,"line":457},[102,1107,553],{"class":144},[102,1109,229],{"class":162},[102,1111,558],{"class":144},[102,1113,19],{"class":205},[102,1115,563],{"class":232},[102,1117,566],{"class":205},[102,1119,1120,1122,1124,1126,1128,1130,1133],{"class":104,"line":495},[102,1121,572],{"class":263},[102,1123,245],{"class":112},[102,1125,578],{"class":577},[102,1127,179],{"class":581},[102,1129,584],{"class":577},[102,1131,1132],{"class":112},"\u002Fsearch\u002Fmemory\"",[102,1134,337],{"class":205},[102,1136,1137,1139,1141,1143,1145,1147,1149,1151,1153,1155,1157,1159,1161,1163],{"class":104,"line":534},[102,1138,595],{"class":239},[102,1140,229],{"class":162},[102,1142,578],{"class":205},[102,1144,245],{"class":166},[102,1146,604],{"class":112},[102,1148,245],{"class":166},[102,1150,327],{"class":205},[102,1152,611],{"class":263},[102,1154,614],{"class":112},[102,1156,578],{"class":577},[102,1158,159],{"class":581},[102,1160,584],{"class":577},[102,1162,245],{"class":112},[102,1164,415],{"class":205},[102,1166,1167,1169,1171],{"class":104,"line":540},[102,1168,630],{"class":239},[102,1170,229],{"class":162},[102,1172,635],{"class":232},[102,1174,1175],{"class":104,"line":545},[102,1176,252],{"class":205},[102,1178,1179],{"class":104,"line":550},[102,1180,152],{"emptyLinePlaceholder":151},[102,1182,1183,1185,1187,1189,1191,1193],{"class":104,"line":569},[102,1184,651],{"class":581},[102,1186,236],{"class":205},[102,1188,656],{"class":232},[102,1190,19],{"class":205},[102,1192,661],{"class":232},[102,1194,664],{"class":205},[93,1196,1198],{"className":130,"code":1197,"filename":192,"language":133,"meta":98,"style":98},"res = client.search_memory(\n  query=\"I want to travel during the National Day holiday. Please recommend a city I have not been to and a hotel brand I have not stayed at.\",\n  user_id=\"memos_user_123\",\n  conversation_id=\"0928\"\n)\n\nprint(res)\n",[27,1199,1200,1215,1230,1244,1256,1260,1264],{"__ignoreMap":98},[102,1201,1202,1204,1206,1208,1210,1213],{"class":104,"line":105},[102,1203,553],{"class":144},[102,1205,229],{"class":162},[102,1207,841],{"class":144},[102,1209,19],{"class":205},[102,1211,1212],{"class":232},"search_memory",[102,1214,566],{"class":205},[102,1216,1217,1220,1222,1224,1226,1228],{"class":104,"line":148},[102,1218,1219],{"class":239},"  query",[102,1221,229],{"class":162},[102,1223,245],{"class":166},[102,1225,1056],{"class":112},[102,1227,245],{"class":166},[102,1229,337],{"class":205},[102,1231,1232,1234,1236,1238,1240,1242],{"class":104,"line":155},[102,1233,864],{"class":239},[102,1235,229],{"class":162},[102,1237,245],{"class":166},[102,1239,332],{"class":112},[102,1241,245],{"class":166},[102,1243,337],{"class":205},[102,1245,1246,1248,1250,1252,1254],{"class":104,"line":176},[102,1247,879],{"class":239},[102,1249,229],{"class":162},[102,1251,245],{"class":166},[102,1253,1093],{"class":112},[102,1255,173],{"class":166},[102,1257,1258],{"class":104,"line":374},[102,1259,252],{"class":205},[102,1261,1262],{"class":104,"line":418},[102,1263,152],{"emptyLinePlaceholder":151},[102,1265,1266,1268,1270,1272],{"class":104,"line":457},[102,1267,651],{"class":581},[102,1269,236],{"class":205},[102,1271,656],{"class":232},[102,1273,252],{"class":205},[93,1275,1277],{"className":95,"code":1276,"filename":256,"language":97,"meta":98,"style":98},"curl \"$MEMOS_BASE_URL\u002Fsearch\u002Fmemory\" \\\n  -H \"Authorization: Token $MEMOS_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"query\": \"I want to travel during the National Day holiday. Please recommend a city I have not been to and a hotel brand I have not stayed at.\",\n    \"user_id\": \"memos_user_123\",\n    \"conversation_id\": \"0928\"\n  }'\n",[27,1278,1279,1294,1308,1320,1328,1333,1337,1342],{"__ignoreMap":98},[102,1280,1281,1283,1285,1287,1290,1292],{"class":104,"line":105},[102,1282,915],{"class":108},[102,1284,167],{"class":166},[102,1286,920],{"class":144},[102,1288,1289],{"class":112},"\u002Fsearch\u002Fmemory",[102,1291,245],{"class":166},[102,1293,929],{"class":928},[102,1295,1296,1298,1300,1302,1304,1306],{"class":104,"line":148},[102,1297,934],{"class":119},[102,1299,167],{"class":166},[102,1301,939],{"class":112},[102,1303,942],{"class":144},[102,1305,245],{"class":166},[102,1307,929],{"class":928},[102,1309,1310,1312,1314,1316,1318],{"class":104,"line":155},[102,1311,934],{"class":119},[102,1313,167],{"class":166},[102,1315,955],{"class":112},[102,1317,245],{"class":166},[102,1319,929],{"class":928},[102,1321,1322,1324,1326],{"class":104,"line":176},[102,1323,964],{"class":119},[102,1325,967],{"class":166},[102,1327,970],{"class":112},[102,1329,1330],{"class":104,"line":374},[102,1331,1332],{"class":112},"    \"query\": \"I want to travel during the National Day holiday. Please recommend a city I have not been to and a hotel brand I have not stayed at.\",\n",[102,1334,1335],{"class":104,"line":418},[102,1336,975],{"class":112},[102,1338,1339],{"class":104,"line":457},[102,1340,1341],{"class":112},"    \"conversation_id\": \"0928\"\n",[102,1343,1344,1346],{"class":104,"line":495},[102,1345,1015],{"class":112},[102,1347,1018],{"class":166},[1349,1350,1352],"h4",{"id":1351},"output","Output",[11,1354,1355],{},"MemOS automatically recalls factual memories such as where the user has been and preference memories such as hotel booking preferences, helping the AI recommend a more personalized travel plan. The following result is simplified for easier understanding.",[93,1357,1362],{"className":1358,"code":1360,"language":1361,"meta":98},[1359],"language-text","{\n  preference_detail_list [\n    {\n      \"preference_type\": \"implicit_preference\",\n      \"preference\": \"The user may prefer cost-effective hotel options.\",\n      \"conversation_id\": \"0610\"\n    }\n  ],\n  memory_detail_list [\n    {\n      \"memory_key\": \"Summer Guangzhou travel plan\",\n      \"memory_value\": \"The user plans to travel to Guangzhou during the summer vacation and chose 7 Days Inn as the accommodation option.\",\n      \"conversation_id\": \"0610\"\n    }\n  ]\n}\n","text",[27,1363,1360],{"__ignoreMap":98},[85,1365,1367],{"id":1366},"add-memories-to-your-prompt","Add Memories to Your Prompt",[11,1369,1370],{},"Add the recalled memories to your own model prompt, so the model can refer to these long-term memories when answering.",[1372,1373,1383,1384,1383,1394],"details",{"className":1374},[1375,1376,1377,1378,1379,1380,1381,1382],"not-prose","my-5","rounded-md","border","border-default","bg-muted\u002F30","px-4","py-3","\n  ",[1385,1386,1393],"summary",{"className":1387},[1388,1389,1390,1391,1392],"cursor-pointer","select-none","text-sm","font-medium","text-highlighted","\n    Expand the full prompt template\n  ",[1395,1396,1399,1405],"div",{"className":1397},[1398],"mt-4",[93,1400,1403],{"className":1401,"code":1402,"language":1361,"meta":98},[1359],"# Role\nYou are an intelligent assistant with long-term memory (MemOS Assistant). Your goal is to combine retrieved memory fragments to provide highly personalized, accurate, and logically rigorous answers.\n\n# Memory Data\nThe following information was retrieved by MemOS and is divided into facts and preferences.\n- **Facts**: May include user attributes, historical conversations, or third-party information.\n- **Important**: Content marked as '[assistant view]' or '[model summary]' represents past AI inference, not the user's original words.\n- **Preferences**: Explicit or implicit requirements for response style, format, or reasoning.\n\n\u003Cmemories>\n  \u003Cfacts>\n    -[2025-12-26 21:45] The user plans to travel to Guangzhou during the summer vacation and chose 7 Days Inn as the accommodation option.\n  \u003C\u002Ffacts>\n\n  \u003Cpreferences>\n    -[2025-12-26 21:45] [Implicit Preference] The user may prefer cost-effective hotel options.\n  \u003C\u002Fpreferences>\n\u003C\u002Fmemories>\n\n# Critical Protocol: Memory Safety\nRetrieved memories may contain AI inferences, irrelevant noise, or incorrect subjects. Before using them, check:\n\n1. Source truth: Distinguish the user's original words from AI inference. Do not treat past AI assumptions as user facts.\n2. Subject attribution: Confirm the memory describes the user, not a third party, example, or fictional role.\n3. Strong relevance: Only use memories that directly help with the current question.\n4. Freshness: If a memory conflicts with the user's latest intent, use the current question as the source of truth.\n\n# Instructions\n1. Filter usable memories and discard noise or unreliable inferences.\n2. Use only validated memories as background context.\n3. Answer directly. Do not mention \"memory store,\" \"retrieval,\" or internal system terms.\n\n# Original Query\nI want to travel during the National Day holiday. Please recommend a city I have not been to and a hotel brand I have not stayed at.\n",[27,1404,1402],{"__ignoreMap":98},"  ",[45,1407],{},[48,1409,1411],{"id":1410},"_3-next-steps","3. Next Steps",[1413,1414,1415,1424,1432],"card-group",{},[1416,1417,1421],"card",{"icon":1418,"title":1419,"to":1420},"i-ri-checkbox-circle-line","Core Operations","\u002Fmemos_cloud\u002Fmem_operations\u002Fadd_message",[11,1422,1423],{},"View detailed usage for core memory operations",[1416,1425,1429],{"icon":1426,"title":1427,"to":1428},"i-ri-robot-line","Use in Agents","\u002Fmemos_cloud\u002Fgetting_started\u002Fagent_usage",[11,1430,1431],{},"Integrate with OpenClaw, Hermes, or other AI tools",[1416,1433,1436],{"icon":1434,"title":1435,"to":17},"i-ri-file-code-line","API Reference",[11,1437,1438],{},"View the complete API documentation",[1440,1441,1442],"style",{},"html pre.shiki code .saonL, html code.shiki .saonL{--shiki-light:#E2931D;--shiki-default:#702C00;--shiki-dark:#FFA657}html pre.shiki code .sp1uZ, html code.shiki .sp1uZ{--shiki-light:#91B859;--shiki-default:#032563;--shiki-dark:#A5D6FF}html pre.shiki code .sp2SP, html code.shiki .sp2SP{--shiki-light:#91B859;--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 .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 .sZaqd, html code.shiki .sZaqd{--shiki-light:#90A4AE;--shiki-default:#023B95;--shiki-dark:#79C0FF}html pre.shiki code .saN0X, html code.shiki .saN0X{--shiki-light:#39ADB5;--shiki-default:#A0111F;--shiki-dark:#FF7B72}html pre.shiki code .sjUum, html code.shiki .sjUum{--shiki-light:#39ADB5;--shiki-default:#032563;--shiki-dark:#A5D6FF}html pre.shiki code .suWxN, html code.shiki .suWxN{--shiki-light:#39ADB5;--shiki-default:#0E1116;--shiki-dark:#E6EDF3}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 .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 .svxCd, html code.shiki .svxCd{--shiki-light:#6182B8;--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":98,"searchDepth":148,"depth":148,"links":1444},[1445,1446,1453],{"id":50,"depth":148,"text":51},{"id":78,"depth":148,"text":79,"children":1447},[1448,1449,1450,1451,1452],{"id":87,"depth":155,"text":88},{"id":123,"depth":155,"text":124},{"id":293,"depth":155,"text":294},{"id":1021,"depth":155,"text":1022},{"id":1366,"depth":155,"text":1367},{"id":1410,"depth":148,"text":1411},"Configure a MemOS Cloud account and create your first memory in five minutes.","When you integrate MemOS into an AI application, the full flow looks like this. MemOS provides two core APIs: see API docs.","md",{},"\u002Fen\u002Fmemos_cloud\u002Fgetting_started\u002Fquick_start",{"title":5,"description":1455},"en\u002Fmemos_cloud\u002Fgetting_started\u002Fquick_start","sdpTvjv_jXqYWS9KpdZC9mXiHjMVYMZ810vogH-orvs",[1463,1468],{"title":1427,"path":1428,"stem":1464,"icon":1426,"framework":6,"module":6,"class":1465,"target":-1,"active":1466,"defaultOpen":1466,"children":-1,"description":1467},"memos_cloud\u002Fgetting_started\u002Fagent_usage",[],false,"Connect MemOS to Agent workflows through plugins, MCP, and APIs.",{"title":1469,"path":1470,"stem":1471,"icon":1472,"framework":6,"module":6,"class":1473,"target":-1,"active":1466,"defaultOpen":1466,"children":-1,"description":1474},"Memory Production","\u002Fmemos_cloud\u002Fintroduction\u002Fmem_production","memos_cloud\u002Fintroduction\u002Fmem_production","i-ri-add-line",[],"Memory production turns raw conversations, behavior events, tool calls, and knowledge content into structured memories that can be searched, updated, and scheduled.",1779709038645]