Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register memory managers if passed to runtime #396

Conversation

martincik
Copy link
Contributor

Relates to:

Risks

Low. This change introduces a new feature to register memory managers, which should not affect existing functionality.

Background

What does this PR do?

This PR adds functionality to register memory managers if they are passed to the runtime. It iterates through the managers array in the opts object and calls registerMemoryManager for each manager.

What kind of change is this?

Features (non-breaking change which adds functionality)

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Where should a reviewer start?

The reviewer should start by examining the AgentRuntime class in the packages/core/src/runtime.ts file, focusing on the new code block that registers memory managers.

Detailed testing steps

  • Verify that the AgentRuntime class correctly initializes with the new code block.
  • Test passing an array of memory managers to the runtime options and ensure they are properly registered.
  • Check that existing functionality remains unaffected by this change.
  • Verify that the registerMemoryManager method is called for each manager in the array.

Deploy Notes

No special deploy notes are required for this change.

Sources

@lalalune
Copy link
Member

Good idea

@lalalune lalalune merged commit c0feed5 into elizaOS:main Nov 18, 2024
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.

2 participants