Skip to content

Conversation

@georgebe
Copy link
Contributor

Amazon Bedrock AgentCore Samples Pull Request

Important

  1. We strictly follow a issue-first approach, please first open an issue relating to this Pull Request.
  2. Once this Pull Request is ready for review please attach review ready label to it. Only PRs with review ready will be reviewed.

Issue number:

Concise description of the PR

Changes to AgentCore memory, long term memory - Langgraph nutrition agent to use MemoryManager SDK 

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • Add your name to CONTRIBUTORS.md
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you uploading a dataset?
  • Have you documented Introduction, Architecture Diagram, Prerequisites, Usage, Sample Prompts, and Clean Up steps in your example README?
  • I agree to resolve any issues created for this example in the future.
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added 01-tutorials 01-tutorials 04-AgentCore-memory 01-tutorials/04-AgentCore-memory labels Oct 14, 2025
langgraph
langgraph-checkpoint-aws
langchain-aws
bedrock-agentcore-starter-toolkit==0.1.19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the new version of the starter toolkit.

"from bedrock_agentcore.memory.models import MemoryRecord\n",
"\n",
"# Import custom memory prompts\n",
"from custom_memory_prompts import consolidation_prompt, extraction_prompt\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relative import - might not work in different environments. Please add the

current_dir = os.path.dirname(os.path.abspath(os.getcwd()))
sys.path.append(current_dir) 

before this.

" logger.error(f\"Error type: {type(e).__name__}\")\n",
" import traceback\n",
" traceback.print_exc()\n",
" raise"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throws an error:

2025-10-17 15:04:28,779 - ERROR - ❌ Memory creation failed: An error occurred (ValidationException) when calling the CreateMemory operation: Validation failed during CreateMemory: Please provide a role with a valid trust policy
2025-10-17 15:04:28,780 - ERROR - Error type: ValidationException

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

01-tutorials 01-tutorials 04-AgentCore-memory 01-tutorials/04-AgentCore-memory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants