eliza
eliza copied to clipboard
chore: dynamic plugin imports
Relates to:
None, just looking for improvements.
Risks
HIGH - could break plugins
Background
Plugins even if unused are being always imported into the agent/index.ts at top of file. This adds much memory usage to the JS runtime and not most efficient way to load optional plugins.
What does this PR do?
Dynamically imports plugins when needed based on ENV / secrets loaded.
What kind of change is this?
Improvements (misc. changes to existing features)
Why are we doing this? Any context or related work?
Makes Eliza faster / slimmer / less bloated / scales infinite plugins with minimal runtime overhead.
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Try out different combinations of plugins off and on, see if loads or breaks.
Discord username
cjft