bedrock-agentcore-starter-toolkit 0.1.14__py3-none-any.whl → 0.1.15__py3-none-any.whl
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 bedrock-agentcore-starter-toolkit might be problematic. Click here for more details.
- bedrock_agentcore_starter_toolkit/cli/runtime/commands.py +33 -2
- bedrock_agentcore_starter_toolkit/cli/runtime/configuration_manager.py +127 -1
- bedrock_agentcore_starter_toolkit/operations/memory/README.md +1109 -0
- bedrock_agentcore_starter_toolkit/operations/memory/constants.py +1 -9
- bedrock_agentcore_starter_toolkit/operations/memory/manager.py +248 -57
- bedrock_agentcore_starter_toolkit/operations/memory/models/__init__.py +106 -0
- bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/__init__.py +52 -0
- bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/base.py +77 -0
- bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/custom.py +194 -0
- bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/semantic.py +35 -0
- bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/summary.py +35 -0
- bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/user_preference.py +34 -0
- bedrock_agentcore_starter_toolkit/operations/memory/strategy_validator.py +395 -0
- bedrock_agentcore_starter_toolkit/operations/runtime/configure.py +54 -0
- bedrock_agentcore_starter_toolkit/operations/runtime/destroy.py +43 -3
- bedrock_agentcore_starter_toolkit/operations/runtime/invoke.py +45 -0
- bedrock_agentcore_starter_toolkit/operations/runtime/launch.py +164 -0
- bedrock_agentcore_starter_toolkit/operations/runtime/models.py +7 -0
- bedrock_agentcore_starter_toolkit/operations/runtime/status.py +62 -0
- bedrock_agentcore_starter_toolkit/utils/runtime/container.py +4 -0
- bedrock_agentcore_starter_toolkit/utils/runtime/schema.py +27 -1
- bedrock_agentcore_starter_toolkit/utils/runtime/templates/Dockerfile.j2 +9 -2
- bedrock_agentcore_starter_toolkit/utils/runtime/templates/execution_role_policy.json.j2 +31 -0
- {bedrock_agentcore_starter_toolkit-0.1.14.dist-info → bedrock_agentcore_starter_toolkit-0.1.15.dist-info}/METADATA +1 -1
- {bedrock_agentcore_starter_toolkit-0.1.14.dist-info → bedrock_agentcore_starter_toolkit-0.1.15.dist-info}/RECORD +29 -20
- {bedrock_agentcore_starter_toolkit-0.1.14.dist-info → bedrock_agentcore_starter_toolkit-0.1.15.dist-info}/WHEEL +0 -0
- {bedrock_agentcore_starter_toolkit-0.1.14.dist-info → bedrock_agentcore_starter_toolkit-0.1.15.dist-info}/entry_points.txt +0 -0
- {bedrock_agentcore_starter_toolkit-0.1.14.dist-info → bedrock_agentcore_starter_toolkit-0.1.15.dist-info}/licenses/LICENSE.txt +0 -0
- {bedrock_agentcore_starter_toolkit-0.1.14.dist-info → bedrock_agentcore_starter_toolkit-0.1.15.dist-info}/licenses/NOTICE.txt +0 -0
|
@@ -130,6 +130,145 @@ def _ensure_execution_role(agent_config, project_config, config_path, agent_name
|
|
|
130
130
|
raise ValueError("Execution role not configured and auto-create not enabled")
|
|
131
131
|
|
|
132
132
|
|
|
133
|
+
def _ensure_memory_for_agent(
|
|
134
|
+
agent_config: BedrockAgentCoreAgentSchema,
|
|
135
|
+
project_config: BedrockAgentCoreConfigSchema,
|
|
136
|
+
config_path: Path,
|
|
137
|
+
agent_name: str,
|
|
138
|
+
) -> Optional[str]:
|
|
139
|
+
"""Ensure memory resource exists for agent. Returns memory_id or None.
|
|
140
|
+
|
|
141
|
+
This function is idempotent - it creates memory if needed or reuses existing.
|
|
142
|
+
"""
|
|
143
|
+
# If memory already exists, return it
|
|
144
|
+
if agent_config.memory and agent_config.memory.memory_id:
|
|
145
|
+
log.info("Using existing memory: %s", agent_config.memory.memory_id)
|
|
146
|
+
return agent_config.memory.memory_id
|
|
147
|
+
|
|
148
|
+
# If memory not enabled, skip
|
|
149
|
+
if not agent_config.memory or not agent_config.memory.is_enabled:
|
|
150
|
+
return None
|
|
151
|
+
|
|
152
|
+
log.info("Creating memory resource for agent: %s", agent_name)
|
|
153
|
+
try:
|
|
154
|
+
from ...operations.memory.constants import StrategyType
|
|
155
|
+
from ...operations.memory.manager import MemoryManager
|
|
156
|
+
|
|
157
|
+
memory_manager = MemoryManager(region_name=agent_config.aws.region)
|
|
158
|
+
memory_name = f"{agent_name}_mem" # Short name under 48 char limit
|
|
159
|
+
|
|
160
|
+
# Check if memory already exists
|
|
161
|
+
existing_memory = None
|
|
162
|
+
try:
|
|
163
|
+
memories = memory_manager.list_memories()
|
|
164
|
+
for m in memories:
|
|
165
|
+
if m.id.startswith(memory_name):
|
|
166
|
+
existing_memory = memory_manager.get_memory(m.id)
|
|
167
|
+
log.info("Found existing memory: %s", m.id)
|
|
168
|
+
break
|
|
169
|
+
except Exception as e:
|
|
170
|
+
log.debug("Error checking for existing memory: %s", e)
|
|
171
|
+
|
|
172
|
+
# Determine if we need to create new memory or add strategies to existing
|
|
173
|
+
if existing_memory:
|
|
174
|
+
# Check if strategies need to be added
|
|
175
|
+
existing_strategies = []
|
|
176
|
+
if hasattr(existing_memory, "strategies") and existing_memory.strategies:
|
|
177
|
+
existing_strategies = existing_memory.strategies
|
|
178
|
+
|
|
179
|
+
log.info("Existing memory has %d strategies", len(existing_strategies))
|
|
180
|
+
|
|
181
|
+
# If LTM is enabled but no strategies exist, add them
|
|
182
|
+
if agent_config.memory.has_ltm and len(existing_strategies) == 0:
|
|
183
|
+
log.info("Adding LTM strategies to existing memory...")
|
|
184
|
+
memory_manager.update_memory_strategies_and_wait(
|
|
185
|
+
memory_id=existing_memory.id,
|
|
186
|
+
add_strategies=[
|
|
187
|
+
{
|
|
188
|
+
StrategyType.USER_PREFERENCE.value: {
|
|
189
|
+
"name": "UserPreferences",
|
|
190
|
+
"namespaces": ["/users/{actorId}/preferences"],
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
StrategyType.SEMANTIC.value: {
|
|
195
|
+
"name": "SemanticFacts",
|
|
196
|
+
"namespaces": ["/users/{actorId}/facts"],
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
StrategyType.SUMMARY.value: {
|
|
201
|
+
"name": "SessionSummaries",
|
|
202
|
+
"namespaces": ["/summaries/{actorId}/{sessionId}"],
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
max_wait=30,
|
|
207
|
+
poll_interval=5,
|
|
208
|
+
)
|
|
209
|
+
memory = existing_memory
|
|
210
|
+
log.info("✅ LTM strategies added to existing memory")
|
|
211
|
+
else:
|
|
212
|
+
memory = existing_memory
|
|
213
|
+
if agent_config.memory.has_ltm and len(existing_strategies) > 0:
|
|
214
|
+
log.info("✅ Using existing memory with %d strategies", len(existing_strategies))
|
|
215
|
+
else:
|
|
216
|
+
log.info("✅ Using existing STM-only memory")
|
|
217
|
+
else:
|
|
218
|
+
# Create new memory with appropriate strategies
|
|
219
|
+
strategies = []
|
|
220
|
+
if agent_config.memory.has_ltm:
|
|
221
|
+
log.info("Creating new memory with LTM strategies...")
|
|
222
|
+
strategies = [
|
|
223
|
+
{
|
|
224
|
+
StrategyType.USER_PREFERENCE.value: {
|
|
225
|
+
"name": "UserPreferences",
|
|
226
|
+
"namespaces": ["/users/{actorId}/preferences"],
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
StrategyType.SEMANTIC.value: {
|
|
231
|
+
"name": "SemanticFacts",
|
|
232
|
+
"namespaces": ["/users/{actorId}/facts"],
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
StrategyType.SUMMARY.value: {
|
|
237
|
+
"name": "SessionSummaries",
|
|
238
|
+
"namespaces": ["/summaries/{actorId}/{sessionId}"],
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
]
|
|
242
|
+
else:
|
|
243
|
+
log.info("Creating new STM-only memory...")
|
|
244
|
+
|
|
245
|
+
# Use private method to avoid waiting
|
|
246
|
+
memory = memory_manager._create_memory(
|
|
247
|
+
name=memory_name,
|
|
248
|
+
description=f"Memory for agent {agent_name} with {'STM+LTM' if strategies else 'STM only'}",
|
|
249
|
+
strategies=strategies,
|
|
250
|
+
event_expiry_days=agent_config.memory.event_expiry_days or 30,
|
|
251
|
+
memory_execution_role_arn=None,
|
|
252
|
+
)
|
|
253
|
+
log.info("✅ New memory created: %s (provisioning in background)", memory.id)
|
|
254
|
+
|
|
255
|
+
# Save memory configuration
|
|
256
|
+
agent_config.memory.memory_id = memory.id
|
|
257
|
+
agent_config.memory.memory_arn = memory.arn
|
|
258
|
+
agent_config.memory.memory_name = memory_name
|
|
259
|
+
agent_config.memory.first_invoke_memory_check_done = False
|
|
260
|
+
|
|
261
|
+
project_config.agents[agent_config.name] = agent_config
|
|
262
|
+
save_config(project_config, config_path)
|
|
263
|
+
|
|
264
|
+
return memory.id
|
|
265
|
+
|
|
266
|
+
except Exception as e:
|
|
267
|
+
log.error("Memory creation failed: %s", str(e))
|
|
268
|
+
log.warning("Continuing without memory.")
|
|
269
|
+
return None
|
|
270
|
+
|
|
271
|
+
|
|
133
272
|
def _deploy_to_bedrock_agentcore(
|
|
134
273
|
agent_config: BedrockAgentCoreAgentSchema,
|
|
135
274
|
project_config: BedrockAgentCoreConfigSchema,
|
|
@@ -144,6 +283,16 @@ def _deploy_to_bedrock_agentcore(
|
|
|
144
283
|
"""Deploy agent to Bedrock AgentCore with retry logic for role validation."""
|
|
145
284
|
log.info("Deploying to Bedrock AgentCore...")
|
|
146
285
|
|
|
286
|
+
# Prepare environment variables
|
|
287
|
+
if env_vars is None:
|
|
288
|
+
env_vars = {}
|
|
289
|
+
|
|
290
|
+
# Add memory configuration to env_vars if it exists
|
|
291
|
+
if agent_config.memory and agent_config.memory.memory_id:
|
|
292
|
+
env_vars["BEDROCK_AGENTCORE_MEMORY_ID"] = agent_config.memory.memory_id
|
|
293
|
+
env_vars["BEDROCK_AGENTCORE_MEMORY_NAME"] = agent_config.memory.memory_name
|
|
294
|
+
log.info("Passing memory configuration to agent: %s", agent_config.memory.memory_id)
|
|
295
|
+
|
|
147
296
|
bedrock_agentcore_client = BedrockAgentCoreClient(region)
|
|
148
297
|
|
|
149
298
|
# Transform network configuration to AWS API format
|
|
@@ -277,6 +426,18 @@ def launch_bedrock_agentcore(
|
|
|
277
426
|
project_config = load_config(config_path)
|
|
278
427
|
agent_config = project_config.get_agent_config(agent_name)
|
|
279
428
|
|
|
429
|
+
if env_vars is None:
|
|
430
|
+
env_vars = {}
|
|
431
|
+
|
|
432
|
+
# Ensure memory exists for non-CodeBuild paths
|
|
433
|
+
if not use_codebuild:
|
|
434
|
+
_ensure_memory_for_agent(agent_config, project_config, config_path, agent_config.name)
|
|
435
|
+
|
|
436
|
+
# Add memory configuration to environment variables if available
|
|
437
|
+
if agent_config.memory and agent_config.memory.memory_id:
|
|
438
|
+
env_vars["BEDROCK_AGENTCORE_MEMORY_ID"] = agent_config.memory.memory_id
|
|
439
|
+
env_vars["BEDROCK_AGENTCORE_MEMORY_NAME"] = agent_config.memory.memory_name
|
|
440
|
+
|
|
280
441
|
# Handle CodeBuild deployment (but not for local mode)
|
|
281
442
|
if use_codebuild and not local:
|
|
282
443
|
return _launch_with_codebuild(
|
|
@@ -491,6 +652,9 @@ def _launch_with_codebuild(
|
|
|
491
652
|
env_vars: Optional[dict] = None,
|
|
492
653
|
) -> LaunchResult:
|
|
493
654
|
"""Launch using CodeBuild for ARM64 builds."""
|
|
655
|
+
# Create memory if configured
|
|
656
|
+
_ensure_memory_for_agent(agent_config, project_config, config_path, agent_name)
|
|
657
|
+
|
|
494
658
|
# Execute shared CodeBuild workflow with full deployment mode
|
|
495
659
|
build_id, ecr_uri, region, account_id = _execute_codebuild_workflow(
|
|
496
660
|
config_path=config_path,
|
|
@@ -21,6 +21,7 @@ class ConfigureResult(BaseModel):
|
|
|
21
21
|
execution_role: Optional[str] = Field(None, description="AWS execution role ARN")
|
|
22
22
|
ecr_repository: Optional[str] = Field(None, description="ECR repository URI")
|
|
23
23
|
auto_create_ecr: bool = Field(False, description="Whether ECR will be auto-created")
|
|
24
|
+
memory_id: Optional[str] = Field(default=None, description="Memory resource ID if created")
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
# Launch operation models
|
|
@@ -69,6 +70,12 @@ class StatusConfigInfo(BaseModel):
|
|
|
69
70
|
ecr_repository: Optional[str] = Field(None, description="ECR repository URI")
|
|
70
71
|
agent_id: Optional[str] = Field(None, description="BedrockAgentCore agent ID")
|
|
71
72
|
agent_arn: Optional[str] = Field(None, description="BedrockAgentCore agent ARN")
|
|
73
|
+
memory_id: Optional[str] = Field(None, description="Memory resource ID")
|
|
74
|
+
memory_status: Optional[str] = Field(None, description="Memory provisioning status (CREATING/ACTIVE/FAILED)")
|
|
75
|
+
memory_type: Optional[str] = Field(None, description="Memory type (STM or STM+LTM)")
|
|
76
|
+
memory_enabled: Optional[bool] = Field(None, description="Whether memory is enabled")
|
|
77
|
+
memory_strategies: Optional[List[str]] = Field(None, description="Active memory strategies")
|
|
78
|
+
memory_details: Optional[Dict[str, Any]] = Field(None, description="Detailed memory resource information")
|
|
72
79
|
|
|
73
80
|
|
|
74
81
|
class StatusResult(BaseModel):
|
|
@@ -38,6 +38,68 @@ def get_status(config_path: Path, agent_name: Optional[str] = None) -> StatusRes
|
|
|
38
38
|
agent_arn=agent_config.bedrock_agentcore.agent_arn,
|
|
39
39
|
)
|
|
40
40
|
|
|
41
|
+
if agent_config.memory and agent_config.memory.memory_id:
|
|
42
|
+
try:
|
|
43
|
+
from ...operations.memory.manager import MemoryManager
|
|
44
|
+
|
|
45
|
+
memory_manager = MemoryManager(region_name=agent_config.aws.region)
|
|
46
|
+
|
|
47
|
+
# Get full memory details
|
|
48
|
+
memory_status = memory_manager.get_memory_status(agent_config.memory.memory_id)
|
|
49
|
+
memory = memory_manager.get_memory(agent_config.memory.memory_id)
|
|
50
|
+
strategies = memory_manager.get_memory_strategies(agent_config.memory.memory_id)
|
|
51
|
+
|
|
52
|
+
# Build detailed memory info
|
|
53
|
+
memory_details = {
|
|
54
|
+
"id": memory.get("id"),
|
|
55
|
+
"name": memory.get("name"),
|
|
56
|
+
"status": memory_status,
|
|
57
|
+
"description": memory.get("description"),
|
|
58
|
+
"event_expiry_days": memory.get("eventExpiryDuration"),
|
|
59
|
+
"created_at": memory.get("createdAt"),
|
|
60
|
+
"updated_at": memory.get("updatedAt"),
|
|
61
|
+
"strategies": [],
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# Get strategy details
|
|
65
|
+
for strategy in strategies:
|
|
66
|
+
strategy_info = {
|
|
67
|
+
"id": strategy.get("strategyId"),
|
|
68
|
+
"name": strategy.get("name"),
|
|
69
|
+
"type": strategy.get("type"),
|
|
70
|
+
"status": strategy.get("status"),
|
|
71
|
+
"namespaces": strategy.get("namespaces", []),
|
|
72
|
+
}
|
|
73
|
+
memory_details["strategies"].append(strategy_info)
|
|
74
|
+
|
|
75
|
+
# Set the status info fields
|
|
76
|
+
if memory_status == "ACTIVE":
|
|
77
|
+
if strategies and len(strategies) > 0:
|
|
78
|
+
config_info.memory_type = f"STM+LTM ({len(strategies)} strategies)"
|
|
79
|
+
else:
|
|
80
|
+
config_info.memory_type = "STM only"
|
|
81
|
+
config_info.memory_enabled = True
|
|
82
|
+
elif memory_status in ["CREATING", "UPDATING"]:
|
|
83
|
+
if agent_config.memory.has_ltm:
|
|
84
|
+
config_info.memory_type = "STM+LTM (provisioning...)"
|
|
85
|
+
else:
|
|
86
|
+
config_info.memory_type = "STM (provisioning...)"
|
|
87
|
+
config_info.memory_enabled = False
|
|
88
|
+
else:
|
|
89
|
+
config_info.memory_type = f"Error ({memory_status})"
|
|
90
|
+
config_info.memory_enabled = False
|
|
91
|
+
|
|
92
|
+
config_info.memory_id = agent_config.memory.memory_id
|
|
93
|
+
config_info.memory_status = memory_status
|
|
94
|
+
|
|
95
|
+
# Add the detailed memory info to config_info
|
|
96
|
+
# You'll need to add this field to StatusConfigInfo model
|
|
97
|
+
config_info.memory_details = memory_details
|
|
98
|
+
|
|
99
|
+
except Exception as e:
|
|
100
|
+
config_info.memory_type = f"Error checking: {str(e)}"
|
|
101
|
+
config_info.memory_enabled = False
|
|
102
|
+
|
|
41
103
|
# Initialize status result
|
|
42
104
|
agent_details = None
|
|
43
105
|
endpoint_details = None
|
|
@@ -108,6 +108,8 @@ class ContainerRuntime:
|
|
|
108
108
|
aws_region: Optional[str] = None,
|
|
109
109
|
enable_observability: bool = True,
|
|
110
110
|
requirements_file: Optional[str] = None,
|
|
111
|
+
memory_id: Optional[str] = None,
|
|
112
|
+
memory_name: Optional[str] = None,
|
|
111
113
|
) -> Path:
|
|
112
114
|
"""Generate Dockerfile from template."""
|
|
113
115
|
current_platform = self._get_current_platform()
|
|
@@ -164,6 +166,8 @@ class ContainerRuntime:
|
|
|
164
166
|
"aws_region": aws_region,
|
|
165
167
|
"system_packages": [],
|
|
166
168
|
"observability_enabled": enable_observability,
|
|
169
|
+
"memory_id": memory_id,
|
|
170
|
+
"memory_name": memory_name,
|
|
167
171
|
}
|
|
168
172
|
|
|
169
173
|
dockerfile_path = output_dir / "Dockerfile"
|
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
"""Typed configuration schema for Bedrock AgentCore SDK."""
|
|
2
2
|
|
|
3
|
-
from typing import Dict, List, Optional
|
|
3
|
+
from typing import Dict, List, Literal, Optional
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel, Field, field_validator
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
class MemoryConfig(BaseModel):
|
|
9
|
+
"""Memory configuration for BedrockAgentCore."""
|
|
10
|
+
|
|
11
|
+
mode: Literal["STM_ONLY", "STM_AND_LTM"] = Field(
|
|
12
|
+
default="STM_ONLY", description="Memory mode - always has STM, optionally adds LTM"
|
|
13
|
+
)
|
|
14
|
+
memory_id: Optional[str] = Field(default=None, description="Memory resource ID")
|
|
15
|
+
memory_arn: Optional[str] = Field(default=None, description="Memory resource ARN")
|
|
16
|
+
memory_name: Optional[str] = Field(default=None, description="Memory name")
|
|
17
|
+
event_expiry_days: int = Field(default=30, description="Event expiry duration in days")
|
|
18
|
+
first_invoke_memory_check_done: bool = Field(
|
|
19
|
+
default=False, description="Whether first invoke memory check has been performed"
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def is_enabled(self) -> bool:
|
|
24
|
+
"""Check if memory is enabled (always true now)."""
|
|
25
|
+
return True
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def has_ltm(self) -> bool:
|
|
29
|
+
"""Check if LTM is enabled."""
|
|
30
|
+
return self.mode == "STM_AND_LTM"
|
|
31
|
+
|
|
32
|
+
|
|
8
33
|
class NetworkConfiguration(BaseModel):
|
|
9
34
|
"""Network configuration for BedrockAgentCore deployment."""
|
|
10
35
|
|
|
@@ -80,6 +105,7 @@ class BedrockAgentCoreAgentSchema(BaseModel):
|
|
|
80
105
|
aws: AWSConfig = Field(default_factory=AWSConfig)
|
|
81
106
|
bedrock_agentcore: BedrockAgentCoreDeploymentInfo = Field(default_factory=BedrockAgentCoreDeploymentInfo)
|
|
82
107
|
codebuild: CodeBuildConfig = Field(default_factory=CodeBuildConfig)
|
|
108
|
+
memory: MemoryConfig = Field(default_factory=MemoryConfig)
|
|
83
109
|
authorizer_configuration: Optional[dict] = Field(default=None, description="JWT authorizer configuration")
|
|
84
110
|
request_header_configuration: Optional[dict] = Field(default=None, description="Request header configuration")
|
|
85
111
|
oauth_configuration: Optional[dict] = Field(default=None, description="Oauth configuration")
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
FROM ghcr.io/astral-sh/uv:python{{ python_version }}-bookworm-slim
|
|
2
2
|
WORKDIR /app
|
|
3
3
|
|
|
4
|
-
#
|
|
5
|
-
ENV UV_SYSTEM_PYTHON=1
|
|
4
|
+
# All environment variables in one layer
|
|
5
|
+
ENV UV_SYSTEM_PYTHON=1 \
|
|
6
|
+
UV_COMPILE_BYTECODE=1 \
|
|
7
|
+
PYTHONUNBUFFERED=1 \
|
|
8
|
+
DOCKER_CONTAINER=1{% if aws_region %} \
|
|
9
|
+
AWS_REGION={{ aws_region }} \
|
|
10
|
+
AWS_DEFAULT_REGION={{ aws_region }}{% endif %}{% if memory_id %} \
|
|
11
|
+
BEDROCK_AGENTCORE_MEMORY_ID={{ memory_id }}{% endif %}{% if memory_name %} \
|
|
12
|
+
BEDROCK_AGENTCORE_MEMORY_NAME={{ memory_name }}{% endif %}
|
|
6
13
|
|
|
7
14
|
{% if dependencies_file %}
|
|
8
15
|
{% if dependencies_install_path %}
|
|
@@ -120,6 +120,16 @@
|
|
|
120
120
|
"arn:aws:bedrock-agentcore:{{ region }}:{{ account_id }}:workload-identity-directory/default/workload-identity/{{ agent_name }}-*"
|
|
121
121
|
]
|
|
122
122
|
},
|
|
123
|
+
{
|
|
124
|
+
"Sid": "BedrockAgentCoreIdentityGetCredentialProviderClientSecret",
|
|
125
|
+
"Effect": "Allow",
|
|
126
|
+
"Action": [
|
|
127
|
+
"secretsmanager:GetSecretValue"
|
|
128
|
+
],
|
|
129
|
+
"Resource": [
|
|
130
|
+
"arn:aws:secretsmanager:{{ region }}:{{ account_id }}:secret:bedrock-agentcore-identity!default/oauth2/*"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
123
133
|
{
|
|
124
134
|
"Sid": "BedrockAgentCoreIdentityGetResourceOauth2Token",
|
|
125
135
|
"Effect": "Allow",
|
|
@@ -156,8 +166,29 @@
|
|
|
156
166
|
],
|
|
157
167
|
"Resource": [
|
|
158
168
|
"arn:aws:bedrock:*::foundation-model/*",
|
|
169
|
+
"arn:aws:bedrock:*:*:inference-profile/*",
|
|
159
170
|
"arn:aws:bedrock:{{ region }}:{{ account_id }}:*"
|
|
160
171
|
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"Sid": "BedrockAgentCoreCodeInterpreter",
|
|
175
|
+
"Effect": "Allow",
|
|
176
|
+
"Action": [
|
|
177
|
+
"bedrock-agentcore:CreateCodeInterpreter",
|
|
178
|
+
"bedrock-agentcore:StartCodeInterpreterSession",
|
|
179
|
+
"bedrock-agentcore:InvokeCodeInterpreter",
|
|
180
|
+
"bedrock-agentcore:StopCodeInterpreterSession",
|
|
181
|
+
"bedrock-agentcore:DeleteCodeInterpreter",
|
|
182
|
+
"bedrock-agentcore:ListCodeInterpreters",
|
|
183
|
+
"bedrock-agentcore:GetCodeInterpreter",
|
|
184
|
+
"bedrock-agentcore:GetCodeInterpreterSession",
|
|
185
|
+
"bedrock-agentcore:ListCodeInterpreterSessions"
|
|
186
|
+
],
|
|
187
|
+
"Resource": [
|
|
188
|
+
"arn:aws:bedrock-agentcore:{{ region }}:aws:code-interpreter/*",
|
|
189
|
+
"arn:aws:bedrock-agentcore:{{ region }}:{{ account_id }}:code-interpreter/*",
|
|
190
|
+
"arn:aws:bedrock-agentcore:{{ region }}:{{ account_id }}:code-interpreter-custom/*"
|
|
191
|
+
]
|
|
161
192
|
}
|
|
162
193
|
]
|
|
163
194
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bedrock-agentcore-starter-toolkit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.15
|
|
4
4
|
Summary: A starter toolkit for using Bedrock AgentCore
|
|
5
5
|
Project-URL: Homepage, https://github.com/aws/bedrock-agentcore-starter-toolkit
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/aws/bedrock-agentcore-starter-toolkit/issues
|
|
@@ -9,8 +9,8 @@ bedrock_agentcore_starter_toolkit/cli/import_agent/__init__.py,sha256=tyM3dXM3Tc
|
|
|
9
9
|
bedrock_agentcore_starter_toolkit/cli/import_agent/agent_info.py,sha256=CcPXbKNnI9fc7NyFmZBjB3PkB0wAz2Q_kBGoUVcnngA,9736
|
|
10
10
|
bedrock_agentcore_starter_toolkit/cli/import_agent/commands.py,sha256=vpA66fGwKf6cxBelT3Yb_Af5Ow3AMquGLIDe-tBLjmc,22419
|
|
11
11
|
bedrock_agentcore_starter_toolkit/cli/runtime/__init__.py,sha256=0zKPPoYThoDIr3DZhIQJavq5nVTKRsgcE1s9--wx118,60
|
|
12
|
-
bedrock_agentcore_starter_toolkit/cli/runtime/commands.py,sha256=
|
|
13
|
-
bedrock_agentcore_starter_toolkit/cli/runtime/configuration_manager.py,sha256=
|
|
12
|
+
bedrock_agentcore_starter_toolkit/cli/runtime/commands.py,sha256=0k86wtUZmSPZA4w6jpmMRYjKpSU0XosWljkVwWpt4yc,51234
|
|
13
|
+
bedrock_agentcore_starter_toolkit/cli/runtime/configuration_manager.py,sha256=72UVvnzD3aqaOBNhIMMHjNN5-mgR2oUnnWyA33oFoLM,14602
|
|
14
14
|
bedrock_agentcore_starter_toolkit/notebook/__init__.py,sha256=wH1ZzIVKsKT_P0qX2kIIoyVxeHj8K40odfR1YI3McHw,129
|
|
15
15
|
bedrock_agentcore_starter_toolkit/notebook/runtime/__init__.py,sha256=DoGfB_uGFLANJVE9rSZtTH3ymw76WBWmD9vORvBIdXs,66
|
|
16
16
|
bedrock_agentcore_starter_toolkit/notebook/runtime/bedrock_agentcore.py,sha256=ywtwvcVGX4l7cmsLgkgw7KeL3Fx1HfRCE3dIuds7CZk,15544
|
|
@@ -21,21 +21,30 @@ bedrock_agentcore_starter_toolkit/operations/gateway/constants.py,sha256=0_4J6BN
|
|
|
21
21
|
bedrock_agentcore_starter_toolkit/operations/gateway/create_lambda.py,sha256=MQsBJfUj26zBh7LqYWLoekHuvbAHIJE8qcXwrmJOhM0,2875
|
|
22
22
|
bedrock_agentcore_starter_toolkit/operations/gateway/create_role.py,sha256=Oma9s6K4T9EFgwPAUDungDL9fGa3W0LsHBknIXUmSpI,4474
|
|
23
23
|
bedrock_agentcore_starter_toolkit/operations/gateway/exceptions.py,sha256=WjsrE7lT2708CJniM_ISMzkfNX4IUteGgvOxleD9JZY,272
|
|
24
|
+
bedrock_agentcore_starter_toolkit/operations/memory/README.md,sha256=ruf0ljBArKPe_C_DFQr0cxmXiUpagkfkGfAfa8qvd1k,31213
|
|
24
25
|
bedrock_agentcore_starter_toolkit/operations/memory/__init__.py,sha256=PAj25QAlnlvjaQIgfIpfxXXVXu5BTOXy-xDMDh6_HIc,59
|
|
25
|
-
bedrock_agentcore_starter_toolkit/operations/memory/constants.py,sha256=
|
|
26
|
-
bedrock_agentcore_starter_toolkit/operations/memory/manager.py,sha256=
|
|
26
|
+
bedrock_agentcore_starter_toolkit/operations/memory/constants.py,sha256=0HWpxJZXmnmekIEW5TJjn9KmEqVi_REJzUN1l68ohYQ,3226
|
|
27
|
+
bedrock_agentcore_starter_toolkit/operations/memory/manager.py,sha256=EwwNInqlIU3_d3dIphzp5ylNEEWISDduhlmjHkXrioA,44514
|
|
28
|
+
bedrock_agentcore_starter_toolkit/operations/memory/strategy_validator.py,sha256=loMZj7BBvyDjaFfLkpfEaOdbqi_zw2pL2sZChze-Jj4,17972
|
|
27
29
|
bedrock_agentcore_starter_toolkit/operations/memory/models/DictWrapper.py,sha256=GtPnR2NoZ9BXZX4fFYupG97T-YEet2NrBFlaDZIS-gM,1693
|
|
28
30
|
bedrock_agentcore_starter_toolkit/operations/memory/models/Memory.py,sha256=As1b9al57zlYWUAHcwIuHjL-6QAsfH_zhxD8xU9gh3I,424
|
|
29
31
|
bedrock_agentcore_starter_toolkit/operations/memory/models/MemoryStrategy.py,sha256=CnVfWqrSWefSxK5Oh1jllZRr1_JTnUvROLuuqTVVlWM,478
|
|
30
32
|
bedrock_agentcore_starter_toolkit/operations/memory/models/MemorySummary.py,sha256=H5Itj_R3XKaUHJk4_8N_ViAfwkI-9wDhBrmOQq570Sw,469
|
|
33
|
+
bedrock_agentcore_starter_toolkit/operations/memory/models/__init__.py,sha256=zyBO5bICw6otL528wNwkNl1BJ8BLyW0BfoVyD5hepbQ,2997
|
|
34
|
+
bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/__init__.py,sha256=rn9PQKaNkxQrSSWJ_QLST9XjAkcL8rSyWg1w8kvLf7I,1617
|
|
35
|
+
bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/base.py,sha256=9CWKNBBe3yI3xtdMhN1K8z9_0NWIsypkuwiQDi_Fzls,2625
|
|
36
|
+
bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/custom.py,sha256=6PSRoY2DTMca1Lb40b9YC5nCRZblkFVarvTP3qRDuXU,7544
|
|
37
|
+
bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/semantic.py,sha256=Dp5L_zSojst8YSWRDMolFIbfQ72vqEeFlK9sPJKQ_I4,1073
|
|
38
|
+
bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/summary.py,sha256=X0sVh-6Hw9PPnpPQucG_M7gVyXUiElZInFXBN8WDFUQ,1015
|
|
39
|
+
bedrock_agentcore_starter_toolkit/operations/memory/models/strategies/user_preference.py,sha256=JJPAzt_Shix5a-RJEf7xOEzN5kxtX3dpP8xoMvry61U,996
|
|
31
40
|
bedrock_agentcore_starter_toolkit/operations/runtime/__init__.py,sha256=0jRUuwSoqh4R_WqzfP4XAXngrgyFK5uH8JGXUVars6Y,793
|
|
32
|
-
bedrock_agentcore_starter_toolkit/operations/runtime/configure.py,sha256=
|
|
41
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/configure.py,sha256=IOvuxMRkzQ_kPfHMvcRURoUn1tvLn13Xd0QgO1x6Kw0,12806
|
|
33
42
|
bedrock_agentcore_starter_toolkit/operations/runtime/create_role.py,sha256=1-b_wBvkOXNh-HJsxATwHfXQqj0dpdETds0FNSTY0BE,16116
|
|
34
|
-
bedrock_agentcore_starter_toolkit/operations/runtime/destroy.py,sha256=
|
|
35
|
-
bedrock_agentcore_starter_toolkit/operations/runtime/invoke.py,sha256=
|
|
36
|
-
bedrock_agentcore_starter_toolkit/operations/runtime/launch.py,sha256=
|
|
37
|
-
bedrock_agentcore_starter_toolkit/operations/runtime/models.py,sha256=
|
|
38
|
-
bedrock_agentcore_starter_toolkit/operations/runtime/status.py,sha256=
|
|
43
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/destroy.py,sha256=w80NppiAFEQefrQpBoF4YBL2pCreKM_TFNYG68irdYs,25147
|
|
44
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/invoke.py,sha256=49bfVSGICisXlOiqtFc6vUfd24z3ibQxPPeZy1QMoWw,6764
|
|
45
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/launch.py,sha256=k4wVd7_Li8ZpuZgNOauVWjwQ_sRft0OuF9Db89fLC1o,27046
|
|
46
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/models.py,sha256=TdUS-O1crCGmigKb_N3WaLBeubsuFiUczyZktzcAHjY,4894
|
|
47
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/status.py,sha256=4lK-zp29rZhdEJpOoRKqRAjXpEGEMdsb-MBTQQHoJiM,5267
|
|
39
48
|
bedrock_agentcore_starter_toolkit/services/__init__.py,sha256=s7QtYYFCCX2ff0gZHUdDxCDI3zhUq0fPsjevZbF9xdA,66
|
|
40
49
|
bedrock_agentcore_starter_toolkit/services/codebuild.py,sha256=-ys84zixz2Y4g3kATnITrQ5cjREU_aZjjgMc3D_giFU,14311
|
|
41
50
|
bedrock_agentcore_starter_toolkit/services/ecr.py,sha256=nW9wIZcXI6amZeLVSmM9F6awVBQP1-zrFXTozSNEDjo,2805
|
|
@@ -54,18 +63,18 @@ bedrock_agentcore_starter_toolkit/services/import_agent/scripts/bedrock_to_stran
|
|
|
54
63
|
bedrock_agentcore_starter_toolkit/utils/endpoints.py,sha256=1gIDRd1oO1fymYpiedVit7m6zl5k6N8Ns9N-2ix7ZaE,1153
|
|
55
64
|
bedrock_agentcore_starter_toolkit/utils/logging_config.py,sha256=NtZDyndNKCAbz7jZ0leb13bb3UmjjRUTSVwI8MMlOfw,2191
|
|
56
65
|
bedrock_agentcore_starter_toolkit/utils/runtime/config.py,sha256=qRQid59rD3zJ0d0hcBY4-8R52PNIWEIUt9iR3biuz_c,4495
|
|
57
|
-
bedrock_agentcore_starter_toolkit/utils/runtime/container.py,sha256=
|
|
66
|
+
bedrock_agentcore_starter_toolkit/utils/runtime/container.py,sha256=vrwIIoDCJ_rLLGbJLbLRhjlBzjdVBnR3I0HjuByJQX4,15839
|
|
58
67
|
bedrock_agentcore_starter_toolkit/utils/runtime/entrypoint.py,sha256=d-XjEwvQOdpRHvBGLdIBCs1fgUwNwB0EL_WkcdQXwXQ,5893
|
|
59
68
|
bedrock_agentcore_starter_toolkit/utils/runtime/logs.py,sha256=ZZ9PD4QO0BSms5KphhUb3-6-IPTkmwkY-Zn2AWM9Aew,1601
|
|
60
69
|
bedrock_agentcore_starter_toolkit/utils/runtime/policy_template.py,sha256=CgER7YXPh0BpR6JcTcumDL_k8bhmfLSEok1sf09-31I,2054
|
|
61
|
-
bedrock_agentcore_starter_toolkit/utils/runtime/schema.py,sha256=
|
|
62
|
-
bedrock_agentcore_starter_toolkit/utils/runtime/templates/Dockerfile.j2,sha256=
|
|
70
|
+
bedrock_agentcore_starter_toolkit/utils/runtime/schema.py,sha256=19YP2yd7g5-JdTz-S93iXsrubKo9c6VYpDDtgrh8luU,7590
|
|
71
|
+
bedrock_agentcore_starter_toolkit/utils/runtime/templates/Dockerfile.j2,sha256=fnnw8DsRcda2ZQDvLxAz1RYTml_IMG5q0d0iKn3DB1I,1595
|
|
63
72
|
bedrock_agentcore_starter_toolkit/utils/runtime/templates/dockerignore.template,sha256=b_70sBi0MwkTuA9TqxPqFcWK7TcmpaXBJ6M2Ipox65Q,691
|
|
64
|
-
bedrock_agentcore_starter_toolkit/utils/runtime/templates/execution_role_policy.json.j2,sha256
|
|
73
|
+
bedrock_agentcore_starter_toolkit/utils/runtime/templates/execution_role_policy.json.j2,sha256=hsYLCgaWMfXuwva90yb1DVEO_HUkIjHHNcPKb60E18k,6180
|
|
65
74
|
bedrock_agentcore_starter_toolkit/utils/runtime/templates/execution_role_trust_policy.json.j2,sha256=PPJF6Ofq70W5DUE0NlbmnZjw5RkgepPgkskxEgEG28o,473
|
|
66
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
67
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
68
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
69
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
70
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
71
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
75
|
+
bedrock_agentcore_starter_toolkit-0.1.15.dist-info/METADATA,sha256=nBSdXlWL9yqQKDkEGlfUXBRL5tUz3wnqjpHlqygOb70,9999
|
|
76
|
+
bedrock_agentcore_starter_toolkit-0.1.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
77
|
+
bedrock_agentcore_starter_toolkit-0.1.15.dist-info/entry_points.txt,sha256=Tf94DkUf2Tp8P7p8MEXLxre7A7Pp_XNukteiz0wHnk8,77
|
|
78
|
+
bedrock_agentcore_starter_toolkit-0.1.15.dist-info/licenses/LICENSE.txt,sha256=nNPOMinitYdtfbhdQgsPgz1UowBznU6QVN3Xs0pSTKU,10768
|
|
79
|
+
bedrock_agentcore_starter_toolkit-0.1.15.dist-info/licenses/NOTICE.txt,sha256=rkBsg8DbKqfIoQbveqX9foR4uJPUVAokbkr02pRPilE,8674
|
|
80
|
+
bedrock_agentcore_starter_toolkit-0.1.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|