reasoning-deployment-service 0.2.8__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.
Potentially problematic release.
This version of reasoning-deployment-service might be problematic. Click here for more details.
- reasoning_deployment_service-0.2.8/PKG-INFO +177 -0
- reasoning_deployment_service-0.2.8/README.md +155 -0
- reasoning_deployment_service-0.2.8/examples/programmatic_usage.py +154 -0
- reasoning_deployment_service-0.2.8/pyproject.toml +36 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/__init__.py +25 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/cli_editor/__init__.py +5 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/cli_editor/api_client.py +666 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/cli_editor/cli_runner.py +343 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/cli_editor/config.py +82 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/cli_editor/google_deps.py +29 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/cli_editor/reasoning_engine_creator.py +448 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/__init__.py +5 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/main.py +280 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/requirements_minimal.txt +54 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/run_program.sh +55 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/__init__.py +1 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/core/__init__.py +1 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/core/api_client.py +647 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/core/config.py +43 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/core/google_deps.py +22 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/core/reasoning_engine_creator.py +448 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/ui/__init__.py +1 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/ui/agent_space_view.py +312 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/ui/authorization_view.py +280 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/ui/reasoning_engine_view.py +354 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/ui/reasoning_engines_view.py +204 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/gui_editor/src/ui/ui_components.py +1221 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service/reasoning_deployment_service.py +687 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service.egg-info/PKG-INFO +177 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service.egg-info/SOURCES.txt +33 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service.egg-info/dependency_links.txt +1 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service.egg-info/requires.txt +11 -0
- reasoning_deployment_service-0.2.8/reasoning_deployment_service.egg-info/top_level.txt +3 -0
- reasoning_deployment_service-0.2.8/setup.cfg +4 -0
- reasoning_deployment_service-0.2.8/setup.py +89 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: reasoning-deployment-service
|
|
3
|
+
Version: 0.2.8
|
|
4
|
+
Summary: Deployment helper for Vertex AI Reasoning Engines & Agent Spaces
|
|
5
|
+
Author: AxG-AI-Exchange-GenAI-Initiative
|
|
6
|
+
Author-email: Sergio Estrada <sergio.estrada@accenture.com>
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Requires-Python: >=3.7
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: requests>=2.28
|
|
11
|
+
Requires-Dist: python-dotenv>=1.0
|
|
12
|
+
Requires-Dist: google-auth>=2.20
|
|
13
|
+
Requires-Dist: google-cloud-storage>=2.16
|
|
14
|
+
Requires-Dist: keyring>=24.0
|
|
15
|
+
Requires-Dist: keyrings.google-artifactregistry-auth>=1.1
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pytest; extra == "dev"
|
|
18
|
+
Requires-Dist: build; extra == "dev"
|
|
19
|
+
Requires-Dist: twine; extra == "dev"
|
|
20
|
+
Dynamic: author
|
|
21
|
+
Dynamic: requires-python
|
|
22
|
+
|
|
23
|
+
# Reasoning Deployment Service
|
|
24
|
+
|
|
25
|
+
A comprehensive service for deploying reasoning agents with CLI and GUI editors.
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
### Basic Installation (Core deployment service only)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install reasoning-deployment-service
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Installation with GUI Editor
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install "reasoning-deployment-service[gui]"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Installation with CLI Editor
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install "reasoning-deployment-service[cli]"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Full Installation (Everything)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install "reasoning-deployment-service[full]"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Quick Start
|
|
54
|
+
|
|
55
|
+
### Using the Deploy Script (Recommended)
|
|
56
|
+
|
|
57
|
+
The easiest way to get started is using the provided deploy script:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Download and run the deploy script
|
|
61
|
+
curl -O https://raw.githubusercontent.com/your-org/AIXAgentDeploymentService/main/deploy.sh
|
|
62
|
+
chmod +x deploy.sh
|
|
63
|
+
./deploy.sh
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The deploy script will:
|
|
67
|
+
|
|
68
|
+
- Set up a virtual environment
|
|
69
|
+
- Install all necessary dependencies
|
|
70
|
+
- Create a `deploy.py` file configured for your agent
|
|
71
|
+
- Run the deployment
|
|
72
|
+
|
|
73
|
+
## Manual Usage
|
|
74
|
+
|
|
75
|
+
### Core Deployment Service
|
|
76
|
+
|
|
77
|
+
The main deployment service for reasoning engines:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from reasoning_deployment_service import ReasoningEngineDeploymentService
|
|
81
|
+
from google.adk.agents import BaseAgent
|
|
82
|
+
|
|
83
|
+
# Your agent implementation
|
|
84
|
+
class MyAgent(BaseAgent):
|
|
85
|
+
# ... your agent implementation
|
|
86
|
+
|
|
87
|
+
# Deploy using the service
|
|
88
|
+
agent = MyAgent()
|
|
89
|
+
deployment_service = ReasoningEngineDeploymentService(
|
|
90
|
+
root_agent=agent,
|
|
91
|
+
deployment_environment="DEV" # or "PROD"
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Deploy everything
|
|
95
|
+
deployment_service.one_deployment_with_everything_on_it()
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### CLI Editor (Optional)
|
|
99
|
+
|
|
100
|
+
For command-line management of reasoning engines and agent spaces:
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from reasoning_deployment_service.cli_editor import CLIRunner
|
|
104
|
+
|
|
105
|
+
# Start the CLI interface
|
|
106
|
+
cli = CLIRunner()
|
|
107
|
+
cli.run()
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### GUI Editor (Optional)
|
|
111
|
+
|
|
112
|
+
For graphical management interface:
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from reasoning_deployment_service.gui_editor import GUIEditor
|
|
116
|
+
|
|
117
|
+
# Start the GUI application
|
|
118
|
+
app = GUIEditor()
|
|
119
|
+
app.mainloop()
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Configuration
|
|
123
|
+
|
|
124
|
+
Create a `.env` file with your deployment environment variables:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Development Profile
|
|
128
|
+
DEV_PROJECT_ID=your-project-id
|
|
129
|
+
DEV_PROJECT_NUMBER=your-project-number
|
|
130
|
+
DEV_PROJECT_LOCATION=us-central1
|
|
131
|
+
DEV_STAGING_BUCKET=gs://your-staging-bucket
|
|
132
|
+
DEV_AGENT_SPACE_ENGINE=your-agent-space-engine
|
|
133
|
+
DEV_OAUTH_CLIENT_ID=your-oauth-client-id
|
|
134
|
+
DEV_OAUTH_CLIENT_SECRET=your-oauth-client-secret
|
|
135
|
+
|
|
136
|
+
# Production Profile
|
|
137
|
+
PROD_PROJECT_ID=your-prod-project-id
|
|
138
|
+
PROD_PROJECT_NUMBER=your-prod-project-number
|
|
139
|
+
# ... etc
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Create an `aix_agent.yaml` file with your agent metadata:
|
|
143
|
+
|
|
144
|
+
```yaml
|
|
145
|
+
defaults:
|
|
146
|
+
scopes:
|
|
147
|
+
- "https://www.googleapis.com/auth/cloud-platform"
|
|
148
|
+
metadata:
|
|
149
|
+
reasoning_engine_name: "my-reasoning-engine"
|
|
150
|
+
reasoning_engine_description: "My custom reasoning engine"
|
|
151
|
+
agent_space_name: "my-agent-space"
|
|
152
|
+
agent_space_description: "My agent space"
|
|
153
|
+
agent_space_tool_description: "Tool description"
|
|
154
|
+
auth:
|
|
155
|
+
oauth_authorization_id: "my-auth-id"
|
|
156
|
+
environment_variables:
|
|
157
|
+
- "CUSTOM_VAR=value"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Dependency Management
|
|
161
|
+
|
|
162
|
+
Dependencies are now centrally managed in `setup.py`:
|
|
163
|
+
|
|
164
|
+
- **Core dependencies**: Installed automatically with the base package
|
|
165
|
+
- **GUI dependencies**: Install with `[gui]` extra for tkinter-based interface
|
|
166
|
+
- **CLI dependencies**: Install with `[cli]` extra (currently no additional deps)
|
|
167
|
+
- **Full dependencies**: Install with `[full]` extra for complete functionality
|
|
168
|
+
|
|
169
|
+
## Modular Usage
|
|
170
|
+
|
|
171
|
+
Each component can be used independently:
|
|
172
|
+
|
|
173
|
+
- **Core Service**: Just use `ReasoningEngineDeploymentService` for programmatic deployment
|
|
174
|
+
- **CLI Editor**: Add `cli_editor` for command-line management
|
|
175
|
+
- **GUI Editor**: Add `gui_editor` for graphical interface
|
|
176
|
+
|
|
177
|
+
The package is designed so users can import only what they need and instantiate the components they want to use.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Reasoning Deployment Service
|
|
2
|
+
|
|
3
|
+
A comprehensive service for deploying reasoning agents with CLI and GUI editors.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Basic Installation (Core deployment service only)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install reasoning-deployment-service
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Installation with GUI Editor
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install "reasoning-deployment-service[gui]"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Installation with CLI Editor
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install "reasoning-deployment-service[cli]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Full Installation (Everything)
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install "reasoning-deployment-service[full]"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### Using the Deploy Script (Recommended)
|
|
34
|
+
|
|
35
|
+
The easiest way to get started is using the provided deploy script:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Download and run the deploy script
|
|
39
|
+
curl -O https://raw.githubusercontent.com/your-org/AIXAgentDeploymentService/main/deploy.sh
|
|
40
|
+
chmod +x deploy.sh
|
|
41
|
+
./deploy.sh
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The deploy script will:
|
|
45
|
+
|
|
46
|
+
- Set up a virtual environment
|
|
47
|
+
- Install all necessary dependencies
|
|
48
|
+
- Create a `deploy.py` file configured for your agent
|
|
49
|
+
- Run the deployment
|
|
50
|
+
|
|
51
|
+
## Manual Usage
|
|
52
|
+
|
|
53
|
+
### Core Deployment Service
|
|
54
|
+
|
|
55
|
+
The main deployment service for reasoning engines:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from reasoning_deployment_service import ReasoningEngineDeploymentService
|
|
59
|
+
from google.adk.agents import BaseAgent
|
|
60
|
+
|
|
61
|
+
# Your agent implementation
|
|
62
|
+
class MyAgent(BaseAgent):
|
|
63
|
+
# ... your agent implementation
|
|
64
|
+
|
|
65
|
+
# Deploy using the service
|
|
66
|
+
agent = MyAgent()
|
|
67
|
+
deployment_service = ReasoningEngineDeploymentService(
|
|
68
|
+
root_agent=agent,
|
|
69
|
+
deployment_environment="DEV" # or "PROD"
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# Deploy everything
|
|
73
|
+
deployment_service.one_deployment_with_everything_on_it()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### CLI Editor (Optional)
|
|
77
|
+
|
|
78
|
+
For command-line management of reasoning engines and agent spaces:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from reasoning_deployment_service.cli_editor import CLIRunner
|
|
82
|
+
|
|
83
|
+
# Start the CLI interface
|
|
84
|
+
cli = CLIRunner()
|
|
85
|
+
cli.run()
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### GUI Editor (Optional)
|
|
89
|
+
|
|
90
|
+
For graphical management interface:
|
|
91
|
+
|
|
92
|
+
```python
|
|
93
|
+
from reasoning_deployment_service.gui_editor import GUIEditor
|
|
94
|
+
|
|
95
|
+
# Start the GUI application
|
|
96
|
+
app = GUIEditor()
|
|
97
|
+
app.mainloop()
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Configuration
|
|
101
|
+
|
|
102
|
+
Create a `.env` file with your deployment environment variables:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Development Profile
|
|
106
|
+
DEV_PROJECT_ID=your-project-id
|
|
107
|
+
DEV_PROJECT_NUMBER=your-project-number
|
|
108
|
+
DEV_PROJECT_LOCATION=us-central1
|
|
109
|
+
DEV_STAGING_BUCKET=gs://your-staging-bucket
|
|
110
|
+
DEV_AGENT_SPACE_ENGINE=your-agent-space-engine
|
|
111
|
+
DEV_OAUTH_CLIENT_ID=your-oauth-client-id
|
|
112
|
+
DEV_OAUTH_CLIENT_SECRET=your-oauth-client-secret
|
|
113
|
+
|
|
114
|
+
# Production Profile
|
|
115
|
+
PROD_PROJECT_ID=your-prod-project-id
|
|
116
|
+
PROD_PROJECT_NUMBER=your-prod-project-number
|
|
117
|
+
# ... etc
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Create an `aix_agent.yaml` file with your agent metadata:
|
|
121
|
+
|
|
122
|
+
```yaml
|
|
123
|
+
defaults:
|
|
124
|
+
scopes:
|
|
125
|
+
- "https://www.googleapis.com/auth/cloud-platform"
|
|
126
|
+
metadata:
|
|
127
|
+
reasoning_engine_name: "my-reasoning-engine"
|
|
128
|
+
reasoning_engine_description: "My custom reasoning engine"
|
|
129
|
+
agent_space_name: "my-agent-space"
|
|
130
|
+
agent_space_description: "My agent space"
|
|
131
|
+
agent_space_tool_description: "Tool description"
|
|
132
|
+
auth:
|
|
133
|
+
oauth_authorization_id: "my-auth-id"
|
|
134
|
+
environment_variables:
|
|
135
|
+
- "CUSTOM_VAR=value"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Dependency Management
|
|
139
|
+
|
|
140
|
+
Dependencies are now centrally managed in `setup.py`:
|
|
141
|
+
|
|
142
|
+
- **Core dependencies**: Installed automatically with the base package
|
|
143
|
+
- **GUI dependencies**: Install with `[gui]` extra for tkinter-based interface
|
|
144
|
+
- **CLI dependencies**: Install with `[cli]` extra (currently no additional deps)
|
|
145
|
+
- **Full dependencies**: Install with `[full]` extra for complete functionality
|
|
146
|
+
|
|
147
|
+
## Modular Usage
|
|
148
|
+
|
|
149
|
+
Each component can be used independently:
|
|
150
|
+
|
|
151
|
+
- **Core Service**: Just use `ReasoningEngineDeploymentService` for programmatic deployment
|
|
152
|
+
- **CLI Editor**: Add `cli_editor` for command-line management
|
|
153
|
+
- **GUI Editor**: Add `gui_editor` for graphical interface
|
|
154
|
+
|
|
155
|
+
The package is designed so users can import only what they need and instantiate the components they want to use.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Example: Programmatic usage of reasoning deployment service components
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
import threading
|
|
8
|
+
import time
|
|
9
|
+
|
|
10
|
+
def example_cli_usage():
|
|
11
|
+
"""Example of starting CLI editor programmatically."""
|
|
12
|
+
print("š CLI Editor Example:")
|
|
13
|
+
print("-" * 30)
|
|
14
|
+
|
|
15
|
+
try:
|
|
16
|
+
from reasoning_deployment_service.cli_editor import CLIRunner
|
|
17
|
+
|
|
18
|
+
# Create CLI runner
|
|
19
|
+
cli = CLIRunner()
|
|
20
|
+
|
|
21
|
+
# Note: cli.run() is interactive and will block
|
|
22
|
+
# For demo purposes, we'll just show it's available
|
|
23
|
+
print("ā
CLI Runner created successfully")
|
|
24
|
+
print("š” To run: cli.run()")
|
|
25
|
+
print("š This will start an interactive CLI session")
|
|
26
|
+
|
|
27
|
+
return cli
|
|
28
|
+
|
|
29
|
+
except Exception as e:
|
|
30
|
+
print(f"ā Error with CLI: {e}")
|
|
31
|
+
return None
|
|
32
|
+
|
|
33
|
+
def example_gui_usage():
|
|
34
|
+
"""Example of starting GUI editor programmatically."""
|
|
35
|
+
print("\nš¼ļø GUI Editor Example:")
|
|
36
|
+
print("-" * 30)
|
|
37
|
+
|
|
38
|
+
try:
|
|
39
|
+
from reasoning_deployment_service.gui_editor import GUIEditor
|
|
40
|
+
|
|
41
|
+
# Note: We don't actually create the GUI to avoid issues in headless environments
|
|
42
|
+
print("ā
GUI Editor class available")
|
|
43
|
+
print("š” To run: app = GUIEditor(); app.mainloop()")
|
|
44
|
+
print("š This will start the tkinter GUI application")
|
|
45
|
+
|
|
46
|
+
return GUIEditor
|
|
47
|
+
|
|
48
|
+
except Exception as e:
|
|
49
|
+
print(f"ā Error with GUI: {e}")
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
def example_core_deployment():
|
|
53
|
+
"""Example of using core deployment service."""
|
|
54
|
+
print("\nāļø Core Deployment Service Example:")
|
|
55
|
+
print("-" * 40)
|
|
56
|
+
|
|
57
|
+
try:
|
|
58
|
+
from reasoning_deployment_service import ReasoningEngineDeploymentService
|
|
59
|
+
|
|
60
|
+
print("ā
Core deployment service available")
|
|
61
|
+
print("š” Usage:")
|
|
62
|
+
print(" service = ReasoningEngineDeploymentService(agent, 'DEV')")
|
|
63
|
+
print(" service.one_deployment_with_everything_on_it()")
|
|
64
|
+
|
|
65
|
+
return ReasoningEngineDeploymentService
|
|
66
|
+
|
|
67
|
+
except Exception as e:
|
|
68
|
+
print(f"ā Error with core service: {e}")
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
def example_integrated_workflow():
|
|
72
|
+
"""Example of an integrated workflow."""
|
|
73
|
+
print("\nš Integrated Workflow Example:")
|
|
74
|
+
print("-" * 35)
|
|
75
|
+
|
|
76
|
+
print("""
|
|
77
|
+
def integrated_agent_workflow():
|
|
78
|
+
# 1. Deploy your agent
|
|
79
|
+
from reasoning_deployment_service import ReasoningEngineDeploymentService
|
|
80
|
+
from google.adk.agents import BaseAgent
|
|
81
|
+
|
|
82
|
+
class MyAgent(BaseAgent):
|
|
83
|
+
def invoke(self, input_text: str) -> str:
|
|
84
|
+
return f"Agent response: {input_text}"
|
|
85
|
+
|
|
86
|
+
agent = MyAgent()
|
|
87
|
+
service = ReasoningEngineDeploymentService(agent, "DEV")
|
|
88
|
+
service.one_deployment_with_everything_on_it()
|
|
89
|
+
|
|
90
|
+
# 2. Launch management interface
|
|
91
|
+
choice = input("Choose interface (cli/gui): ")
|
|
92
|
+
|
|
93
|
+
if choice == "cli":
|
|
94
|
+
from reasoning_deployment_service.cli_editor import CLIRunner
|
|
95
|
+
cli = CLIRunner()
|
|
96
|
+
cli.run()
|
|
97
|
+
elif choice == "gui":
|
|
98
|
+
from reasoning_deployment_service.gui_editor import GUIEditor
|
|
99
|
+
app = GUIEditor()
|
|
100
|
+
app.mainloop()
|
|
101
|
+
""")
|
|
102
|
+
|
|
103
|
+
def check_environment():
|
|
104
|
+
"""Check if environment is properly configured."""
|
|
105
|
+
print("\nš Environment Check:")
|
|
106
|
+
print("-" * 20)
|
|
107
|
+
|
|
108
|
+
required_vars = [
|
|
109
|
+
"DEV_PROJECT_ID", "DEV_PROJECT_NUMBER",
|
|
110
|
+
"DEV_PROJECT_LOCATION", "DEV_STAGING_BUCKET"
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
missing = []
|
|
114
|
+
for var in required_vars:
|
|
115
|
+
if not os.getenv(var):
|
|
116
|
+
missing.append(var)
|
|
117
|
+
|
|
118
|
+
if missing:
|
|
119
|
+
print(f"ā ļø Missing environment variables: {missing}")
|
|
120
|
+
print("š” Set these in your .env file before using the services")
|
|
121
|
+
return False
|
|
122
|
+
else:
|
|
123
|
+
print("ā
Environment variables look good!")
|
|
124
|
+
return True
|
|
125
|
+
|
|
126
|
+
def main():
|
|
127
|
+
"""Main example function."""
|
|
128
|
+
print("š Reasoning Deployment Service - Programmatic Usage Examples")
|
|
129
|
+
print("=" * 65)
|
|
130
|
+
|
|
131
|
+
# Check environment
|
|
132
|
+
env_ok = check_environment()
|
|
133
|
+
|
|
134
|
+
# Show component examples
|
|
135
|
+
cli = example_cli_usage()
|
|
136
|
+
gui_class = example_gui_usage()
|
|
137
|
+
core = example_core_deployment()
|
|
138
|
+
example_integrated_workflow()
|
|
139
|
+
|
|
140
|
+
# Summary
|
|
141
|
+
print("\nš Summary:")
|
|
142
|
+
print("-" * 12)
|
|
143
|
+
print(f"ā
CLI Editor: {'Available' if cli else 'Not available'}")
|
|
144
|
+
print(f"ā
GUI Editor: {'Available' if gui_class else 'Not available'}")
|
|
145
|
+
print(f"ā
Core Service: {'Available' if core else 'Not available'}")
|
|
146
|
+
print(f"ā
Environment: {'Configured' if env_ok else 'Needs setup'}")
|
|
147
|
+
|
|
148
|
+
if cli and gui_class and core:
|
|
149
|
+
print("\nš All components are ready for programmatic use!")
|
|
150
|
+
else:
|
|
151
|
+
print("\nā ļø Some components may need additional setup or dependencies.")
|
|
152
|
+
|
|
153
|
+
if __name__ == "__main__":
|
|
154
|
+
main()
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "reasoning-deployment-service"
|
|
7
|
+
version = "0.2.8"
|
|
8
|
+
description = "Deployment helper for Vertex AI Reasoning Engines & Agent Spaces"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "Apache-2.0" }
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Sergio Estrada", email = "sergio.estrada@accenture.com" }
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
dependencies = [
|
|
18
|
+
"requests>=2.28",
|
|
19
|
+
"python-dotenv>=1.0",
|
|
20
|
+
"google-auth>=2.20",
|
|
21
|
+
"google-cloud-storage>=2.16",
|
|
22
|
+
"keyring>=24.0",
|
|
23
|
+
"keyrings.google-artifactregistry-auth>=1.1"
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
dev = [
|
|
28
|
+
"pytest",
|
|
29
|
+
"build",
|
|
30
|
+
"twine",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
|
|
35
|
+
[tool.setuptools.packages.find]
|
|
36
|
+
where = ["."]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Initialize the reasoning_deployment_service package
|
|
2
|
+
|
|
3
|
+
from .reasoning_deployment_service import ReasoningEngineDeploymentService
|
|
4
|
+
|
|
5
|
+
# Import submodules for optional use
|
|
6
|
+
try:
|
|
7
|
+
from . import cli_editor
|
|
8
|
+
from . import gui_editor
|
|
9
|
+
CLI_AVAILABLE = True
|
|
10
|
+
GUI_AVAILABLE = True
|
|
11
|
+
except ImportError as e:
|
|
12
|
+
print(f"Warning: Some optional components not available: {e}")
|
|
13
|
+
CLI_AVAILABLE = False
|
|
14
|
+
GUI_AVAILABLE = False
|
|
15
|
+
|
|
16
|
+
# Make main classes available for direct import
|
|
17
|
+
__all__ = [
|
|
18
|
+
'ReasoningEngineDeploymentService',
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
# Add optional components if available
|
|
22
|
+
if CLI_AVAILABLE:
|
|
23
|
+
__all__.append('cli_editor')
|
|
24
|
+
if GUI_AVAILABLE:
|
|
25
|
+
__all__.append('gui_editor')
|