From fbf2ec7c60cb41e1a00010725c1d638518586f84 Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 13 Jul 2023 13:56:15 -0400 Subject: [PATCH] make sure agent key is present Former-commit-id: c3149e3788a624e980cc4ddb144e6c8949568340 --- swarms/agents/utils/AgentManager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swarms/agents/utils/AgentManager.py b/swarms/agents/utils/AgentManager.py index bfeea916..34e87c79 100644 --- a/swarms/agents/utils/AgentManager.py +++ b/swarms/agents/utils/AgentManager.py @@ -84,7 +84,10 @@ class AgentManager: callback_manager=callback_manager, verbose=True, ) + if 'agent' not in executor.__dict__: + executor.__dict__['agent'] = agent self.executors[session] = executor + return executor except Exception as e: logging.error(f"Error while creating executor: {str(e)}")