From 7a041fa0b09824dbbd29e47cf30189700caa0f18 Mon Sep 17 00:00:00 2001 From: Leo Borcherding Date: Thu, 12 Dec 2024 01:07:33 -0600 Subject: [PATCH] agentCore beta v0.1.0 --- src/{agentCore => agentCores}/__init__.py | 4 +- .../agentCore.py => agentCores/agentCores.py} | 44 +++++++++--------- src/{agentCore => agentCores}/agentMatrix.py | 4 +- src/{agentCore => agentCores}/agent_matrix.db | Bin 32768 -> 32768 bytes 4 files changed, 26 insertions(+), 26 deletions(-) rename src/{agentCore => agentCores}/__init__.py (54%) rename src/{agentCore/agentCore.py => agentCores/agentCores.py} (96%) rename src/{agentCore => agentCores}/agentMatrix.py (96%) rename src/{agentCore => agentCores}/agent_matrix.db (96%) diff --git a/src/agentCore/__init__.py b/src/agentCores/__init__.py similarity index 54% rename from src/agentCore/__init__.py rename to src/agentCores/__init__.py index e9ae374..f0d8ca2 100644 --- a/src/agentCore/__init__.py +++ b/src/agentCores/__init__.py @@ -1,6 +1,6 @@ # src/agentCore/__init__.py -from .agentCore import agentCore +from .agentCores import agentCores from .agentMatrix import agentMatrix __version__ = "0.1.0" -__all__ = ["agentCore", "agentMatrix"] \ No newline at end of file +__all__ = ["agentCores", "agentMatrix"] \ No newline at end of file diff --git a/src/agentCore/agentCore.py b/src/agentCores/agentCores.py similarity index 96% rename from src/agentCore/agentCore.py rename to src/agentCores/agentCores.py index 92e27df..c587e67 100644 --- a/src/agentCore/agentCore.py +++ b/src/agentCores/agentCores.py @@ -1,5 +1,5 @@ -# agentCore.py -"""agentCore +# agentCores.py +"""agentCores A flexible framework for creating and managing AI agent configurations. @@ -17,20 +17,20 @@ Basic Usage: ```python - from agentCore import agentCore + from agentCores import agentCores # Create with default configuration - agentCoreInstance = agentCore() + agentCoresInstance = agentCores() # Create with custom database paths - agentCoreInstance = agentCore(db_config={ + agentCoresInstance = agentCores(db_config={ "agent_matrix": "custom_matrix.db", "conversation_history": "custom_conversations.db", "knowledge_base": "custom_knowledge.db" }) # Create an agent with custom configuration - agent = agentCoreInstance.mintAgent( + agent = agentCoresInstance.mintAgent( agent_id="custom_agent", db_config={"conversation_history": "custom_agent_conv.db"}, model_config={"large_language_model": "gpt-4"}, @@ -52,16 +52,16 @@ } } - agentCoreInstance = agentCore(template=custom_template) + agentCoresInstance = agentCores(template=custom_template) ``` Installation: - pip install agentCore + pip install agentCores Project Links: - Homepage: https://github.com/Leoleojames1/agentCore + Homepage: https://github.com/Leoleojames1/agentCores Documentation: https://agentcore.readthedocs.io/ #NOT AVAILABLE - Issues: https://github.com/Leoleojames1/agentCore/issues + Issues: https://github.com/Leoleojames1/agentCores/issues Author: Leo Borcherding Version: 0.1.0 @@ -80,7 +80,7 @@ # add uithub scrape, add arxiv -class agentCore: +class agentCores: DEFAULT_DB_PATHS = { "system": { @@ -273,7 +273,7 @@ def deep_merge(base: Dict, custom: Dict) -> Dict: deep_merge(base_template["agentCore"], custom_template["agentCore"]) self.base_template = base_template - self.agentCore = json.loads(json.dumps(base_template)) + self.agentCores = json.loads(json.dumps(base_template)) return base_template def getNewAgentCore(self) -> Dict: @@ -316,7 +316,7 @@ def loadAgentCore(self, agent_id: str) -> Optional[Dict[str, Any]]: results = self.agent_library.get(ids=[agent_id]) if results and results["documents"]: loaded_config = json.loads(results["documents"][0]) - self.agentCore = loaded_config + self.agentCores = loaded_config return loaded_config return None @@ -374,18 +374,18 @@ def mintAgent(self, def resetAgentCore(self): """Reset the current agent core to base template state.""" - self.agentCore = self.getNewAgentCore() - return self.agentCore + self.agentCores = self.getNewAgentCore() + return self.agentCores def getCurrentCore(self) -> Dict: """Get the current agent core configuration.""" - return self.agentCore + return self.agentCores def updateCurrentCore(self, updates: Dict): """Update the current agent core with new values.""" self._mergeConfig(self.agentCore["agentCore"], updates) - self.agentCore["agentCore"]["version"] += 1 - self.agentCore["agentCore"]["uid"] = self._generateUID(self.agentCore) + self.agentCores["agentCore"]["version"] += 1 + self.agentCores["agentCore"]["uid"] = self._generateUID(self.agentCores) def _mergeConfig(self, base: Dict, updates: Dict): """Recursively merge configuration updates.""" @@ -714,18 +714,18 @@ def chat_with_agent(self, agent_id: str): if __name__ == "__main__": try: - print("\n=== Welcome to agentCore Management Interface ===\n") + print("\n=== Welcome to agentCores Management Interface ===\n") # Initialize agentCore - core = agentCore() + cores = agentCores() # Migrate existing agent cores - core.migrateAgentCores() + cores.migrateAgentCores() print("agentCore system initialized. Enter '/help' for a list of commands.\n") # Start the command-line interface - core.commandInterface() + cores.commandInterface() except Exception as e: print(f"\n⚠️ Unexpected error occurred: {e}") diff --git a/src/agentCore/agentMatrix.py b/src/agentCores/agentMatrix.py similarity index 96% rename from src/agentCore/agentMatrix.py rename to src/agentCores/agentMatrix.py index 5eded9e..36a5e42 100644 --- a/src/agentCore/agentMatrix.py +++ b/src/agentCores/agentMatrix.py @@ -5,7 +5,7 @@ This module provides a simple but robust storage implementation for agent cores, maintaining exact structure and versioning in SQLite. It handles the persistence -layer for the agentCore package, providing CRUD operations for agent configurations. +layer for the agentCores package, providing CRUD operations for agent configurations. Features: - Efficient SQLite-based storage @@ -16,7 +16,7 @@ Example: ```python - from agentCore import agentMatrix + from agentCores import agentMatrix # Initialize storage matrix = agentMatrix("agents.db") diff --git a/src/agentCore/agent_matrix.db b/src/agentCores/agent_matrix.db similarity index 96% rename from src/agentCore/agent_matrix.db rename to src/agentCores/agent_matrix.db index e012b39385319bf87be5162a7bb851916e982fb6..f86c01b4715043762fba9ebd7e40be4baeb84a8e 100644 GIT binary patch delta 269 zcmZo@U}|V!njp=%VWNyP%*U)L~#?U~SX}k}Qpyn-r$-=d2cG z)@4e~NGvKz%P&fC$et% zlM^INH?KD=WntA|Rqt_~{8q+#vbc-b<|?yR&dLAtSvRvd6rw0~RAXY)-h9p3osCgz wvz*skR#tYPC)hU&1bpS+%vuo5$*8+Iv2s4!qypB>tO*fJj5?d+k{0m-02X>wEC2ui delta 269 zcmZo@U}|V!njp=%YNCuYzN_RAXRZU~Net% zlM^INH?KD=WnoofRqt_~{8q+#vbc-b<|?yR&dLAdSvRvd6rw0~RAXXP-F(g2osCgt wvz*skR#pz6Cpb0>1bpS+%vun^#HhA8u4obOqypB>tO?PajOv>cE$6cV0Midsf&c&j