Skip to content

Commit

Permalink
Merge pull request #396 from martincik/fix/register-memory-managers-o…
Browse files Browse the repository at this point in the history
…f-runtime-passed-to-contructor

Register memory managers if passed to runtime
  • Loading branch information
lalalune authored Nov 18, 2024
2 parents fe90cb9 + b3cd819 commit c0feed5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ export class AgentRuntime implements IAgentRuntime {
tableName: "fragments",
});

(opts.managers ?? []).forEach((manager: IMemoryManager) => {
this.registerMemoryManager(manager);
});

(opts.services ?? []).forEach((service: Service) => {
this.registerService(service);
});
Expand Down

0 comments on commit c0feed5

Please sign in to comment.