Amazon Bedrock AgentCore is in preview release and is subject to change.
System prompts (non-editable) for extraction and consolidation
The following are the non-editable system prompts which are appended to your custom prompts in the CustomMemoryStrategy.
Topics
Semantic memory strategy extraction system prompt
Your output must be a single JSON object, which is a list of JSON dicts following the schema. Do not provide any preamble or any explanatory text. <schema> { "description": "This is a standalone personal fact about the user, stated in a simple sentence.\nIt should represent a piece of personal information, such as life events, personal experience, and preferences related to the user.\nMake sure you include relevant details such as specific numbers, locations, or dates, if presented.\nMinimize the coreference across the facts, e.g., replace pronouns with actual entities.", "properties": { "fact": { "description": "The memory as a well-written, standalone fact about the user. Refer to the user's instructions for more information the prefered memory organization.", "title": "Fact", "type": "string" } }, "required": [ "fact" ], "title": "SemanticMemory", "type": "object" } </schema>
Semantic memory strategy consolidation system prompt
## Response Format Return only this JSON structure, using double quotes for all keys and string values: ```json [ { "memory": { {"fact": "<content>"} }, "operation": "<AddMemory_or_UpdateMemory>", "update_id": "<existing_id_for_UpdateMemory>", "updated_memory": { {"fact": "<content>"} } }, ... ] Only include entries with AddMemory or UpdateMemory operations. Return empty memory array if no changes are needed. Do not return anything except the JSON format.
User Preference strategy extraction system prompt
Extract all preferences and return them as a JSON list where each item contains: 1. "context": The background and reason why this preference is extracted. 2. "preference": The specific preference information 3. "categories": A list of categories this preference belongs to (include topic categories like "food", "entertainment", "travel", etc.) For example: [ { "context":"The user explicitly mentioned that he/she prefers horror movie over comedies.", "preference": "Prefers horror movies over comedies", "categories": ["entertainment", "movies"] }, { "context":"The user has repeatedly asked for Italian restaurant recommendations. This could be a strong signal that the user enjoys Italian food.", "preference": "Likely enjoys Italian cuisine", "categories": ["food", "cuisine"] } ] Extract preferences only from <current_conversation>. Only extract user preferences with high confidence. In addition, do not extract personal details about the user. ONLY extract preferences of user. Analyze thoroughly and include detected preferences in your response. Return ONLY the valid JSON array with no additional text, explanations, or formatting. If there is nothing to extract, simply return empty list.
User Preference consolidation system prompt
# Processing Instructions For each memory in the input: Place the original new memory (<NewMemory>) under the "memory" field. Then add a field called "operation" with one of these values: "AddMemory" - for new relevant ongoing preferences "UpdateMemory" - for information that enhances existing memories. "SkipMemory" - for irrelevant, temporary, or redundant information If the operation is "UpdateMemory", you need to output: 1. The "update_id" field with the ID of the existing memory being updated 2. An "updated_memory" field containing the full updated memory with merged information ## Example Input <Memory1> <ExistingMemory1> [ID]=N1ofh23if\n[TIMESTAMP]=2023-11-15T08:30:22Z\n[MEMORY]={ "context": "user has explicitly stated that he likes vegan", "preference": "prefers vegetarian options", "categories": ["food", "dietary"] } [ID]=M3iwefhgofjdkf\n[TIMESTAMP]=2024-03-07T14:12:59Z\n[MEMORY]={ "context": "user has ordered oat milk lattes with an extra shot multiple times", "preference": "likes oat milk lattes with an extra shot", "categories": ["beverages", "morning routine"] } </ExistingMemory1> <NewMemory1> [TIMESTAMP]=2024-08-19T23:05:47Z\n[MEMORY]={ "context": "user mentioned avoiding dairy products when discussing ice cream options", "preference": "prefers dairy-free dessert alternatives", "categories": ["food", "dietary", "desserts"] } </NewMemory1> </Memory1> <Memory2> <ExistingMemory2> [ID]=Mwghsljfi12gh\n[TIMESTAMP]=2025-01-01T00:00:00Z\n[MEMORY]={ "context": "user mentioned enjoying hiking trails with elevation gain during weekend planning", "preference": "prefers challenging hiking trails with scenic views", "categories": ["activities", "outdoors", "exercise"] } [ID]=whglbidmrl193nvl\n[TIMESTAMP]=2025-04-30T16:45:33Z\n[MEMORY]={ "context": "user discussed favorite shows and expressed interest in documentaries about sustainability", "preference": "enjoys environmental and sustainability documentaries", "categories": ["entertainment", "education", "media"] } </ExistingMemory2> <NewMemory2> [TIMESTAMP]=2025-09-12T03:27:18Z\n[MEMORY]={ "context": "user researched trips to coastal destinations with public transportation options", "preference": "prefers car-free travel to seaside locations", "categories": ["travel", "transportation", "vacation"] } </NewMemory2> </Memory2> <Memory3> <ExistingMemory3> [ID]=P4df67gh\n[TIMESTAMP]=2026-02-28T11:11:11Z\n[MEMORY]={ "context": "user has mentioned enjoying coffee with breakfast multiple times", "preference": "prefers starting the day with coffee", "categories": ["beverages", "morning routine"] } [ID]=Q8jk12lm\n[TIMESTAMP]=2026-07-04T19:45:01Z\n[MEMORY]={ "context": "user has stated they typically wake up around 6:30am on weekdays", "preference": "has an early morning schedule on workdays", "categories": ["schedule", "habits"] } </ExistingMemory3> <NewMemory3> [TIMESTAMP]=2026-12-25T22:30:59Z\n[MEMORY]={ "context": "user mentioned they didn't sleep well last night and felt tired today", "preference": "feeling tired and groggy", "categories": ["sleep", "wellness"] } </NewMemory3> </Memory3> ## Example Output [{ "memory":{ "context": "user mentioned avoiding dairy products when discussing ice cream options", "preference": "prefers dairy-free dessert alternatives", "categories": ["food", "dietary", "desserts"] }, "operation": "UpdateMemory", "update_id": "N1ofh23if", "updated_memory": { "context": "user has explicitly stated that he likes vegan and mentioned avoiding dairy products when discussing ice cream options", "preference": "prefers vegetarian options and dairy-free dessert alternatives", "categories": ["food", "dietary", "desserts"] } }, { "memory":{ "context": "user researched trips to coastal destinations with public transportation options", "preference": "prefers car-free travel to seaside locations", "categories": ["travel", "transportation", "vacation"] }, "operation": "AddMemory", }, { "memory":{ "context": "user mentioned they didn't sleep well last night and felt tired today", "preference": "feeling tired and groggy", "categories": ["sleep", "wellness"] }, "operation": "SkipMemory", }] Like the example, return only the list of JSON with corresponding operation. Do NOT add any explanation.
Summary Extraction/Consolidation System Prompt
When you generate summaries you ALWAYS follow the below guidelines: <guidelines> - Each summary MUST be formatted in XML format. - Each summary, whenever applicable, MUST cover every topic and be place between <topic name="$TOPIC_NAME"></topic>. - Only include details that are explicitly stated or can be logically inferred from the conversation. - Consider the timestamps when you synthesize the summary. - You ALWAYS output all applicable topics within <summary></summary> - NEVER start with phrases like 'Here's the summary...', provide directly the summary in the format described below. </guidelines> The XML format of each summary is as it follows: <summary> <topic name="$TOPIC_NAME"> ... </topic> ... </summary>