BrainAPI is a knowledge graph–powered AI memory layer that transforms unstructured data into structured knowledge, enabling intelligent search, recommendations, and contextual memory for AI agents and applications.
Python ai-agentsai-memoryknowledge-graphknowledge-managementknowledge-representationreccomendation-system
fix(mongodb): fix system db unauthorized ops on remote managed
Christian59bab70eb494
diff --git a/src/config.py b/src/config.pyindex 8e50345..42a9678 100644--- a/src/config.py+++ b/src/config.py@@ -110,6 +110,7 @@ class MongoConfig:self.password = os.getenv("MONGO_PASSWORD")self.connection_string = os.getenv("MONGO_CONNECTION_STRING")+ self.system_database = os.getenv("MONGO_SYSTEM_DATABASE", "_system")if [self.host, self.port, self.username, self.password].count(Nonediff --git a/src/lib/mongo/client.py b/src/lib/mongo/client.pyindex a7a985d..b93bcbe 100644--- a/src/lib/mongo/client.py+++ b/src/lib/mongo/client.py@@ -141,7 +141,7 @@ class MongoClient(DataClient):return braindef get_brain(self, name_key: str) -> Brain:- collection = self.get_collection("brains", "system")+ collection = self.get_collection("brains", config.mongo.system_database)result = collection.find_one({"name_key": name_key})if not result:return None@@ -152,7 +152,7 @@ class MongoClient(DataClient):)def get_brains_list(self) -> List[Brain]:- collection = self.get_collection("brains", "system")+ collection = self.get_collection("brains", config.mongo.system_database)result = collection.find()return [Brain(