MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / get_server_config

Method get_server_config

methods/letta/server/server.py:909–930  ·  view source on GitHub ↗

Return the base config

(self, include_defaults: bool = False)

Source from the content-addressed store, hash-verified

907 return records
908
909 def get_server_config(self, include_defaults: bool = False) -> dict:
910 """Return the base config"""
911
912 def clean_keys(config):
913 config_copy = config.copy()
914 for k, v in config.items():
915 if k == "key" or "_key" in k:
916 config_copy[k] = server_utils.shorten_key_middle(v, chars_each_side=5)
917 return config_copy
918
919 # TODO: do we need a separate server config?
920 base_config = vars(self.config)
921 clean_base_config = clean_keys(base_config)
922
923 response = {"config": clean_base_config}
924
925 if include_defaults:
926 default_config = vars(LettaConfig())
927 clean_default_config = clean_keys(default_config)
928 response["defaults"] = clean_default_config
929
930 return response
931
932 def update_agent_core_memory(self, agent_id: str, label: str, value: str, actor: User) -> Memory:
933 """Update the value of a block in the agent's memory"""

Callers

nothing calls this directly

Calls 1

LettaConfigClass · 0.90

Tested by

no test coverage detected