super-agent-bedrock 0.5.0__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.
- super_agent_bedrock-0.5.0/LICENSE +196 -0
- super_agent_bedrock-0.5.0/MANIFEST.in +3 -0
- super_agent_bedrock-0.5.0/PKG-INFO +248 -0
- super_agent_bedrock-0.5.0/README.md +223 -0
- super_agent_bedrock-0.5.0/docs/ARCHITECTURE.md +58 -0
- super_agent_bedrock-0.5.0/pyproject.toml +40 -0
- super_agent_bedrock-0.5.0/setup.cfg +4 -0
- super_agent_bedrock-0.5.0/src/super_agent/__init__.py +8 -0
- super_agent_bedrock-0.5.0/src/super_agent/__main__.py +7 -0
- super_agent_bedrock-0.5.0/src/super_agent_bedrock.egg-info/PKG-INFO +248 -0
- super_agent_bedrock-0.5.0/src/super_agent_bedrock.egg-info/SOURCES.txt +18 -0
- super_agent_bedrock-0.5.0/src/super_agent_bedrock.egg-info/dependency_links.txt +1 -0
- super_agent_bedrock-0.5.0/src/super_agent_bedrock.egg-info/entry_points.txt +2 -0
- super_agent_bedrock-0.5.0/src/super_agent_bedrock.egg-info/requires.txt +9 -0
- super_agent_bedrock-0.5.0/src/super_agent_bedrock.egg-info/top_level.txt +2 -0
- super_agent_bedrock-0.5.0/src/super_power/__init__.py +5 -0
- super_agent_bedrock-0.5.0/src/super_power/__main__.py +7 -0
- super_agent_bedrock-0.5.0/src/super_power/_jev.py +119 -0
- super_agent_bedrock-0.5.0/src/super_power/_runner.py +2932 -0
- super_agent_bedrock-0.5.0/tests/test_package_entrypoints.py +500 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but not
|
|
32
|
+
limited to compiled object code, generated documentation, and
|
|
33
|
+
conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work.
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean any work of authorship, including the
|
|
48
|
+
original version of the Work and any modifications or additions to that
|
|
49
|
+
Work or Derivative Works thereof, that is intentionally submitted to
|
|
50
|
+
Licensor for inclusion in the Work by the copyright owner or by an
|
|
51
|
+
individual or Legal Entity authorized to submit on behalf of the
|
|
52
|
+
copyright owner. For the purposes of this definition, "submitted"
|
|
53
|
+
means any form of electronic, verbal, or written communication sent to
|
|
54
|
+
the Licensor or its representatives, including but not limited to
|
|
55
|
+
communication on electronic mailing lists, source code control systems,
|
|
56
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
57
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
58
|
+
excluding communication that is conspicuously marked or otherwise
|
|
59
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
60
|
+
|
|
61
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
62
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
63
|
+
subsequently incorporated within the Work.
|
|
64
|
+
|
|
65
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
66
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
67
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
68
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
69
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
70
|
+
Work and such Derivative Works in Source or Object form.
|
|
71
|
+
|
|
72
|
+
3. Grant of Patent License. Subject to the terms and conditions of this
|
|
73
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
74
|
+
non-exclusive, no-charge, royalty-free, irrevocable (except as stated
|
|
75
|
+
in this section) patent license to make, have made, use, offer to sell,
|
|
76
|
+
sell, import, and otherwise transfer the Work, where such license
|
|
77
|
+
applies only to those patent claims licensable by such Contributor that
|
|
78
|
+
are necessarily infringed by their Contribution(s) alone or by
|
|
79
|
+
combination of their Contribution(s) with the Work to which such
|
|
80
|
+
Contribution(s) was submitted. If You institute patent litigation
|
|
81
|
+
against any entity alleging that the Work or a Contribution incorporated
|
|
82
|
+
within the Work constitutes direct or contributory patent infringement,
|
|
83
|
+
then any patent licenses granted to You under this License for that Work
|
|
84
|
+
shall terminate as of the date such litigation is filed.
|
|
85
|
+
|
|
86
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or
|
|
87
|
+
Derivative Works thereof in any medium, with or without modifications,
|
|
88
|
+
and in Source or Object form, provided that You meet the following
|
|
89
|
+
conditions:
|
|
90
|
+
|
|
91
|
+
(a) You must give any other recipients of the Work or Derivative Works
|
|
92
|
+
a copy of this License; and
|
|
93
|
+
|
|
94
|
+
(b) You must cause any modified files to carry prominent notices
|
|
95
|
+
stating that You changed the files; and
|
|
96
|
+
|
|
97
|
+
(c) You must retain, in the Source form of any Derivative Works that
|
|
98
|
+
You distribute, all copyright, patent, trademark, and attribution
|
|
99
|
+
notices from the Source form of the Work, excluding those notices
|
|
100
|
+
that do not pertain to any part of the Derivative Works; and
|
|
101
|
+
|
|
102
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
103
|
+
distribution, then any Derivative Works that You distribute must
|
|
104
|
+
include a readable copy of the attribution notices contained within
|
|
105
|
+
such NOTICE file, excluding those notices that do not pertain to any
|
|
106
|
+
part of the Derivative Works, in at least one of the following
|
|
107
|
+
places: within a NOTICE text file distributed as part of the
|
|
108
|
+
Derivative Works; within the Source form or documentation, if
|
|
109
|
+
provided along with the Derivative Works; or, within a display
|
|
110
|
+
generated by the Derivative Works, if and wherever such third-party
|
|
111
|
+
notices normally appear. The contents of the NOTICE file are for
|
|
112
|
+
informational purposes only and do not modify the License. You may
|
|
113
|
+
add Your own attribution notices within Derivative Works that You
|
|
114
|
+
distribute, alongside or as an addendum to the NOTICE text from the
|
|
115
|
+
Work, provided that such additional attribution notices cannot be
|
|
116
|
+
construed as modifying the License.
|
|
117
|
+
|
|
118
|
+
You may add Your own copyright statement to Your modifications and may
|
|
119
|
+
provide additional or different license terms and conditions for use,
|
|
120
|
+
reproduction, or distribution of Your modifications, or for any such
|
|
121
|
+
Derivative Works as a whole, provided Your use, reproduction, and
|
|
122
|
+
distribution of the Work otherwise complies with the conditions stated
|
|
123
|
+
in this License.
|
|
124
|
+
|
|
125
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
126
|
+
any Contribution intentionally submitted for inclusion in the Work by
|
|
127
|
+
You to the Licensor shall be under the terms and conditions of this
|
|
128
|
+
License, without any additional terms or conditions. Notwithstanding the
|
|
129
|
+
above, nothing herein shall supersede or modify the terms of any
|
|
130
|
+
separate license agreement you may have executed with Licensor regarding
|
|
131
|
+
such Contributions.
|
|
132
|
+
|
|
133
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
134
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
135
|
+
except as required for reasonable and customary use in describing the
|
|
136
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
137
|
+
|
|
138
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to
|
|
139
|
+
in writing, Licensor provides the Work (and each Contributor provides
|
|
140
|
+
its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
|
141
|
+
OF ANY KIND, either express or implied, including, without limitation,
|
|
142
|
+
any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY,
|
|
143
|
+
or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for
|
|
144
|
+
determining the appropriateness of using or redistributing the Work and
|
|
145
|
+
assume any risks associated with Your exercise of permissions under this
|
|
146
|
+
License.
|
|
147
|
+
|
|
148
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
149
|
+
whether in tort (including negligence), contract, or otherwise, unless
|
|
150
|
+
required by applicable law (such as deliberate and grossly negligent
|
|
151
|
+
acts) or agreed to in writing, shall any Contributor be liable to You
|
|
152
|
+
for damages, including any direct, indirect, special, incidental, or
|
|
153
|
+
consequential damages of any character arising as a result of this
|
|
154
|
+
License or out of the use or inability to use the Work (including but
|
|
155
|
+
not limited to damages for loss of goodwill, work stoppage, computer
|
|
156
|
+
failure or malfunction, or any and all other commercial damages or
|
|
157
|
+
losses), even if such Contributor has been advised of the possibility of
|
|
158
|
+
such damages.
|
|
159
|
+
|
|
160
|
+
9. Accepting Warranty or Additional Liability. While redistributing the
|
|
161
|
+
Work or Derivative Works thereof, You may choose to offer, and charge a
|
|
162
|
+
fee for, acceptance of support, warranty, indemnity, or other liability
|
|
163
|
+
obligations and/or rights consistent with this License. However, in
|
|
164
|
+
accepting such obligations, You may act only on Your own behalf and on
|
|
165
|
+
Your sole responsibility, not on behalf of any other Contributor, and
|
|
166
|
+
only if You agree to indemnify, defend, and hold each Contributor
|
|
167
|
+
harmless for any liability incurred by, or claims asserted against, such
|
|
168
|
+
Contributor by reason of your accepting any such warranty or additional
|
|
169
|
+
liability.
|
|
170
|
+
|
|
171
|
+
END OF TERMS AND CONDITIONS
|
|
172
|
+
|
|
173
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
174
|
+
|
|
175
|
+
To apply the Apache License to your work, attach the following
|
|
176
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
177
|
+
replaced with your own identifying information. (Don't include the
|
|
178
|
+
brackets.) The text should be enclosed in the appropriate comment
|
|
179
|
+
syntax for the file format. We also recommend that a file or class
|
|
180
|
+
name and description of purpose be included on the same "printed page"
|
|
181
|
+
as the copyright notice for easier identification within third-party
|
|
182
|
+
archives.
|
|
183
|
+
|
|
184
|
+
Copyright [yyyy] [name of copyright owner]
|
|
185
|
+
|
|
186
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
187
|
+
you may not use this file except in compliance with the License.
|
|
188
|
+
You may obtain a copy of the License at
|
|
189
|
+
|
|
190
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
191
|
+
|
|
192
|
+
Unless required by applicable law or agreed to in writing, software
|
|
193
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
194
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
195
|
+
See the License for the specific language governing permissions and
|
|
196
|
+
limitations under the License.
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: super-agent-bedrock
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: SUPER AGENT: a Bedrock-backed AWS and Kubernetes operations assistant
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Classifier: Development Status :: 3 - Alpha
|
|
7
|
+
Classifier: Operating System :: OS Independent
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Topic :: System :: Systems Administration
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: boto3<2,>=1.34
|
|
18
|
+
Requires-Dist: botocore<2,>=1.34
|
|
19
|
+
Requires-Dist: rich<15,>=13
|
|
20
|
+
Provides-Extra: kubernetes
|
|
21
|
+
Requires-Dist: kubernetes<34,>=28; extra == "kubernetes"
|
|
22
|
+
Provides-Extra: ui
|
|
23
|
+
Requires-Dist: prompt-toolkit<4,>=3; extra == "ui"
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# SUPER AGENT
|
|
27
|
+
|
|
28
|
+
SUPER AGENT is a conversational AWS and Kubernetes operations assistant that
|
|
29
|
+
uses the Amazon Bedrock Converse API. It can inspect resources, investigate
|
|
30
|
+
metrics and logs, and perform guarded operations after explicit approval.
|
|
31
|
+
|
|
32
|
+
## How to run
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python -m pip install super-agent-bedrock
|
|
36
|
+
super-agent
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Ask a one-off question:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
super-agent "List EKS clusters in us-west-2"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or start an interactive session:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
super-agent --interactive
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Check this machine's AWS identity, Bedrock model access, and Kubernetes client
|
|
52
|
+
readiness before starting work:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
super-agent --preflight
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Interactive sessions run this credential-safe check at startup. Use
|
|
59
|
+
`--skip-preflight` only when you deliberately want to suppress its display;
|
|
60
|
+
it does not disable runtime safety checks. Within an interactive session, run
|
|
61
|
+
`/doctor` to repeat the check.
|
|
62
|
+
|
|
63
|
+
Choose a model or AWS Region when needed:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
super-agent --model <model-or-profile-id> --region eu-west-1 "Show EC2 instances"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Cross-account operations
|
|
70
|
+
|
|
71
|
+
Cross-account is a first-class workflow. Select the target account and SUPER
|
|
72
|
+
AGENT assumes its `CrossAccountAgentRole` by default, verifies the resulting
|
|
73
|
+
STS identity is in that exact account, and displays the target in the terminal
|
|
74
|
+
footer and audit log.
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
super-agent --account-id 123456789012
|
|
78
|
+
super-agent --account-id 123456789012 --role-name Platform/CrossAccountAgentRole
|
|
79
|
+
super-agent --account-id 123456789012 --external-id your-trust-policy-value --preflight
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`--assume-role` remains available for an explicit role ARN. The source role
|
|
83
|
+
must be allowed to call `sts:AssumeRole`, and the target role's trust policy
|
|
84
|
+
must allow the source role. An account mismatch stops the session before any
|
|
85
|
+
Bedrock or infrastructure operation begins.
|
|
86
|
+
|
|
87
|
+
Inside an interactive session, switch safely without exiting:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
/account 219826436331
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
You can also type `switch account to 219826436331`. SUPER AGENT asks for
|
|
94
|
+
approval, verifies the newly assumed identity, then clears the previous
|
|
95
|
+
conversation and Kubernetes connection so evidence from two accounts cannot
|
|
96
|
+
mix.
|
|
97
|
+
|
|
98
|
+
## JEV tool safety
|
|
99
|
+
|
|
100
|
+
JEV is the local validation layer between the model and AWS. It blocks unknown
|
|
101
|
+
or sensitive APIs so a model cannot guess an invalid operation or read a secret
|
|
102
|
+
just because it is technically a “read” call. The catalog expands through
|
|
103
|
+
reviewed typed tools and validated capabilities. It includes CloudTrail event
|
|
104
|
+
lookup for “who created this?” investigations and CloudWatch Logs group
|
|
105
|
+
discovery; unsupported services are intentionally rejected with an explanation
|
|
106
|
+
rather than executed blindly.
|
|
107
|
+
|
|
108
|
+
## Development architecture
|
|
109
|
+
|
|
110
|
+
For contributors, [the architecture guide](docs/ARCHITECTURE.md) explains the
|
|
111
|
+
runtime flow, JEV boundaries, and the safe module-extraction order.
|
|
112
|
+
|
|
113
|
+
## Requirements
|
|
114
|
+
|
|
115
|
+
- Python 3.9 or later
|
|
116
|
+
- AWS credentials supplied by a standard AWS profile, IAM Identity Center,
|
|
117
|
+
environment variables, an EC2 instance profile, or an EKS web-identity role
|
|
118
|
+
- Amazon Bedrock model access and `bedrock:InvokeModel` permission for the
|
|
119
|
+
selected model and Region
|
|
120
|
+
|
|
121
|
+
Install Kubernetes support when you need Kubernetes API tools:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
python -m pip install "super-agent-bedrock[kubernetes]"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Safety
|
|
128
|
+
|
|
129
|
+
Read-only operations run without confirmation. Operations that create, change,
|
|
130
|
+
restart, scale, delete, or send commands require approval. A built-in block
|
|
131
|
+
list refuses destructive commands even when approval is supplied.
|
|
132
|
+
|
|
133
|
+
The tool does not create AWS credentials, enable Bedrock model access, or
|
|
134
|
+
change account-level permissions. Never put credentials, access keys, or
|
|
135
|
+
tokens into source code, memory files, or package configuration.
|
|
136
|
+
|
|
137
|
+
If Bedrock invocation is denied, preflight identifies the active AWS role,
|
|
138
|
+
account, model or inference profile, and Region, then explains the smallest
|
|
139
|
+
safe administrator checks. It never prints credential values. The readiness
|
|
140
|
+
probe sends a fixed one-token request without conversation history solely to
|
|
141
|
+
verify the selected model's Converse permission.
|
|
142
|
+
|
|
143
|
+
## Troubleshooting documentation
|
|
144
|
+
|
|
145
|
+
For AWS and Kubernetes investigations, SUPER AGENT can retrieve concise,
|
|
146
|
+
cited guidance from official AWS and Kubernetes documentation. It only contacts
|
|
147
|
+
allowlisted HTTPS documentation domains, uses bounded response sizes and
|
|
148
|
+
timeouts, and never sends credentials or cookies. If documentation is
|
|
149
|
+
unavailable, it reports the official source link rather than inventing advice.
|
|
150
|
+
|
|
151
|
+
Interactive terminals use a color-aware Rich interface with a thinking/progress
|
|
152
|
+
indicator. Set `NO_COLOR=1` or redirect output for plain text;
|
|
153
|
+
`--json` always emits machine-readable JSON only.
|
|
154
|
+
|
|
155
|
+
The interface uses a warm-coral `#D97757` accent for the SUPER AGENT wordmark,
|
|
156
|
+
section headings, table headers, borders, prompts, and status
|
|
157
|
+
indicator. Green, amber, red, and dim text are reserved for semantic success,
|
|
158
|
+
approval/warning, errors, and secondary information. Color is optional: plain
|
|
159
|
+
text and JSON remain complete and readable.
|
|
160
|
+
|
|
161
|
+
Normal interactive use shows only a generic thinking indicator. Pass
|
|
162
|
+
`--verbose` when you need sanitized tool names and activity diagnostics.
|
|
163
|
+
Routine intermediate tool failures are kept out of the normal UI; the final
|
|
164
|
+
answer explains only relevant evidence. Approval prompts show the requested
|
|
165
|
+
action or command, rather than internal tool JSON.
|
|
166
|
+
|
|
167
|
+
The terminal UI uses no emoji and falls back to plain text when output is
|
|
168
|
+
redirected or `NO_COLOR` is set. It deliberately uses the lightweight standard
|
|
169
|
+
input path, avoiding raw-terminal dependencies that can degrade performance in
|
|
170
|
+
minimal EC2 and container environments.
|
|
171
|
+
|
|
172
|
+
Use `/help` in an interactive session for `/status`, `/details`, `/theme`,
|
|
173
|
+
`/doctor`, `/clear`, and `/exit`. Prefix an existing allowlisted local
|
|
174
|
+
diagnostic with `!`, for example `! df -h`; this is not a general shell escape.
|
|
175
|
+
|
|
176
|
+
For in-process history, slash-command completion, and keyboard navigation,
|
|
177
|
+
install the optional UI extra. It is lazy-loaded and the normal input path is
|
|
178
|
+
used automatically when the extra or a compatible terminal is unavailable.
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
python -m pip install "super-agent-bedrock[ui]"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Audit log and fresh sessions
|
|
185
|
+
|
|
186
|
+
SUPER AGENT stores a sanitized append-only audit log named `super_agent.log`
|
|
187
|
+
in the directory where it is started. It records compact requests, outcomes,
|
|
188
|
+
and tool status, but it is never sent to Bedrock as conversation history.
|
|
189
|
+
|
|
190
|
+
On the first `0.3.4` run, an existing `ai_memory.dm` is renamed to a dated
|
|
191
|
+
`ai_memory.dm.archived-...` backup. This stops old conversations from causing
|
|
192
|
+
the model to resume a previous investigation. `/clear` clears only the current
|
|
193
|
+
in-process session; the audit log remains intact.
|
|
194
|
+
|
|
195
|
+
## SES email identities
|
|
196
|
+
|
|
197
|
+
SUPER AGENT can create an Amazon SES email identity after explicit approval.
|
|
198
|
+
That action asks AWS to send its verification email; it does not and cannot
|
|
199
|
+
bypass the mailbox verification link. Ask the assistant to check the identity
|
|
200
|
+
status after the link is used, then send email with a verified `from_email` or
|
|
201
|
+
the `EMAIL_FROM` environment variable. Datadog is not part of this package.
|
|
202
|
+
|
|
203
|
+
## EKS workload access
|
|
204
|
+
|
|
205
|
+
SUPER AGENT runs safe diagnostics directly on the host where it is started.
|
|
206
|
+
It uses SSM only for an explicitly selected different managed instance. To
|
|
207
|
+
inspect Kubernetes namespaces, pods, events, logs, and deployments, install
|
|
208
|
+
the Kubernetes extra and allow the agent to create/update local kubeconfig for
|
|
209
|
+
the chosen EKS cluster. This connects through the Kubernetes API; it does not
|
|
210
|
+
open an interactive SSH, SSM, or pod-exec session.
|
|
211
|
+
|
|
212
|
+
Raw `kubectl` and raw `aws eks update-kubeconfig` commands are blocked by the
|
|
213
|
+
deterministic JEV guard. After approved EKS connection, the agent uses typed
|
|
214
|
+
Kubernetes API tools for Services, Ingresses, and Istio/Gateway API routing
|
|
215
|
+
resources instead.
|
|
216
|
+
|
|
217
|
+
Generic AWS SDK reads are also constrained to a bundled JEV capability catalog.
|
|
218
|
+
Before an AWS request, SUPER AGENT validates the selected service, operation,
|
|
219
|
+
and input parameters against the installed botocore service model. Unsupported
|
|
220
|
+
operations and missing required parameters are rejected locally; every allowed
|
|
221
|
+
catalog operation includes an official AWS Boto3 reference URL in its
|
|
222
|
+
structured result.
|
|
223
|
+
|
|
224
|
+
## Capacity and quota assessments
|
|
225
|
+
|
|
226
|
+
Capacity and quota requests use a narrow, deterministic investigation plan.
|
|
227
|
+
SUPER AGENT calculates EC2 vCPU and memory from `DescribeInstanceTypes`, reads
|
|
228
|
+
the account's actual EC2 on-demand standard-vCPU quota from Service Quotas,
|
|
229
|
+
and reads applied EKS quotas. After an approved EKS connection it calculates
|
|
230
|
+
Kubernetes allocatable CPU, memory, pod slots, node conditions, and resource
|
|
231
|
+
limit coverage through the typed Kubernetes API.
|
|
232
|
+
|
|
233
|
+
It does not guess AWS quota defaults or infer capacity from instance-type
|
|
234
|
+
names. If a quota, Kubernetes connection, or live Metrics Server data is not
|
|
235
|
+
available, the response labels it unavailable. Normal output is limited to
|
|
236
|
+
verified failures, measured utilization at or above 80%, and unavailable data.
|
|
237
|
+
|
|
238
|
+
## EBS volumes
|
|
239
|
+
|
|
240
|
+
SUPER AGENT can list EBS volumes with size, type, encryption, attachment, and
|
|
241
|
+
attachment-time evidence. For a request such as “last usage,” it checks the
|
|
242
|
+
most recent observed `VolumeReadOps` or `VolumeWriteOps` CloudWatch data in a
|
|
243
|
+
bounded lookback period. This is reported as recent observed I/O, not as a
|
|
244
|
+
permanent “last used” timestamp, because EBS does not provide one.
|
|
245
|
+
|
|
246
|
+
## License
|
|
247
|
+
|
|
248
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# SUPER AGENT
|
|
2
|
+
|
|
3
|
+
SUPER AGENT is a conversational AWS and Kubernetes operations assistant that
|
|
4
|
+
uses the Amazon Bedrock Converse API. It can inspect resources, investigate
|
|
5
|
+
metrics and logs, and perform guarded operations after explicit approval.
|
|
6
|
+
|
|
7
|
+
## How to run
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
python -m pip install super-agent-bedrock
|
|
11
|
+
super-agent
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Ask a one-off question:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
super-agent "List EKS clusters in us-west-2"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or start an interactive session:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
super-agent --interactive
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Check this machine's AWS identity, Bedrock model access, and Kubernetes client
|
|
27
|
+
readiness before starting work:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
super-agent --preflight
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Interactive sessions run this credential-safe check at startup. Use
|
|
34
|
+
`--skip-preflight` only when you deliberately want to suppress its display;
|
|
35
|
+
it does not disable runtime safety checks. Within an interactive session, run
|
|
36
|
+
`/doctor` to repeat the check.
|
|
37
|
+
|
|
38
|
+
Choose a model or AWS Region when needed:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
super-agent --model <model-or-profile-id> --region eu-west-1 "Show EC2 instances"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Cross-account operations
|
|
45
|
+
|
|
46
|
+
Cross-account is a first-class workflow. Select the target account and SUPER
|
|
47
|
+
AGENT assumes its `CrossAccountAgentRole` by default, verifies the resulting
|
|
48
|
+
STS identity is in that exact account, and displays the target in the terminal
|
|
49
|
+
footer and audit log.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
super-agent --account-id 123456789012
|
|
53
|
+
super-agent --account-id 123456789012 --role-name Platform/CrossAccountAgentRole
|
|
54
|
+
super-agent --account-id 123456789012 --external-id your-trust-policy-value --preflight
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`--assume-role` remains available for an explicit role ARN. The source role
|
|
58
|
+
must be allowed to call `sts:AssumeRole`, and the target role's trust policy
|
|
59
|
+
must allow the source role. An account mismatch stops the session before any
|
|
60
|
+
Bedrock or infrastructure operation begins.
|
|
61
|
+
|
|
62
|
+
Inside an interactive session, switch safely without exiting:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
/account 219826436331
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
You can also type `switch account to 219826436331`. SUPER AGENT asks for
|
|
69
|
+
approval, verifies the newly assumed identity, then clears the previous
|
|
70
|
+
conversation and Kubernetes connection so evidence from two accounts cannot
|
|
71
|
+
mix.
|
|
72
|
+
|
|
73
|
+
## JEV tool safety
|
|
74
|
+
|
|
75
|
+
JEV is the local validation layer between the model and AWS. It blocks unknown
|
|
76
|
+
or sensitive APIs so a model cannot guess an invalid operation or read a secret
|
|
77
|
+
just because it is technically a “read” call. The catalog expands through
|
|
78
|
+
reviewed typed tools and validated capabilities. It includes CloudTrail event
|
|
79
|
+
lookup for “who created this?” investigations and CloudWatch Logs group
|
|
80
|
+
discovery; unsupported services are intentionally rejected with an explanation
|
|
81
|
+
rather than executed blindly.
|
|
82
|
+
|
|
83
|
+
## Development architecture
|
|
84
|
+
|
|
85
|
+
For contributors, [the architecture guide](docs/ARCHITECTURE.md) explains the
|
|
86
|
+
runtime flow, JEV boundaries, and the safe module-extraction order.
|
|
87
|
+
|
|
88
|
+
## Requirements
|
|
89
|
+
|
|
90
|
+
- Python 3.9 or later
|
|
91
|
+
- AWS credentials supplied by a standard AWS profile, IAM Identity Center,
|
|
92
|
+
environment variables, an EC2 instance profile, or an EKS web-identity role
|
|
93
|
+
- Amazon Bedrock model access and `bedrock:InvokeModel` permission for the
|
|
94
|
+
selected model and Region
|
|
95
|
+
|
|
96
|
+
Install Kubernetes support when you need Kubernetes API tools:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
python -m pip install "super-agent-bedrock[kubernetes]"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Safety
|
|
103
|
+
|
|
104
|
+
Read-only operations run without confirmation. Operations that create, change,
|
|
105
|
+
restart, scale, delete, or send commands require approval. A built-in block
|
|
106
|
+
list refuses destructive commands even when approval is supplied.
|
|
107
|
+
|
|
108
|
+
The tool does not create AWS credentials, enable Bedrock model access, or
|
|
109
|
+
change account-level permissions. Never put credentials, access keys, or
|
|
110
|
+
tokens into source code, memory files, or package configuration.
|
|
111
|
+
|
|
112
|
+
If Bedrock invocation is denied, preflight identifies the active AWS role,
|
|
113
|
+
account, model or inference profile, and Region, then explains the smallest
|
|
114
|
+
safe administrator checks. It never prints credential values. The readiness
|
|
115
|
+
probe sends a fixed one-token request without conversation history solely to
|
|
116
|
+
verify the selected model's Converse permission.
|
|
117
|
+
|
|
118
|
+
## Troubleshooting documentation
|
|
119
|
+
|
|
120
|
+
For AWS and Kubernetes investigations, SUPER AGENT can retrieve concise,
|
|
121
|
+
cited guidance from official AWS and Kubernetes documentation. It only contacts
|
|
122
|
+
allowlisted HTTPS documentation domains, uses bounded response sizes and
|
|
123
|
+
timeouts, and never sends credentials or cookies. If documentation is
|
|
124
|
+
unavailable, it reports the official source link rather than inventing advice.
|
|
125
|
+
|
|
126
|
+
Interactive terminals use a color-aware Rich interface with a thinking/progress
|
|
127
|
+
indicator. Set `NO_COLOR=1` or redirect output for plain text;
|
|
128
|
+
`--json` always emits machine-readable JSON only.
|
|
129
|
+
|
|
130
|
+
The interface uses a warm-coral `#D97757` accent for the SUPER AGENT wordmark,
|
|
131
|
+
section headings, table headers, borders, prompts, and status
|
|
132
|
+
indicator. Green, amber, red, and dim text are reserved for semantic success,
|
|
133
|
+
approval/warning, errors, and secondary information. Color is optional: plain
|
|
134
|
+
text and JSON remain complete and readable.
|
|
135
|
+
|
|
136
|
+
Normal interactive use shows only a generic thinking indicator. Pass
|
|
137
|
+
`--verbose` when you need sanitized tool names and activity diagnostics.
|
|
138
|
+
Routine intermediate tool failures are kept out of the normal UI; the final
|
|
139
|
+
answer explains only relevant evidence. Approval prompts show the requested
|
|
140
|
+
action or command, rather than internal tool JSON.
|
|
141
|
+
|
|
142
|
+
The terminal UI uses no emoji and falls back to plain text when output is
|
|
143
|
+
redirected or `NO_COLOR` is set. It deliberately uses the lightweight standard
|
|
144
|
+
input path, avoiding raw-terminal dependencies that can degrade performance in
|
|
145
|
+
minimal EC2 and container environments.
|
|
146
|
+
|
|
147
|
+
Use `/help` in an interactive session for `/status`, `/details`, `/theme`,
|
|
148
|
+
`/doctor`, `/clear`, and `/exit`. Prefix an existing allowlisted local
|
|
149
|
+
diagnostic with `!`, for example `! df -h`; this is not a general shell escape.
|
|
150
|
+
|
|
151
|
+
For in-process history, slash-command completion, and keyboard navigation,
|
|
152
|
+
install the optional UI extra. It is lazy-loaded and the normal input path is
|
|
153
|
+
used automatically when the extra or a compatible terminal is unavailable.
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
python -m pip install "super-agent-bedrock[ui]"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Audit log and fresh sessions
|
|
160
|
+
|
|
161
|
+
SUPER AGENT stores a sanitized append-only audit log named `super_agent.log`
|
|
162
|
+
in the directory where it is started. It records compact requests, outcomes,
|
|
163
|
+
and tool status, but it is never sent to Bedrock as conversation history.
|
|
164
|
+
|
|
165
|
+
On the first `0.3.4` run, an existing `ai_memory.dm` is renamed to a dated
|
|
166
|
+
`ai_memory.dm.archived-...` backup. This stops old conversations from causing
|
|
167
|
+
the model to resume a previous investigation. `/clear` clears only the current
|
|
168
|
+
in-process session; the audit log remains intact.
|
|
169
|
+
|
|
170
|
+
## SES email identities
|
|
171
|
+
|
|
172
|
+
SUPER AGENT can create an Amazon SES email identity after explicit approval.
|
|
173
|
+
That action asks AWS to send its verification email; it does not and cannot
|
|
174
|
+
bypass the mailbox verification link. Ask the assistant to check the identity
|
|
175
|
+
status after the link is used, then send email with a verified `from_email` or
|
|
176
|
+
the `EMAIL_FROM` environment variable. Datadog is not part of this package.
|
|
177
|
+
|
|
178
|
+
## EKS workload access
|
|
179
|
+
|
|
180
|
+
SUPER AGENT runs safe diagnostics directly on the host where it is started.
|
|
181
|
+
It uses SSM only for an explicitly selected different managed instance. To
|
|
182
|
+
inspect Kubernetes namespaces, pods, events, logs, and deployments, install
|
|
183
|
+
the Kubernetes extra and allow the agent to create/update local kubeconfig for
|
|
184
|
+
the chosen EKS cluster. This connects through the Kubernetes API; it does not
|
|
185
|
+
open an interactive SSH, SSM, or pod-exec session.
|
|
186
|
+
|
|
187
|
+
Raw `kubectl` and raw `aws eks update-kubeconfig` commands are blocked by the
|
|
188
|
+
deterministic JEV guard. After approved EKS connection, the agent uses typed
|
|
189
|
+
Kubernetes API tools for Services, Ingresses, and Istio/Gateway API routing
|
|
190
|
+
resources instead.
|
|
191
|
+
|
|
192
|
+
Generic AWS SDK reads are also constrained to a bundled JEV capability catalog.
|
|
193
|
+
Before an AWS request, SUPER AGENT validates the selected service, operation,
|
|
194
|
+
and input parameters against the installed botocore service model. Unsupported
|
|
195
|
+
operations and missing required parameters are rejected locally; every allowed
|
|
196
|
+
catalog operation includes an official AWS Boto3 reference URL in its
|
|
197
|
+
structured result.
|
|
198
|
+
|
|
199
|
+
## Capacity and quota assessments
|
|
200
|
+
|
|
201
|
+
Capacity and quota requests use a narrow, deterministic investigation plan.
|
|
202
|
+
SUPER AGENT calculates EC2 vCPU and memory from `DescribeInstanceTypes`, reads
|
|
203
|
+
the account's actual EC2 on-demand standard-vCPU quota from Service Quotas,
|
|
204
|
+
and reads applied EKS quotas. After an approved EKS connection it calculates
|
|
205
|
+
Kubernetes allocatable CPU, memory, pod slots, node conditions, and resource
|
|
206
|
+
limit coverage through the typed Kubernetes API.
|
|
207
|
+
|
|
208
|
+
It does not guess AWS quota defaults or infer capacity from instance-type
|
|
209
|
+
names. If a quota, Kubernetes connection, or live Metrics Server data is not
|
|
210
|
+
available, the response labels it unavailable. Normal output is limited to
|
|
211
|
+
verified failures, measured utilization at or above 80%, and unavailable data.
|
|
212
|
+
|
|
213
|
+
## EBS volumes
|
|
214
|
+
|
|
215
|
+
SUPER AGENT can list EBS volumes with size, type, encryption, attachment, and
|
|
216
|
+
attachment-time evidence. For a request such as “last usage,” it checks the
|
|
217
|
+
most recent observed `VolumeReadOps` or `VolumeWriteOps` CloudWatch data in a
|
|
218
|
+
bounded lookback period. This is reported as recent observed I/O, not as a
|
|
219
|
+
permanent “last used” timestamp, because EBS does not provide one.
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
Apache-2.0. See [LICENSE](LICENSE).
|