[{"data":1,"prerenderedAt":214},["ShallowReactive",2],{"docs-page-en-/usecase/blog/production_agent_memory_architecture":3,"surround-en-/usecase/blog/production_agent_memory_architecture":201},{"id":4,"title":5,"avatar":6,"banner":6,"body":7,"category":6,"desc":6,"description":189,"extension":195,"lead":6,"links":6,"meta":196,"navigation":6,"path":197,"seo":198,"stem":199,"__hash__":200},"docs/en/usecase/blog/production_agent_memory_architecture.md","What Does a Production Agent Memory Architecture Need?",null,{"type":8,"value":9,"toc":188},"minimark",[10,17,20,23,26,29,34,130,133,136,138,142,145,148,151,154,157,159,163,177,185],[11,12,13],"p",{},[14,15],"img",{"alt":5,"src":16},"https://cdn.memtensor.com.cn/img/1795606097065_5di9eu_compressed.png",[11,18,19],{},"A support agent submits a replacement request. The shipping service accepts it, but the worker stops before it can save the receipt. When another worker picks up the case, how does it know whether to submit the request or tell the customer their replacement is already on its way through the system?",[11,21,22],{},"For an agent that handles cases across shifts and remembers customers across cases, we recommend designing for six responsibilities: workflow state, ingestion, durable storage, retrieval with access control, context assembly, and lifecycle management. A policy assistant answering a single question may need only retrieval and enough context to answer. A replacement workflow also needs a checkpoint so another worker can resume it, and persistent memory if customer preferences should carry over to the next case.",[11,24,25],{},"When Replit introduced Missions on November 17, it described an independent AI judge that checks work against agreed success criteria. For this support workflow, one criterion is easy to verify against the shipping service’s own records: after a restart, the customer should have one approved replacement request, and the case should accurately report its status.",[27,28],"br",{},[30,31,33],"h2",{"id":32},"what-each-component-owns","What each component owns",[35,36,37,60],"table",{},[38,39,40],"thead",{},[41,42,43,50,55],"tr",{},[44,45,46],"th",{},[47,48,49],"strong",{},"Component",[44,51,52],{},[47,53,54],{},"What it does",[44,56,57],{},[47,58,59],{},"Evidence in a replacement shipment",[61,62,63,75,86,97,108,119],"tbody",{},[41,64,65,69,72],{},[66,67,68],"td",{},"Workflow state",[66,70,71],{},"Checkpoints the case, pending approvals, and action references",[66,73,74],{},"A new process resumes the same case and identifies its pending step",[41,76,77,80,83],{},[66,78,79],{},"Ingestion",[66,81,82],{},"Decides which facts and preferences to save, who they belong to, where they came from, and when they apply",[66,84,85],{},"“Text me about future cases” updates the customer’s preference. “Email me about this replacement” applies to this case only.",[41,87,88,91,94],{},[66,89,90],{},"Durable storage",[66,92,93],{},"Preserves stable record IDs and current versions across cases",[66,95,96],{},"A fresh case can read the current channel preference without loading old transcripts",[41,98,99,102,105],{},[66,100,101],{},"Retrieval and access control",[66,103,104],{},"Filters by verified identity and scope, then selects relevant, current records",[66,106,107],{},"Two customers asking the same question each get their own applicable records",[41,109,110,113,116],{},[66,111,112],{},"Context assembly",[66,114,115],{},"Prioritizes the current request, selected memories, and fresh tool results within the input budget",[66,117,118],{},"The exact request sent to the model contains the chosen preference and current shipment status",[41,120,121,124,127],{},[66,122,123],{},"Lifecycle management",[66,125,126],{},"Applies corrections and expiration rules to saved memories and the summaries or cached results the application reuses",[66,128,129],{},"After the customer changes their preferred channel, a new case uses the updated preference even if an older summary still mentions the previous one.",[11,131,132],{},"LangGraph illustrates the distinction. Its checkpointer saves workflow state for a thread, while a store can hold application data across threads. To test recovery after a process restart, use a checkpointer backed by persistent storage. In this example, the checkpoint tells the next worker which case to resume. The shipping service holds the record of whether it accepted the replacement request.",[11,134,135],{},"Before the worker submits the request, save the pending step, the operation ID, the approved request parameters, and a reference to the approval. A case summary can explain why the customer needs a replacement. The operation ID gives the next worker a way to look up this particular request if the shipping service supports that lookup.",[27,137],{},[30,139,141],{"id":140},"put-the-checkpoint-on-both-sides-of-a-business-action-to-the-test","Put the checkpoint on both sides of a business action to the test",[11,143,144],{},"Start each run with a fresh test case and an approved replacement. In the first run, stop the worker after it saves the operation ID and request details but before it calls the shipping service. Verify that the test service received no request. Restart the worker, check that it still has permission and that the approval still covers the request, then let it submit. The service should accept one replacement, and the receipt saved on the case should match it.",[11,146,147],{},"In the second run, let the service accept the request, then drop its response. On restart, the case still shows a pending step. If the service supports lookup by operation ID, use it to recover the receipt. If the outcome remains unclear, retry only if the request is still authorized and the service documents a safe retry with the original key and parameters. The key must still be valid.",[11,149,150],{},"If neither route establishes the outcome, leave the case pending review and tell the customer that confirmation is pending. For this run, the test team knows the service accepted the original request. Check the service’s records for the case: there should be exactly one accepted replacement, including any submission made under a different key. The worker should either recover the matching receipt or hand off the unresolved case without claiming success.",[11,152,153],{},"For the third test, give customers A and B different contact preferences and a pending replacement case each. Run the worker with access to B’s case only. It should be able to resume B’s case and use B’s preference. A request to resume A’s case should be denied, and neither A’s case details nor A’s preference should appear in the records returned to the worker or in the model input.",[11,155,156],{},"If B’s pending step is missing after restart, inspect the checkpoint. If retrieval returned B’s preference but it never reached the model, inspect how the application assembled the request. If the shipping service accepted two replacements for the same case, compare both submissions, including their operation IDs and retry keys.",[27,158],{},[30,160,162],{"id":161},"connect-memory-evidence-to-the-final-outcome","Connect memory evidence to the final outcome",[11,164,165,166,171,172,176],{},"With MemOS Cloud, the application can ",[167,168,170],"a",{"href":169},"/memos_cloud/mem_operations/add_message/","submit a customer’s message for memory processing"," and later ",[167,173,175],{"href":174},"/memos_cloud/features/knowledge_base/","retrieve customer memories alongside a specified knowledge base",". The application uses the signed-in identity to select the customer and the knowledge bases they can access. In a fresh case, the worker can then retrieve the customer’s standing preference for text updates along with the applicable replacement policy. The request to use email for the previous replacement should stay with that case.",[11,178,179,180,184],{},"Test a correction, too. If the customer switches to email for future cases, the application can ",[167,181,183],{"href":182},"/memos_cloud/mem_operations/update_memory/","update the saved preference by memory ID",". Open a fresh case and check which channel the worker actually uses. If retrieval returns email but an old summary puts text messaging back into the model input, the trace tells you where to make the correction.",[11,186,187],{},"Give the support team a way to follow one case through the system. Record which memory IDs retrieval returned, which records the application included in the model request, and which receipt the shipping service issued for the operation. Keep customer text out of routine logs and use a restricted trace when someone needs to inspect the content. A worker taking over mid-shift can then answer the customer’s two practical questions: “Did you request my replacement?” and “How will you let me know?”",{"title":189,"searchDepth":190,"depth":190,"links":191},"",2,[192,193,194],{"id":32,"depth":190,"text":33},{"id":140,"depth":190,"text":141},{"id":161,"depth":190,"text":162},"md",{},"/en/usecase/blog/production_agent_memory_architecture",{"title":5,"description":189},"en/usecase/blog/production_agent_memory_architecture","bXWzzBC98hgeCy3xyJyE95wVTpU6bxpF2uNyirUVYNI",[202,209],{"title":203,"path":204,"stem":205,"framework":6,"module":6,"class":206,"target":-1,"active":207,"defaultOpen":208,"children":-1,"description":-1},"How Long-Term AI Memory Works, From Ingestion to Forgetting","/usecase/blog/long_term_ai_memory_lifecycle","usecase/blog/long_term_ai_memory_lifecycle",[],false,true,{"title":210,"path":211,"stem":212,"framework":6,"module":6,"class":213,"target":-1,"active":207,"defaultOpen":208,"children":-1,"description":-1},"What to Log and Measure in a Production Agent Memory Service","/usecase/blog/production_agent_memory_service_metrics","usecase/blog/production_agent_memory_service_metrics",[],1795608381890]