Skip to content

Conversation

jona62
Copy link
Contributor

@jona62 jona62 commented Sep 30, 2025

Description

Add README for MemoryManager

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Testing

  • Unit tests pass locally
  • Integration tests pass (if applicable)
  • Test coverage remains above 80%
  • Manual testing completed

Checklist

  • My code follows the project's style guidelines (ruff/pre-commit)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Security Checklist

  • No hardcoded secrets or credentials
  • No new security warnings from bandit
  • Dependencies are from trusted sources
  • No sensitive data logged

Breaking Changes

List any breaking changes and migration instructions:

N/A

Additional Notes

N/A

@jona62 jona62 requested a review from bergjaak September 30, 2025 21:15
@jona62 jona62 self-assigned this Sep 30, 2025
)
```

### Memory Limits and Quotas
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have the direct link to Memory Service limits ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that'll be available after GA

for memory_summary in memories:
print(f"Memory: {memory_summary.id} - {memory_summary.name} ({memory_summary.status})")

# Get specific memory details
Copy link
Contributor

Choose a reason for hiding this comment

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

do we expect users to copy and use the code.. if so, is '-' an accepted char in memory id ?

Choose a reason for hiding this comment

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

I think it is not valid, good callout

Copy link
Contributor Author

Choose a reason for hiding this comment

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

memory id do have hyphens, memory names do not have hyphens. Also customers would not be able to copy and use this since memory_ids will be uniquely generated per memory resource

Choose a reason for hiding this comment

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

oh duh, we get by id... my bad


## Overview

The `MemoryManager` class provides a comprehensive interface for managing AWS Bedrock AgentCore Memory resources. It handles all **CONTROL PLANE CRUD operations** and supports both modern typed strategies (Pydantic models) and legacy dictionary-based configurations.

Choose a reason for hiding this comment

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

why is "CONTROL PLANE CRUD operations" in all caps -- are you mad at me?

Choose a reason for hiding this comment

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

"supports both modern typed strategies (Pydantic models) and legacy dictionary-based configurations" that feels like a technical detail that is too deep in the weeds for this overview. I think the overview should be focused on: Here is what it is, here is what it does, here is why it is useful. I think we have the what it is and does, but not really the why. I think making the final sentence here a brief 1 or 2 sentences that say why AgentCore Memory is useful would be great (since many of the people that visit this will be hearing of AgentCore memory for the first time)

Choose a reason for hiding this comment

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

and if we don't explain the terminology, we should at least link to something that does

retries={'max_attempts': 3}
)
manager = MemoryManager(region_name="us-east-1", boto_client_config=custom_config_with_agent)
# Final user agent will be: "my-application/1.0 bedrock-agentcore-starter-toolkit"

Choose a reason for hiding this comment

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

this is wrong, right? It will include a bunch of stuff about boto3 (but this shouldn't matter to the end user)

Choose a reason for hiding this comment

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

I think we should remove user_agent_extra from these examples as it seems only relevant to the service owner for telemetry/debugging purposes

for memory_summary in memories:
print(f"Memory: {memory_summary.id} - {memory_summary.name} ({memory_summary.status})")

# Get specific memory details

Choose a reason for hiding this comment

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

I think it is not valid, good callout


---

### Memory Lifecycle Methods

Choose a reason for hiding this comment

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

I somewhat think we shouldn't do this unless we have tests that verify that changes to the code also update this. I also think Python does this for you. I remember Nikhil showing me how you can do something with Python that shows you all the doc strings and functions in a given class (I don't remember how right now, but that should replace this so that we don't have to maintain these separate things and can instead just rely on Python)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah there are doc strings in each method which show the same, it's kind of redundant to have this, removing!

@jona62 jona62 force-pushed the chore/add-readme-memory-manager branch from 97b15c3 to ab8ef02 Compare October 1, 2025 00:02
@jona62 jona62 force-pushed the chore/add-readme-memory-manager branch from ab8ef02 to 6c5869c Compare October 1, 2025 00:33
@jona62 jona62 merged commit b9fa36d into aws:main Oct 1, 2025
8 of 9 checks passed
@jona62 jona62 deleted the chore/add-readme-memory-manager branch October 1, 2025 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants