agentfoundry 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. agentfoundry-1.2.2/LICENSE +49 -0
  2. agentfoundry-1.2.2/MANIFEST.in +12 -0
  3. agentfoundry-1.2.2/PKG-INFO +133 -0
  4. agentfoundry-1.2.2/README.md +116 -0
  5. agentfoundry-1.2.2/agentfoundry/__init__.py +105 -0
  6. agentfoundry-1.2.2/agentfoundry/agentfoundry.lic +8 -0
  7. agentfoundry-1.2.2/agentfoundry/agentfoundry.pem +9 -0
  8. agentfoundry-1.2.2/agentfoundry/agents/__init__.py +1 -0
  9. agentfoundry-1.2.2/agentfoundry/agents/base_agent.py +68 -0
  10. agentfoundry-1.2.2/agentfoundry/agents/orchestrator.py +282 -0
  11. agentfoundry-1.2.2/agentfoundry/agents/tool_autonomy_agent.py +324 -0
  12. agentfoundry-1.2.2/agentfoundry/agents/tools/__init__.py +0 -0
  13. agentfoundry-1.2.2/agentfoundry/agents/tools/code_explorer_tool.py +121 -0
  14. agentfoundry-1.2.2/agentfoundry/agents/tools/current_date_time_tool.py +76 -0
  15. agentfoundry-1.2.2/agentfoundry/agents/tools/document_reader.py +70 -0
  16. agentfoundry-1.2.2/agentfoundry/agents/tools/entra_tool.py +135 -0
  17. agentfoundry-1.2.2/agentfoundry/agents/tools/geolocation_tool.py +50 -0
  18. agentfoundry-1.2.2/agentfoundry/agents/tools/google_search_tool.py +80 -0
  19. agentfoundry-1.2.2/agentfoundry/agents/tools/http_request_tool.py +121 -0
  20. agentfoundry-1.2.2/agentfoundry/agents/tools/memory_tools.py +122 -0
  21. agentfoundry-1.2.2/agentfoundry/agents/tools/pandas_explorer.py +50 -0
  22. agentfoundry-1.2.2/agentfoundry/agents/tools/pandas_modifier.py +53 -0
  23. agentfoundry-1.2.2/agentfoundry/agents/tools/pdf_creator.py +32 -0
  24. agentfoundry-1.2.2/agentfoundry/agents/tools/python_code_executer.py +39 -0
  25. agentfoundry-1.2.2/agentfoundry/agents/tools/rest_tool.py +102 -0
  26. agentfoundry-1.2.2/agentfoundry/agents/tools/sql_server_query.py +46 -0
  27. agentfoundry-1.2.2/agentfoundry/agents/tools/sqlite_query.py +54 -0
  28. agentfoundry-1.2.2/agentfoundry/agents/tools/tool_creation.py +52 -0
  29. agentfoundry-1.2.2/agentfoundry/agents/tools/webpage_scraper_tool.py +183 -0
  30. agentfoundry-1.2.2/agentfoundry/chroma/__init__.py +1 -0
  31. agentfoundry-1.2.2/agentfoundry/chroma/chroma_describe.py +55 -0
  32. agentfoundry-1.2.2/agentfoundry/chroma/chromadb_data_loader.py +231 -0
  33. agentfoundry-1.2.2/agentfoundry/chroma/client.py +223 -0
  34. agentfoundry-1.2.2/agentfoundry/code_gen/__init__.py +1 -0
  35. agentfoundry-1.2.2/agentfoundry/code_gen/code_parser.py +167 -0
  36. agentfoundry-1.2.2/agentfoundry/code_gen/code_validator.py +170 -0
  37. agentfoundry-1.2.2/agentfoundry/code_gen/prompts.py +115 -0
  38. agentfoundry-1.2.2/agentfoundry/discovery.py +121 -0
  39. agentfoundry-1.2.2/agentfoundry/goal_manager.py +54 -0
  40. agentfoundry-1.2.2/agentfoundry/license/__init__.py +0 -0
  41. agentfoundry-1.2.2/agentfoundry/license/key_manager.py +75 -0
  42. agentfoundry-1.2.2/agentfoundry/license/license.py +78 -0
  43. agentfoundry-1.2.2/agentfoundry/license/license_generator.py +141 -0
  44. agentfoundry-1.2.2/agentfoundry/llm/__init__.py +1 -0
  45. agentfoundry-1.2.2/agentfoundry/llm/llm_factory.py +99 -0
  46. agentfoundry-1.2.2/agentfoundry/llm/llm_interface.py +50 -0
  47. agentfoundry-1.2.2/agentfoundry/llm/ollama_llm.py +46 -0
  48. agentfoundry-1.2.2/agentfoundry/llm/openai_llm.py +94 -0
  49. agentfoundry-1.2.2/agentfoundry/registry/__init__.py +1 -0
  50. agentfoundry-1.2.2/agentfoundry/registry/tool_registry.py +250 -0
  51. agentfoundry-1.2.2/agentfoundry/resources/__init__.py +7 -0
  52. agentfoundry-1.2.2/agentfoundry/resources/default_agentfoundry.toml +50 -0
  53. agentfoundry-1.2.2/agentfoundry/utils/__init__.py +0 -0
  54. agentfoundry-1.2.2/agentfoundry/utils/config.py +113 -0
  55. agentfoundry-1.2.2/agentfoundry/utils/exceptions.py +8 -0
  56. agentfoundry-1.2.2/agentfoundry/utils/logger.py +109 -0
  57. agentfoundry-1.2.2/agentfoundry/utils/safe.py +28 -0
  58. agentfoundry-1.2.2/agentfoundry.egg-info/PKG-INFO +133 -0
  59. agentfoundry-1.2.2/agentfoundry.egg-info/SOURCES.txt +68 -0
  60. agentfoundry-1.2.2/agentfoundry.egg-info/dependency_links.txt +1 -0
  61. agentfoundry-1.2.2/agentfoundry.egg-info/not-zip-safe +1 -0
  62. agentfoundry-1.2.2/agentfoundry.egg-info/requires.txt +4 -0
  63. agentfoundry-1.2.2/agentfoundry.egg-info/top_level.txt +2 -0
  64. agentfoundry-1.2.2/pyproject.toml +43 -0
  65. agentfoundry-1.2.2/setup.cfg +4 -0
  66. agentfoundry-1.2.2/setup.py +97 -0
  67. agentfoundry-1.2.2/tests/test_config.py +88 -0
  68. agentfoundry-1.2.2/tests/test_ollama_llm.py +81 -0
  69. agentfoundry-1.2.2/tests/test_registry_tool_list.py +4 -0
  70. agentfoundry-1.2.2/tests/test_webpage_scraper_tool.py +42 -0
