Skip to content

Register memory managers if passed to runtime#396

Merged
lalalune merged 1 commit into
elizaOS:mainfrom
iamladi:fix/register-memory-managers-of-runtime-passed-to-contructor
Nov 18, 2024
Merged

Register memory managers if passed to runtime#396
lalalune merged 1 commit into
elizaOS:mainfrom
iamladi:fix/register-memory-managers-of-runtime-passed-to-contructor

Conversation

@iamladi
Copy link
Copy Markdown
Contributor

@iamladi iamladi commented Nov 18, 2024

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
Copy Markdown
Member

Good idea

@lalalune lalalune merged commit c0feed5 into elizaOS:main Nov 18, 2024
lalalune added a commit that referenced this pull request May 3, 2026
…f-runtime-passed-to-contructor

Register memory managers if passed to runtime
FranceFlapjack pushed a commit to FranceFlapjack/eliza that referenced this pull request May 16, 2026
…agers-of-runtime-passed-to-contructor

Register memory managers if passed to runtime
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