diff --git a/agixt/DB.py b/agixt/DB.py index e2f69ed56423..7d81dc4fcac9 100644 --- a/agixt/DB.py +++ b/agixt/DB.py @@ -744,11 +744,12 @@ def setup_default_roles(): # Create any missing tables Base.metadata.create_all(engine) setup_default_roles() + seed_data = str(getenv("SEED_DATA")).lower() == "true" + if seed_data: + # Import seed data + from SeedImports import import_all_data - # Import seed data - from SeedImports import import_all_data - - import_all_data() + import_all_data() uvicorn.run( "app:app", host="0.0.0.0", diff --git a/agixt/Globals.py b/agixt/Globals.py index e247cdc7839d..fc3ae548838d 100644 --- a/agixt/Globals.py +++ b/agixt/Globals.py @@ -36,6 +36,7 @@ def getenv(var_name: str, default_value: str = "") -> str: "REGISTRATION_DISABLED": "false", "CREATE_AGENT_ON_REGISTER": "true", "CREATE_AGIXT_AGENT": "true", + "SEED_DATA": "true", } if default_value != "": default_values[var_name] = default_value