@@ -0,0 +1,49 @@
1
+ SYNTHETICORE, INC. PROPRIETARY LICENSE AGREEMENT
2
+
3
+ Copyright (c) 2025 Syntheticore, Inc. All Rights Reserved.
4
+
5
+ This software and any accompanying documentation (the “Software”) is the proprietary property of Syntheticore, Inc. and is licensed, not sold. Use, reproduction, modification, or distribution of the Software is strictly limited to those individuals or entities that have received a valid, written license from Syntheticore, Inc.
6
+
7
+ 1. **License Grant**
8
+ Syntheticore, Inc. (“Licensor”) hereby grants the licensee (“Licensee”) a non-exclusive, non-transferable, revocable license to use the Software solely for Licensee’s internal business purposes, under the terms and conditions set forth herein and in the separate license agreement executed by Licensee.
9
+
10
+ 2. **Restrictions**
11
+ Licensee shall not, and shall not permit any third party to:
12
+ a. Sell, lease, sublicense, distribute, or otherwise transfer the Software or any copies thereof;
13
+ b. Reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code of the Software;
14
+ c. Modify, adapt, translate, or create derivative works based on the Software;
15
+ d. Remove, alter, or obscure any proprietary notices or labels on the Software;
16
+ e. Use the Software for any purpose not expressly authorized by this Agreement or the accompanying license document.
17
+
18
+ 3. **Ownership**
19
+ All title, ownership rights, and intellectual property rights in and to the Software remain with Syntheticore, Inc. Neither this Agreement nor any use of the Software transfers to Licensee any rights, title, or interest in or to the Software, except the limited license rights expressly granted herein.
20
+
21
+ 4. **Termination**
22
+ This license will terminate automatically without notice if Licensee fails to comply with any provision of this Agreement. Upon termination, Licensee must cease all use of the Software and destroy all copies in its possession or control.
23
+
24
+ 5. **Disclaimer of Warranty**
25
+ The Software is provided “AS IS” without warranty of any kind. To the fullest extent permitted by applicable law, Syntheticore, Inc. expressly disclaims all warranties, whether express, implied, statutory, or otherwise, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and non-infringement.
26
+
27
+ 6. **Limitation of Liability**
28
+ In no event shall Syntheticore, Inc. be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, arising from or related to use of or inability to use the Software, even if advised of the possibility of such damages.
29
+
30
+ 7. **Governing Law**
31
+ This Agreement shall be governed by and construed in accordance with the laws of the State of [State], without regard to its conflict of laws principles.
32
+
33
+ 8. **Entire Agreement**
34
+ This Agreement, together with any separate written license agreement executed by Licensee, constitutes the entire agreement between the parties with respect to the Software and supersedes all prior or contemporaneous understandings and agreements, whether written or oral.
35
+
36
+ **SYNTHETICORE, INC.**
37
+
38
+ By: ________________________________________________________________
39
+ Name: _______________________________________________________________
40
+ Title: _______________________________________________________________
41
+ Date: _______________________________________________________________
42
+
43
+ **LICENSEE**
44
+
45
+ By: ________________________________________________________________
46
+ Name: _______________________________________________________________
47
+ Title: _______________________________________________________________
48
+ Date: _______________________________________________________________
49
+
@@ -0,0 +1,12 @@
1
+ # Include compiled .so files and __init__.py
2
+ include agentfoundry/agentfoundry.lic
3
+ include agentfoundry/agentfoundry.pem
4
+ include agentfoundry/__init__.py
5
+ recursive-include agentfoundry *.so
6
+ recursive-include agentfoundry *.pyd
7
+ recursive-include agentfoundry __init__.py
8
+ exclude *.pyd.enc
9
+ exclude *.so
10
+ # Include default configuration template in wheel
11
+ recursive-include agentfoundry/resources *.toml
12
+ exclude *.pyd.enc
@@ -0,0 +1,133 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentfoundry
3
+ Version: 1.2.2
4
+ Summary: AgentFoundry: A modular autonomous AI agent framework
5
+ Author-email: Chris Steel <csteel@syntheticore.com>
6
+ License-Expression: LicenseRef-Proprietary
7
+ Classifier: Programming Language :: Python :: 3.11
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.11
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: chromadb==1.0.7
13
+ Requires-Dist: langchain>=0.3.18
14
+ Requires-Dist: dynaconf>=3.2.0
15
+ Requires-Dist: appdirs>=1.4.4
16
+ Dynamic: license-file
17
+
18
+ # AIgent
19
+
20
+ **AIgent** is a modular, extensible AI framework designed to support the construction and orchestration of autonomous agents across a variety of complex tasks. The system is built in Python and leverages modern AI tooling to integrate large language models (LLMs), vector stores, rule-based decision logic, and dynamic tool discovery in secure and performance-conscious environments.
21
+
22
+ ## Features
23
+
24
+ - Modular agent architecture with support for specialization (e.g., memory agents, reactive agents, compliance agents)
25
+ - Cython-compiled backend for performance and IP protection
26
+ - Integration with popular frameworks such as LangChain, ChromaDB, and OpenAI
27
+ - Support for licensed or embedded deployments via license file verification or compiled-only distribution
28
+ - Configurable with runtime enforcement of execution licenses (RSA-signed, machine-bound)
29
+
30
+ ## Use Cases
31
+
32
+ AIgent is designed to serve as a core intelligence engine for:
33
+
34
+ - Secure enterprise AI platforms (e.g., QuantumDrive)
35
+ - Compliance monitoring and rule-based alerting systems
36
+ - Conversational interfaces with dynamic tool execution
37
+ - Embedded agents in SaaS and on-premise environments
38
+
39
+ ## Requirements
40
+
41
+ - Python 3.11+
42
+ - Cython
43
+ - Compatible dependencies (see `requirements.txt`)
44
+
45
+ ## Author
46
+
47
+ **Christopher Steel**
48
+ AI Practice Lead, AlphaSix Corporation
49
+ Founder, Syntheticore, Inc.
50
+ Email: `csteel@syntheticore.com`
51
+
52
+ ## Licensing and Legal Notice
53
+
54
+ © Syntheticore, Inc. All rights reserved.
55
+
56
+ > **This software is proprietary and confidential.**
57
+ > Any use, reproduction, modification, distribution, or commercial deployment of AIgent or any part thereof requires **explicit written authorization** from Syntheticore, Inc.
58
+
59
+ Unauthorized use is strictly prohibited and may result in legal action.
60
+
61
+ ---
62
+
63
+ For licensing inquiries or permission to use this software, please contact:
64
+ 📧 **csteel@syntheticore.com**
65
+
66
+ ## Gradio Chat Interface
67
+
68
+ A simple Gradio-based chat interface for interacting with the HybridOrchestrator agent.
69
+
70
+ ### Prerequisites
71
+
72
+ - Ensure you have set your OpenAI API key:
73
+
74
+ ```bash
75
+ export OPENAI_API_KEY=<your_api_key>
76
+ ```
77
+
78
+ ### Running the App
79
+
80
+ ```bash
81
+ python gradio_app.py
82
+ ```
83
+
84
+ The interface will be available at http://localhost:7860 by default.
85
+
86
+ ## API Server
87
+
88
+ Genie can be accessed programmatically via a FastAPI‑based HTTP API. Two main endpoints are provided:
89
+
90
+ - **POST /v1/chat**: Send or continue a multi‑turn conversation with Genie. Accepts JSON payload with conversation history and returns the assistant reply and updated history.
91
+ - **POST /v1/orchestrate**: Discover APIs and execute a main task across all agents. Returns aggregated results.
92
+ - **GET /health**: Health check endpoint.
93
+
94
+ ### Prerequisites
95
+
96
+ - Ensure you have set your OpenAI API key:
97
+
98
+ ```bash
99
+ export OPENAI_API_KEY=<your_api_key>
100
+ ```
101
+ - Install FastAPI and Uvicorn (if not already):
102
+
103
+ ```bash
104
+ pip install fastapi uvicorn[standard]
105
+ ```
106
+
107
+ ### Running the API
108
+
109
+ ```bash
110
+ python api_server.py
111
+ # Or with auto‑reload during development:
112
+ uvicorn api_server:app --reload --host 0.0.0.0 --port 8000
113
+ ```
114
+
115
+ Interactive API docs will be available at http://localhost:8000/docs
116
+
117
+ ## Logging & Debugging
118
+
119
+ AgentFoundry automatically logs events to a file and rotates it on each startup.
120
+
121
+ By default, logs are written to `agentfoundry.log` at INFO level. You can customize
122
+ logging behavior via environment variables:
123
+
124
+ ```bash
125
+ export AGENTFOUNDRY_LOG_FILE=agentfoundry.log
126
+ export AGENTFOUNDRY_LOG_LEVEL=DEBUG # or INFO, WARNING, ERROR
127
+ ```
128
+
129
+ Upon each restart of the application or API server, if `agentfoundry.log` already exists,
130
+ it is renamed to `agentfoundry.log.YYYYMMDDHHMMSS` for archival, and a fresh log file
131
+ is started. View live logs in `agentfoundry.log` and inspect past runs in the timestamped
132
+ backup files.
133
+
@@ -0,0 +1,116 @@
1
+ # AIgent
2
+
3
+ **AIgent** is a modular, extensible AI framework designed to support the construction and orchestration of autonomous agents across a variety of complex tasks. The system is built in Python and leverages modern AI tooling to integrate large language models (LLMs), vector stores, rule-based decision logic, and dynamic tool discovery in secure and performance-conscious environments.
4
+
5
+ ## Features
6
+
7
+ - Modular agent architecture with support for specialization (e.g., memory agents, reactive agents, compliance agents)
8
+ - Cython-compiled backend for performance and IP protection
9
+ - Integration with popular frameworks such as LangChain, ChromaDB, and OpenAI
10
+ - Support for licensed or embedded deployments via license file verification or compiled-only distribution
11
+ - Configurable with runtime enforcement of execution licenses (RSA-signed, machine-bound)
12
+
13
+ ## Use Cases
14
+
15
+ AIgent is designed to serve as a core intelligence engine for:
16
+
17
+ - Secure enterprise AI platforms (e.g., QuantumDrive)
18
+ - Compliance monitoring and rule-based alerting systems
19
+ - Conversational interfaces with dynamic tool execution
20
+ - Embedded agents in SaaS and on-premise environments
21
+
22
+ ## Requirements
23
+
24
+ - Python 3.11+
25
+ - Cython
26
+ - Compatible dependencies (see `requirements.txt`)
27
+
28
+ ## Author
29
+
30
+ **Christopher Steel**
31
+ AI Practice Lead, AlphaSix Corporation
32
+ Founder, Syntheticore, Inc.
33
+ Email: `csteel@syntheticore.com`
34
+
35
+ ## Licensing and Legal Notice
36
+
37
+ © Syntheticore, Inc. All rights reserved.
38
+
39
+ > **This software is proprietary and confidential.**
40
+ > Any use, reproduction, modification, distribution, or commercial deployment of AIgent or any part thereof requires **explicit written authorization** from Syntheticore, Inc.
41
+
42
+ Unauthorized use is strictly prohibited and may result in legal action.
43
+
44
+ ---
45
+
46
+ For licensing inquiries or permission to use this software, please contact:
47
+ 📧 **csteel@syntheticore.com**
48
+
49
+ ## Gradio Chat Interface
50
+
51
+ A simple Gradio-based chat interface for interacting with the HybridOrchestrator agent.
52
+
53
+ ### Prerequisites
54
+
55
+ - Ensure you have set your OpenAI API key:
56
+
57
+ ```bash
58
+ export OPENAI_API_KEY=<your_api_key>
59
+ ```
60
+
61
+ ### Running the App
62
+
63
+ ```bash
64
+ python gradio_app.py
65
+ ```
66
+
67
+ The interface will be available at http://localhost:7860 by default.
68
+
69
+ ## API Server
70
+
71
+ Genie can be accessed programmatically via a FastAPI‑based HTTP API. Two main endpoints are provided:
72
+
73
+ - **POST /v1/chat**: Send or continue a multi‑turn conversation with Genie. Accepts JSON payload with conversation history and returns the assistant reply and updated history.
74
+ - **POST /v1/orchestrate**: Discover APIs and execute a main task across all agents. Returns aggregated results.
75
+ - **GET /health**: Health check endpoint.
76
+
77
+ ### Prerequisites
78
+
79
+ - Ensure you have set your OpenAI API key:
80
+
81
+ ```bash
82
+ export OPENAI_API_KEY=<your_api_key>
83
+ ```
84
+ - Install FastAPI and Uvicorn (if not already):
85
+
86
+ ```bash
87
+ pip install fastapi uvicorn[standard]
88
+ ```
89
+
90
+ ### Running the API
91
+
92
+ ```bash
93
+ python api_server.py
94
+ # Or with auto‑reload during development:
95
+ uvicorn api_server:app --reload --host 0.0.0.0 --port 8000
96
+ ```
97
+
98
+ Interactive API docs will be available at http://localhost:8000/docs
99
+
100
+ ## Logging & Debugging
101
+
102
+ AgentFoundry automatically logs events to a file and rotates it on each startup.
103
+
104
+ By default, logs are written to `agentfoundry.log` at INFO level. You can customize
105
+ logging behavior via environment variables:
106
+
107
+ ```bash
108
+ export AGENTFOUNDRY_LOG_FILE=agentfoundry.log
109
+ export AGENTFOUNDRY_LOG_LEVEL=DEBUG # or INFO, WARNING, ERROR
110
+ ```
111
+
112
+ Upon each restart of the application or API server, if `agentfoundry.log` already exists,
113
+ it is renamed to `agentfoundry.log.YYYYMMDDHHMMSS` for archival, and a fresh log file
114
+ is started. View live logs in `agentfoundry.log` and inspect past runs in the timestamped
115
+ backup files.
116
+
@@ -0,0 +1,105 @@
1
+ __version__ = "0.0.2"
2
+
3
+ import os
4
+ import tempfile
5
+ import importlib.util
6
+ import json
7
+ import base64
8
+ from cryptography.fernet import Fernet
9
+ from cryptography.hazmat.primitives import serialization, hashes
10
+ from cryptography.hazmat.primitives.asymmetric import padding
11
+ from cryptography.hazmat.backends import default_backend
12
+
13
+ def load_encrypted_module(module_name, file_path, key):
14
+ print(f"Attempting to decrypt {file_path} as {module_name}")
15
+ cipher = Fernet(key)
16
+ try:
17
+ with open(file_path, 'rb') as f:
18
+ encrypted = f.read()
19
+ print(f"Read {len(encrypted)} bytes from {file_path}")
20
+ decrypted = cipher.decrypt(encrypted)
21
+ print(f"Decrypted {len(decrypted)} bytes for {module_name}")
22
+ with tempfile.NamedTemporaryFile(suffix='.so', delete=False) as tmp:
23
+ tmp.write(decrypted)
24
+ tmp_path = tmp.name
25
+ spec = importlib.util.spec_from_file_location(module_name, tmp_path)
26
+ module = importlib.util.module_from_spec(spec)
27
+ spec.loader.exec_module(module)
28
+ os.remove(tmp_path)
29
+ print(f"Successfully loaded {module_name}")
30
+ return module
31
+ except Exception as e:
32
+ print(f"Failed to decrypt/load {module_name}: {type(e).__name__}: {str(e)}")
33
+ raise
34
+
35
+ # Load encrypted modules in dependency order
36
+ license_key = None
37
+ modules_to_load = []
38
+ dependency_order = [
39
+ "agentfoundry.registry.tool_registry",
40
+ "agentfoundry.registry.database",
41
+ "agentfoundry.utils.logger",
42
+ "agentfoundry.utils.config",
43
+ "agentfoundry.utils.exceptions",
44
+ "agentfoundry.agents.base_agent",
45
+ # Add other critical dependencies here
46
+ ]
47
+
48
+ # Collect all .so files
49
+ for root, _, files in os.walk(os.path.dirname(__file__)):
50
+ for file in files:
51
+ if file.endswith('.so') and not file.endswith('.so.enc'):
52
+ rel_path = os.path.relpath(os.path.join(root, file), os.path.dirname(__file__))
53
+ module_name = rel_path.replace(os.sep, '.')[:-len('.cpython-311-x86_64-linux-gnu.so')]
54
+ module_path = os.path.join(root, file)
55
+ modules_to_load.append((module_name, module_path))
56
+
57
+ # Sort modules to prioritize dependencies
58
+ modules_to_load.sort(key=lambda x: (0 if x[0] in dependency_order else 1, dependency_order.index(x[0]) if x[0] in dependency_order else len(dependency_order)))
59
+
60
+ for module_name, module_path in modules_to_load:
61
+ if license_key is None:
62
+ print("Retrieving decryption key...")
63
+ try:
64
+ with open(os.path.join(os.path.dirname(__file__), "agentfoundry.lic"), 'r') as f:
65
+ license_data = json.load(f)
66
+ with open(os.path.join(os.path.dirname(__file__), "agentfoundry.pem"), 'rb') as f:
67
+ public_key = serialization.load_pem_public_key(f.read(), backend=default_backend())
68
+ signature = base64.b64decode(license_data['signature'])
69
+ license_content = json.dumps(license_data['content'], sort_keys=True).encode()
70
+ public_key.verify(
71
+ signature,
72
+ license_content,
73
+ padding.PSS(
74
+ mgf=padding.MGF1(hashes.SHA256()),
75
+ salt_length=padding.PSS.MAX_LENGTH
76
+ ),
77
+ hashes.SHA256()
78
+ )
79
+ license_key = base64.b64decode(license_data['content']['decryption_key'])
80
+ print(f"Decryption key: {license_key}")
81
+ except Exception as e:
82
+ print(f"Failed to retrieve decryption key: {type(e).__name__}: {str(e)}")
83
+ raise RuntimeError("Failed to retrieve decryption key")
84
+ try:
85
+ module = load_encrypted_module(module_name, module_path, license_key)
86
+ globals()[module_name] = module
87
+ except Exception as e:
88
+ print(f"Failed to process {module_name}: {type(e).__name__}: {str(e)}")
89
+
90
+ # Import modules after decryption
91
+ from .registry.tool_registry import ToolRegistry
92
+ from .agents.base_agent import BaseAgent
93
+ from .agents.orchestrator import Orchestrator
94
+ from .agents.tool_autonomy_agent import ToolAutonomyAgent
95
+ from .license.license import enforce_license, verify_license
96
+ from .license.key_manager import get_license_key
97
+
98
+ __all__ = [
99
+ "ToolRegistry",
100
+ "BaseAgent",
101
+ "Orchestrator",
102
+ "ToolAutonomyAgent",
103
+ "enforce_license",
104
+ "get_license_key",
105
+ ]
@@ -0,0 +1,8 @@
1
+ {
2
+ "content": {
3
+ "machine_id": "91758073483Alien64",
4
+ "expiry": "2025-07-15",
5
+ "decryption_key": "UDNsT1BoLXdWNW5vT3dLd2l3cDdfREw1eG9XdF9LVzZCZ3RqaFMxZmJydz0="
6
+ },
7
+ "signature": "ELX1ICQLbJEyn3/EeaIMJbnBJDP53KFNLZX8cqXd01Jkn5ksj7XcrAamZdbrbuoq9XibfET/zNRxLmcxz1THxzwbwwfGjwep7orB3i0HzboT2PDNOqErnK6hROyX/Xc1AJAzvZEbE/e2QkOeLIDtHOgz2NEgNZoLONXcdltAc/fXR5xT15P/v0PssgtZHiYFsh12MPcRXmvSRxRBU0HYtphKoop2YNu6oPaxFButzDjBVbs4LoQTSnF8/ASC1qc/Dfco0itv/iB5v9tY44Hh4z41ORl0zj8uPifQkeCFbcYDYQziRJpfu6NjVPwpsptqJSF3GGP/1vNlwndLOp3DKA=="
8
+ }
@@ -0,0 +1,9 @@
1
+ -----BEGIN PUBLIC KEY-----
2
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtGgs1A3tTBaOZLMcj1aA
3
+ //SuXxQv8lap3uS/EPisXxfxwb8NDpdI+Eurun2mfjAqRzv7M8RiShbJfanUsI6a
4
+ dVeXYp9dUM7Ede9r8pwBnUOX9JISRvZSn3IQD2jELCbU9eJTM2wz094Gdmd7+bHm
5
+ F75EObyewh0KnSrSd3p7rNnpXaOQCUATz3IoIKllhFZaXslH+g3ZQ+M1f9RrpP9g
6
+ FiNmnSlPnhDAc6tu7xh2OQs+yxiU5Qvqe71WNuNnrcTJQFn6caV/Dbja2bZCzqJG
7
+ 4Js8LOjdKQJojgE+jXae025ZtAscnFNK4IOYJEkOu+dxQzbf7akUx0iviq8mQXN7
8
+ UQIDAQAB
9
+ -----END PUBLIC KEY-----
@@ -0,0 +1,68 @@
1
+ __author__ = "Chris Steel"
2
+ __copyright__ = "Copyright 2025, Syntheticore Corporation"
3
+ __credits__ = ["Chris Steel"]
4
+ __date__ = "2/8/2025"
5
+ __license__ = "Syntheticore Confidential"
6
+ __version__ = "1.0"
7
+ __email__ = "csteel@syntheticore.com"
8
+ __status__ = "Production"
9
+
10
+ # agentfoundry/agents/base_agent.py
11
+
12
+ import logging
13
+ from abc import ABC, abstractmethod
14
+
15
+
16
+ class BaseAgent(ABC):
17
+ """
18
+ Abstract base class for agents in AIgent.
19
+
20
+ Each agent should implement the run_task method to perform its designated operations.
21
+ """
22
+
23
+ def __init__(self, api_info: dict = None):
24
+ """
25
+ Initialize the agent.
26
+
27
+ Args:
28
+ api_info (dict, optional): A dictionary containing API-specific information.
29
+ This can include API endpoint details, credentials, or any other metadata
30
+ required by the agent.
31
+ """
32
+ self.logger = logging.getLogger(self.__class__.__name__)
33
+ self.api_info = api_info or {}
34
+ self.logger.info(f"{self.__class__.__name__} initialized with API info: {self.api_info}")
35
+
36
+ @abstractmethod
37
+ def run_task(self, task: str, *args, **kwargs):
38
+ """
39
+ Execute a specified task.
40
+
41
+ This method must be implemented by all subclasses. The task parameter is expected to be
42
+ a string identifier for the action the agent should perform. Additional arguments or keyword
43
+ arguments can be passed to further specify the task details.
44
+
45
+ Args:
46
+ task (str): The task to be executed.
47
+ *args: Variable length argument list.
48
+ **kwargs: Arbitrary keyword arguments.
49
+
50
+ Returns:
51
+ Any: The result of the task execution.
52
+ """
53
+ raise NotImplementedError("Subclasses must implement the run_task method.")
54
+
55
+ @abstractmethod
56
+ def chat(self, messages: list[dict], config: dict = None, additional: bool = False):
57
+ """
58
+ Multi-turn conversational interface using the supervisor pipeline.
59
+ Args:
60
+ messages: List of dicts with 'role' and 'content' keys representing the conversation history.
61
+ config: Optional config dict for memory tools (user_id, thread_id, org_id, security_level).
62
+ additional: If True, returns (response, full supervisor output).
63
+ Returns:
64
+ The assistant's reply, or (reply, full output) if additional=True.
65
+ """
66
+
67
+ def __str__(self):
68
+ return f"{self.__class__.__name__}(api_info={self.api_info})"