Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
Update memgpt configure to reflect current storage connector options
Sarah Woodersba550fbb0702
diff --git a/memgpt/cli/cli_config.py b/memgpt/cli/cli_config.pyindex df9991063..05ef4b60d 100644--- a/memgpt/cli/cli_config.py+++ b/memgpt/cli/cli_config.py@@ -380,11 +380,11 @@ def configure_cli(config: MemGPTConfig):def configure_archival_storage(config: MemGPTConfig):# Configure archival storage backend- archival_storage_options = ["local", "lancedb", "postgres", "chroma"]+ archival_storage_options = ["postgres", "chroma"]archival_storage_type = questionary.select("Select storage backend for archival data:", archival_storage_options, default=config.archival_storage_type).ask()- archival_storage_uri, archival_storage_path = None, None+ archival_storage_uri, archival_storage_path = config.archival_storage_uri, config.archival_storage_path# configure postgresif archival_storage_type == "postgres":@@ -393,16 +393,17 @@ def configure_archival_storage(config: MemGPTConfig):default=config.archival_storage_uri if config.archival_storage_uri else "",).ask()- # configure lancedb- if archival_storage_type == "lancedb":- archival_storage_uri = questionary.text(- "Enter lanncedb connection string (e.g. ./.lancedb",- default=config.archival_storage_uri if config.archival_storage_uri else "./.lancedb",- ).ask()+ # TODO: add back+ ## configure lancedb+ # if archival_storage_type == "lancedb":+ # archival_storage_uri = questionary.text(+ # "Enter lanncedb connection string (e.g. ./.lancedb",+ # default=config.archival_storage_uri if config.archival_storage_uri else "./.lancedb",+ # ).ask()# configure chromaif archival_storage_type == "chroma":- chroma_type = questionary.select("Select chroma backend:", ["http", "persistent"], default="http").ask()+ chroma_type = questionary.select("Select chroma backend:", ["http", "persistent"], default="persistent").ask()if chroma_type == "http":archival_storage_uri = questionary.text("Enter chroma ip (e.g. localhost:8000):", default="localhost:8000").ask()if chroma_type == "persistent":@@ -415,11 +416,11 @@ def configure_archival_storage(config: MemGPTConfig):def configure_recall_storage(config: MemGPTConfig):# Configure recall storage backend- recall_storage_options = ["sqlite", "postgres", "chroma"]+ recall_storage_options = ["sqlite", "postgres"]recall_storage_type = questionary.select("Select storage backend for recall data:", recall_storage_options, default=config.recall_storage_type).ask()- recall_storage_uri, recall_storage_path = None, None+ recall_storage_uri, recall_storage_path = config.recall_storage_uri, config.recall_storage_path# configure postgresif recall_storage_type == "postgres":recall_storage_uri = questionary.text(@@ -427,14 +428,6 @@ def configure_recall_storage(config: MemGPTConfig):default=config.recall_storage_uri if config.recall_storage_uri else "",).ask()- # configure chroma- if recall_storage_type == "chroma":- chroma_type = questionary.select("Select chroma backend:", ["http", "persistent"], default="http").ask()- if chroma_type == "http":- recall_storage_uri = questionary.text("Enter chroma ip (e.g. localhost:8000):", default="localhost:8000").ask()- if chroma_type == "persistent":- recall_storage_path = os.path.join(MEMGPT_DIR, "chroma")-return recall_storage_type, recall_storage_uri, recall_storage_path@@ -495,6 +488,10 @@ def configure():recall_storage_type=recall_storage_type,recall_storage_uri=recall_storage_uri,recall_storage_path=recall_storage_path,+ # metadata storage (currently forced to match recall storage)+ metadata_storage_type=recall_storage_type,+ metadata_storage_uri=recall_storage_uri,+ metadata_storage_path=recall_storage_path,)typer.secho(f"📖 Saving config to {config.config_path}", fg=typer.colors.GREEN)config.save()diff --git a/memgpt/config.py b/memgpt/config.pyindex 1f29ded14..34eadaafa 100644--- a/memgpt/config.py+++ b/memgpt/config.py@@ -70,7 +70,7 @@ class MemGPTConfig:# database configs: archivalarchival_storage_type: str = "chroma" # local, db- archival_storage_path: str = MEMGPT_DIR # TODO: set to memgpt dir+ archival_storage_path: str = os.path.join(MEMGPT_DIR, "chroma")archival_storage_uri: str = None # TODO: eventually allow external vector DB# database configs: recalldiff --git a/memgpt/main.py b/memgpt/main.pyindex cce9b4a38..cc1cf3e43 100644--- a/memgpt/main.py+++ b/memgpt/main.py@@ -121,6 +121,7 @@ def run_agent_loop(memgpt_agent, first, no_verify=False, cfg=None, strip_ui=Falsmemgpt_agent.persistence_manager.archival_memory.storage = StorageConnector.get_archival_storage_connector(agent_config=memgpt_agent.config)+ # TODO: update metadata_db to record attached agentscontinueelif user_input.lower() == "/dump" or user_input.lower().startswith("/dump "):