Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

refactor: Make Agent Protocol server DB URL configurable

Reinier van der Leer99fe11450223
diff --git a/autogpts/autogpt/autogpt/app/main.py b/autogpts/autogpt/autogpt/app/main.py
index 8828d55e31..5f626cdeed 100644
--- a/autogpts/autogpt/autogpt/app/main.py
+++ b/autogpts/autogpt/autogpt/app/main.py
@@ -2,6 +2,7 @@
import enum
import logging
import math
+import os
import re
import signal
import sys
@@ -342,7 +343,7 @@ async def run_auto_gpt_server(
config.plugins = scan_plugins(config)
# Set up & start server
- database = AgentDB("sqlite:///data/ap_server.db", debug_enabled=False)
+ database = AgentDB(os.getenv("AP_SERVER_DB_URL", "sqlite:///data/ap_server.db"))
server = AgentProtocolServer(
app_config=config, database=database, llm_provider=llm_provider
)