diff --git a/superagi/models/toolkit.py b/superagi/models/toolkit.py index 9246111a1..1707d9810 100644 --- a/superagi/models/toolkit.py +++ b/superagi/models/toolkit.py @@ -151,7 +151,8 @@ def get_tool_and_toolkit_arr(cls, session, organisation_id :int,agent_config_too toolkits_arr.add(toolkit.id) if tool_obj.get("tools"): for tool_name_str in tool_obj["tools"]: - tool_db_obj=session.query(Tool).filter(Tool.name == tool_name_str.strip()).first() + tool_db_obj = session.query(Tool).filter(Tool.name == tool_name_str.strip(), + Tool.toolkit_id == toolkit.id).first() if tool_db_obj is None: raise Exception("One or more of the Tool(s)/Toolkit(s) does not exist.")