Skip to content

Commit

Permalink
agentCore beta v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Leoleojames1 committed Dec 12, 2024
1 parent 8ad7f24 commit 7a041fa
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/agentCore/__init__.py → src/agentCores/__init__.py
Original file line number Diff line number Diff line change
@@ -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"]
__all__ = ["agentCores", "agentMatrix"]
44 changes: 22 additions & 22 deletions src/agentCore/agentCore.py → src/agentCores/agentCores.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# agentCore.py
"""agentCore
# agentCores.py
"""agentCores
A flexible framework for creating and managing AI agent configurations.
Expand All @@ -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"},
Expand All @@ -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
Expand All @@ -80,7 +80,7 @@

# add uithub scrape, add arxiv

class agentCore:
class agentCores:

DEFAULT_DB_PATHS = {
"system": {
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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."""
Expand Down Expand Up @@ -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}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,7 +16,7 @@
Example:
```python
from agentCore import agentMatrix
from agentCores import agentMatrix
# Initialize storage
matrix = agentMatrix("agents.db")
Expand Down
Binary file not shown.

0 comments on commit 7a041fa

Please sign in to comment.