diff --git a/memgpt/autogen/memgpt_agent.py b/memgpt/autogen/memgpt_agent.py index e36483a4..5440de33 100644 --- a/memgpt/autogen/memgpt_agent.py +++ b/memgpt/autogen/memgpt_agent.py @@ -73,7 +73,9 @@ class MemGPTConversableAgent(ConversableAgent): def attach(self, data_source: str): # attach new data - attach(agent_name=self.agent.agent_state.name, data_source=data_source) + config = MemGPTConfig.load() + source_connector = StorageConnector.get_storage_connector(TableType.PASSAGES, config, user_id=self.agent.agent_state.user_id) + self.agent.attach_source(data_source, source_connector, ms=self.ms) def load_and_attach(self, name: str, type: str, force=False, **kwargs): # check if data source already exists