@aws/agentcore 1.0.0-rc.3 → 1.0.0-rc.4
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.
- package/LICENSE +175 -0
- package/README.md +92 -1224
- package/dist/assets/agent-inspector/index.js.asset +1 -1
- package/dist/assets/cdk/package.json +1 -1
- package/dist/assets/templates/agent-python-langchain/README.md +1 -1
- package/dist/assets/templates/agui-python-strands/README.md +1 -1
- package/dist/assets/templates/harness/harness.yaml +149 -81
- package/dist/main.js +354 -238
- package/package.json +9 -4
|
@@ -1,93 +1,98 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Harness configuration: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness.html
|
|
2
2
|
|
|
3
3
|
{{yaml.name}}
|
|
4
4
|
|
|
5
|
-
#
|
|
6
|
-
# systemPrompt: You are a helpful assistant.
|
|
7
|
-
|
|
8
|
-
# Model
|
|
5
|
+
# https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_HarnessModelConfiguration.html
|
|
9
6
|
{{yaml.model}}
|
|
7
|
+
{{#unless model.temperature includeZero=true}}
|
|
8
|
+
# temperature: 0.2
|
|
9
|
+
{{/unless}}
|
|
10
|
+
{{#unless model.topP includeZero=true}}
|
|
11
|
+
# topP: 0.9
|
|
12
|
+
{{/unless}}
|
|
10
13
|
{{#if modelMaxTokensExample}}
|
|
11
|
-
# Output tokens per model call, rather than across the whole invocation.
|
|
12
14
|
# maxTokens: 4096
|
|
13
15
|
{{/if}}
|
|
16
|
+
{{#if (or (eq model.provider "bedrock") (eq model.provider "open_ai"))}}
|
|
17
|
+
{{#unless model.apiFormat}}
|
|
18
|
+
{{#if (eq model.provider "bedrock")}}
|
|
19
|
+
# apiFormat: converse_stream
|
|
20
|
+
{{else}}
|
|
21
|
+
# apiFormat: responses
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{/unless}}
|
|
24
|
+
{{/if}}
|
|
25
|
+
{{#unless model.apiKeyArn}}
|
|
26
|
+
# apiKeyArn: YOUR_API_KEY_PROVIDER_ARN
|
|
27
|
+
{{/unless}}
|
|
28
|
+
|
|
29
|
+
# Edit system-prompt.md next to this file, or set inline instructions below to override it.
|
|
30
|
+
# systemPrompt: |
|
|
31
|
+
# You are a helpful assistant.
|
|
32
|
+
# Ask for clarification when a request is ambiguous.
|
|
33
|
+
|
|
34
|
+
# Remove this block or set mode to disabled to turn memory off.
|
|
35
|
+
# For existing memory, set mode to existing and add arn or name (for a memory in this project).
|
|
36
|
+
# https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_HarnessMemoryConfiguration.html
|
|
37
|
+
{{yaml.memory}}
|
|
38
|
+
{{#if (eq memory.mode "managed")}}
|
|
39
|
+
{{#if memoryExamples.strategies}}
|
|
40
|
+
# strategies: [SEMANTIC, SUMMARIZATION, USER_PREFERENCE, EPISODIC]
|
|
41
|
+
{{/if}}
|
|
42
|
+
{{#if memoryExamples.eventExpiryDuration}}
|
|
43
|
+
# eventExpiryDuration: 30 # Days.
|
|
44
|
+
{{/if}}
|
|
45
|
+
{{/if}}
|
|
14
46
|
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
# https://docs.aws.amazon.com/bedrock-agentcore/latest/
|
|
47
|
+
# Add tools alongside the harness's built-in shell and file operations.
|
|
48
|
+
# Choose a unique name for each entry.
|
|
49
|
+
# For Remote MCP, Gateway, Browser, Code Interpreter, and other tool configurations, see:
|
|
50
|
+
# https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_HarnessTool.html
|
|
19
51
|
{{#if tools.length}}
|
|
20
52
|
{{yaml.tools}}
|
|
21
53
|
{{else}}
|
|
22
54
|
# tools:
|
|
23
|
-
# - name: code_interpreter
|
|
24
|
-
# type: agentcore_code_interpreter
|
|
25
|
-
# - name: browser
|
|
26
|
-
# type: agentcore_browser
|
|
27
55
|
# - name: research
|
|
28
56
|
# type: remote_mcp
|
|
29
57
|
# config:
|
|
30
58
|
# remoteMcp:
|
|
31
59
|
# url: https://mcp.example.com/mcp
|
|
32
|
-
# - name: company_tools
|
|
33
|
-
# type: agentcore_gateway
|
|
34
|
-
# config:
|
|
35
|
-
# agentCoreGateway:
|
|
36
|
-
# gatewayArn: arn:aws:bedrock-agentcore:us-west-2:123456789012:gateway/example-1234567890
|
|
37
|
-
# outboundAuth:
|
|
38
|
-
# awsIam: {}
|
|
39
60
|
{{/if}}
|
|
40
61
|
|
|
41
|
-
#
|
|
42
|
-
#
|
|
62
|
+
# Limit which available tools the agent can use. "*" allows all available tools.
|
|
63
|
+
# Restrict with patterns such as "@builtin".
|
|
64
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-tools.html
|
|
43
65
|
{{#if yaml.allowedTools}}
|
|
44
66
|
{{yaml.allowedTools}}
|
|
45
67
|
{{else}}
|
|
46
|
-
|
|
47
|
-
# - "@builtin"
|
|
48
|
-
# - "@research/search"
|
|
68
|
+
allowedTools: ["*"]
|
|
49
69
|
{{/if}}
|
|
50
70
|
|
|
51
|
-
#
|
|
52
|
-
|
|
71
|
+
# Load skills from S3 (s3Uri), Git (gitUrl), container files (path), or bundled AWS skills (awsSkills).
|
|
72
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-skills.html
|
|
53
73
|
{{yaml.skills}}
|
|
54
|
-
{{else}}
|
|
55
|
-
# skills:
|
|
56
|
-
# - s3Uri: s3://your-skills-bucket/skills/research/
|
|
57
|
-
# - gitUrl: https://github.com/your-org/agent-skills.git
|
|
58
|
-
# path: skills/research
|
|
59
|
-
# - path: /opt/skills/research
|
|
60
|
-
{{/if}}
|
|
61
74
|
|
|
62
|
-
#
|
|
63
|
-
# https://docs.aws.amazon.com/bedrock-agentcore/latest/
|
|
64
|
-
#
|
|
65
|
-
{{yaml.
|
|
66
|
-
{{#if (eq
|
|
67
|
-
{{#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
# - SEMANTIC
|
|
73
|
-
# - SUMMARIZATION
|
|
74
|
-
{{/if}}
|
|
75
|
-
{{#if memoryExamples.eventExpiryDuration}}
|
|
76
|
-
# eventExpiryDuration: 30
|
|
77
|
-
{{/if}}
|
|
78
|
-
{{/if}}
|
|
79
|
-
{{/if}}
|
|
80
|
-
{{#if (or memoryExamples.name memoryExamples.arn)}}
|
|
81
|
-
# Existing-memory reference: project resource name or external ARN.
|
|
82
|
-
{{#if memoryExamples.name}}
|
|
83
|
-
# name: ConversationMemory
|
|
84
|
-
{{/if}}
|
|
85
|
-
{{#if memoryExamples.arn}}
|
|
86
|
-
# arn: arn:aws:bedrock-agentcore:us-west-2:123456789012:memory/example-1234567890
|
|
75
|
+
# Controls how conversation history is kept within the model's context window.
|
|
76
|
+
# https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_HarnessTruncationConfiguration.html
|
|
77
|
+
{{#if yaml.truncation}}
|
|
78
|
+
{{yaml.truncation}}
|
|
79
|
+
{{#if (eq truncation.strategy "sliding_window")}}
|
|
80
|
+
{{#unless truncation.config}}
|
|
81
|
+
# config:
|
|
82
|
+
# slidingWindow:
|
|
83
|
+
# messagesCount: 40
|
|
84
|
+
{{/unless}}
|
|
87
85
|
{{/if}}
|
|
86
|
+
{{else}}
|
|
87
|
+
truncation:
|
|
88
|
+
strategy: sliding_window
|
|
89
|
+
# config:
|
|
90
|
+
# slidingWindow:
|
|
91
|
+
# messagesCount: 40
|
|
88
92
|
{{/if}}
|
|
89
93
|
|
|
90
|
-
#
|
|
94
|
+
# Limits for one invocation, across all model calls.
|
|
95
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-operations.html#harness-limits
|
|
91
96
|
{{#if yaml.maxIterations}}
|
|
92
97
|
{{yaml.maxIterations}}
|
|
93
98
|
{{else}}
|
|
@@ -104,19 +109,18 @@
|
|
|
104
109
|
# timeoutSeconds: 300
|
|
105
110
|
{{/if}}
|
|
106
111
|
|
|
107
|
-
#
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
# Values must be strings. Put quotes around numbers and booleans.
|
|
113
|
+
# Environment values are stored in plaintext.
|
|
114
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-environment.html
|
|
115
|
+
{{#if yaml.environmentVariables}}
|
|
116
|
+
{{yaml.environmentVariables}}
|
|
110
117
|
{{else}}
|
|
111
|
-
|
|
112
|
-
# strategy: sliding_window
|
|
113
|
-
# config:
|
|
114
|
-
# slidingWindow:
|
|
115
|
-
# messagesCount: 40
|
|
118
|
+
environmentVariables: {}
|
|
116
119
|
{{/if}}
|
|
117
120
|
|
|
118
|
-
#
|
|
119
|
-
#
|
|
121
|
+
# Use a local Dockerfile or an ECR image. Omit both to use the service-provided environment.
|
|
122
|
+
# Dockerfile paths are relative to this file's directory.
|
|
123
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-environment.html#harness-custom-container
|
|
120
124
|
{{#if yaml.dockerfile}}
|
|
121
125
|
{{yaml.dockerfile}}
|
|
122
126
|
{{else}}
|
|
@@ -128,28 +132,92 @@
|
|
|
128
132
|
# containerUri: 123456789012.dkr.ecr.us-west-2.amazonaws.com/my-harness:latest
|
|
129
133
|
{{/if}}
|
|
130
134
|
|
|
131
|
-
#
|
|
132
|
-
{{#
|
|
133
|
-
|
|
135
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-security.html#harness-network-config
|
|
136
|
+
{{#unless yaml.networkConfig}}
|
|
137
|
+
# To use the VPC example below, change networkMode to VPC and replace the resource IDs.
|
|
138
|
+
{{/unless}}
|
|
139
|
+
# vpcId is required for Dockerfile builds in VPC mode.
|
|
140
|
+
{{#if yaml.networkMode}}
|
|
141
|
+
{{yaml.networkMode}}
|
|
142
|
+
{{else}}
|
|
143
|
+
networkMode: PUBLIC
|
|
144
|
+
{{/if}}
|
|
145
|
+
{{#if yaml.networkConfig}}
|
|
146
|
+
{{yaml.networkConfig}}
|
|
147
|
+
{{else}}
|
|
148
|
+
# networkConfig:
|
|
149
|
+
# vpcId: vpc-0123456789abcdef0
|
|
150
|
+
# subnets: [subnet-0123456789abcdef0]
|
|
151
|
+
# securityGroups: [sg-0123456789abcdef0]
|
|
152
|
+
{{/if}}
|
|
153
|
+
|
|
154
|
+
# Caller authentication, separate from the credentials used to call models or tools.
|
|
155
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-security.html
|
|
156
|
+
{{#unless yaml.authorizerConfiguration}}
|
|
157
|
+
# To use JWT, change authorizerType to CUSTOM_JWT and configure your identity provider below.
|
|
158
|
+
{{/unless}}
|
|
159
|
+
{{#if yaml.authorizerType}}
|
|
160
|
+
{{yaml.authorizerType}}
|
|
161
|
+
{{else}}
|
|
162
|
+
authorizerType: AWS_IAM
|
|
163
|
+
{{/if}}
|
|
164
|
+
{{#if yaml.authorizerConfiguration}}
|
|
165
|
+
{{yaml.authorizerConfiguration}}
|
|
134
166
|
{{else}}
|
|
135
|
-
#
|
|
136
|
-
#
|
|
167
|
+
# authorizerConfiguration:
|
|
168
|
+
# customJwtAuthorizer:
|
|
169
|
+
# discoveryUrl: https://id.example.com/.well-known/openid-configuration
|
|
170
|
+
# allowedAudience: [my-harness-app]
|
|
137
171
|
{{/if}}
|
|
138
172
|
|
|
139
|
-
# Deployment
|
|
173
|
+
# Deployment will create an execution role when omitted. Manage permissions yourself for a supplied role.
|
|
174
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-security.html#harness-execution-role-policy
|
|
140
175
|
{{#if yaml.executionRoleArn}}
|
|
141
176
|
{{yaml.executionRoleArn}}
|
|
142
177
|
{{else}}
|
|
143
178
|
# executionRoleArn: arn:aws:iam::123456789012:role/MyHarnessRole
|
|
144
179
|
{{/if}}
|
|
145
180
|
|
|
146
|
-
#
|
|
181
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-operations.html#harness-limits
|
|
182
|
+
{{#if yaml.lifecycleConfig}}
|
|
183
|
+
{{yaml.lifecycleConfig}}
|
|
184
|
+
{{else}}
|
|
185
|
+
# lifecycleConfig:
|
|
186
|
+
# idleRuntimeSessionTimeout: 900
|
|
187
|
+
# maxLifetime: 28800
|
|
188
|
+
{{/if}}
|
|
189
|
+
|
|
190
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-environment.html
|
|
191
|
+
{{#if yaml.sessionStoragePath}}
|
|
192
|
+
{{yaml.sessionStoragePath}}
|
|
193
|
+
{{else}}
|
|
194
|
+
# sessionStoragePath: /mnt/session
|
|
195
|
+
{{/if}}
|
|
196
|
+
|
|
197
|
+
# EFS and S3 Files mounts require VPC mode. Each entry contains an accessPointArn and mountPath.
|
|
198
|
+
# Mount paths must be under /mnt and must be unique across all filesystem types.
|
|
199
|
+
{{#if yaml.efsAccessPoints}}
|
|
200
|
+
{{yaml.efsAccessPoints}}
|
|
201
|
+
{{else}}
|
|
202
|
+
efsAccessPoints: []
|
|
203
|
+
{{/if}}
|
|
204
|
+
{{#if yaml.s3AccessPoints}}
|
|
205
|
+
{{yaml.s3AccessPoints}}
|
|
206
|
+
{{else}}
|
|
207
|
+
s3AccessPoints: []
|
|
208
|
+
{{/if}}
|
|
209
|
+
|
|
210
|
+
{{#if yaml.connections}}
|
|
211
|
+
# Grant access to existing resources and expose their connection details as environment variables.
|
|
212
|
+
# This does not add agent tools; declare those under tools.
|
|
213
|
+
{{yaml.connections}}
|
|
214
|
+
|
|
215
|
+
{{/if}}
|
|
216
|
+
# https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-operations.html
|
|
147
217
|
{{#if yaml.tags}}
|
|
148
218
|
{{yaml.tags}}
|
|
149
219
|
{{else}}
|
|
150
|
-
|
|
151
|
-
# team: support
|
|
152
|
-
# environment: development
|
|
220
|
+
tags: {}
|
|
153
221
|
{{/if}}
|
|
154
222
|
{{#each additionalSettings}}
|
|
155
223
|
|