bedrock-agentcore-starter-toolkit 0.1.9__py3-none-any.whl → 0.1.10__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/cli.py +3 -1
- bedrock_agentcore_starter_toolkit/cli/runtime/commands.py +431 -161
- bedrock_agentcore_starter_toolkit/operations/gateway/create_role.py +6 -11
- bedrock_agentcore_starter_toolkit/operations/runtime/__init__.py +4 -0
- bedrock_agentcore_starter_toolkit/operations/runtime/destroy.py +542 -0
- bedrock_agentcore_starter_toolkit/operations/runtime/invoke.py +1 -1
- bedrock_agentcore_starter_toolkit/operations/runtime/models.py +10 -0
- bedrock_agentcore_starter_toolkit/services/import_agent/scripts/base_bedrock_translate.py +2 -2
- bedrock_agentcore_starter_toolkit/services/runtime.py +34 -4
- bedrock_agentcore_starter_toolkit/utils/runtime/logs.py +6 -2
- {bedrock_agentcore_starter_toolkit-0.1.9.dist-info → bedrock_agentcore_starter_toolkit-0.1.10.dist-info}/METADATA +3 -2
- {bedrock_agentcore_starter_toolkit-0.1.9.dist-info → bedrock_agentcore_starter_toolkit-0.1.10.dist-info}/RECORD +16 -15
- {bedrock_agentcore_starter_toolkit-0.1.9.dist-info → bedrock_agentcore_starter_toolkit-0.1.10.dist-info}/WHEEL +0 -0
- {bedrock_agentcore_starter_toolkit-0.1.9.dist-info → bedrock_agentcore_starter_toolkit-0.1.10.dist-info}/entry_points.txt +0 -0
- {bedrock_agentcore_starter_toolkit-0.1.9.dist-info → bedrock_agentcore_starter_toolkit-0.1.10.dist-info}/licenses/LICENSE.txt +0 -0
- {bedrock_agentcore_starter_toolkit-0.1.9.dist-info → bedrock_agentcore_starter_toolkit-0.1.10.dist-info}/licenses/NOTICE.txt +0 -0
|
@@ -29,7 +29,6 @@ def _handle_http_response(response) -> dict:
|
|
|
29
29
|
if "text/event-stream" in response.headers.get("content-type", ""):
|
|
30
30
|
return _handle_streaming_response(response)
|
|
31
31
|
else:
|
|
32
|
-
# Check if response has content
|
|
33
32
|
if not response.content:
|
|
34
33
|
raise ValueError("Empty response from agent endpoint")
|
|
35
34
|
|
|
@@ -43,6 +42,15 @@ def _handle_aws_response(response) -> dict:
|
|
|
43
42
|
try:
|
|
44
43
|
events = []
|
|
45
44
|
for event in response.get("response", []):
|
|
45
|
+
if isinstance(event, bytes):
|
|
46
|
+
try:
|
|
47
|
+
decoded = event.decode("utf-8")
|
|
48
|
+
if decoded.startswith('"') and decoded.endswith('"'):
|
|
49
|
+
event = json.loads(decoded)
|
|
50
|
+
else:
|
|
51
|
+
event = decoded
|
|
52
|
+
except (UnicodeDecodeError, json.JSONDecodeError):
|
|
53
|
+
pass
|
|
46
54
|
events.append(event)
|
|
47
55
|
except Exception as e:
|
|
48
56
|
events = [f"Error reading EventStream: {e}"]
|
|
@@ -64,11 +72,11 @@ def _handle_streaming_response(response) -> Dict[str, Any]:
|
|
|
64
72
|
text_chunk = parsed_chunk
|
|
65
73
|
else:
|
|
66
74
|
text_chunk = json.dumps(parsed_chunk, ensure_ascii=False)
|
|
67
|
-
text_chunk += "\n"
|
|
68
|
-
console.print(text_chunk, end=""
|
|
75
|
+
text_chunk += "\n\n"
|
|
76
|
+
console.print(text_chunk, end="")
|
|
69
77
|
complete_text += text_chunk
|
|
70
78
|
except json.JSONDecodeError:
|
|
71
|
-
console.print(json_chunk
|
|
79
|
+
console.print(json_chunk)
|
|
72
80
|
continue
|
|
73
81
|
console.print()
|
|
74
82
|
return {}
|
|
@@ -375,6 +383,28 @@ class BedrockAgentCoreClient:
|
|
|
375
383
|
endpointName=endpoint_name,
|
|
376
384
|
)
|
|
377
385
|
|
|
386
|
+
def delete_agent_runtime_endpoint(self, agent_id: str, endpoint_name: str = "DEFAULT") -> Dict:
|
|
387
|
+
"""Delete agent runtime endpoint.
|
|
388
|
+
|
|
389
|
+
Args:
|
|
390
|
+
agent_id: Agent ID to delete endpoint for
|
|
391
|
+
endpoint_name: Endpoint name, defaults to "DEFAULT"
|
|
392
|
+
|
|
393
|
+
Returns:
|
|
394
|
+
Response containing the deletion status
|
|
395
|
+
"""
|
|
396
|
+
self.logger.info("Deleting agent runtime endpoint '%s' for agent ID: %s", endpoint_name, agent_id)
|
|
397
|
+
try:
|
|
398
|
+
response = self.client.delete_agent_runtime_endpoint(
|
|
399
|
+
agentRuntimeId=agent_id,
|
|
400
|
+
endpointName=endpoint_name,
|
|
401
|
+
)
|
|
402
|
+
self.logger.info("Successfully initiated deletion of endpoint '%s' for agent ID: %s", endpoint_name, agent_id)
|
|
403
|
+
return response
|
|
404
|
+
except Exception as e:
|
|
405
|
+
self.logger.error("Failed to delete endpoint '%s' for agent ID '%s': %s", endpoint_name, agent_id, str(e))
|
|
406
|
+
raise
|
|
407
|
+
|
|
378
408
|
def invoke_endpoint(
|
|
379
409
|
self,
|
|
380
410
|
agent_arn: str,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Utility functions for agent log information."""
|
|
2
2
|
|
|
3
|
+
from datetime import datetime, timezone
|
|
3
4
|
from typing import Optional, Tuple
|
|
4
5
|
|
|
5
6
|
|
|
@@ -14,8 +15,11 @@ def get_agent_log_paths(agent_id: str, endpoint_name: Optional[str] = None) -> T
|
|
|
14
15
|
Tuple of (runtime_log_group, otel_log_group)
|
|
15
16
|
"""
|
|
16
17
|
endpoint_name = endpoint_name or "DEFAULT"
|
|
17
|
-
runtime_log_group =
|
|
18
|
-
|
|
18
|
+
runtime_log_group = (
|
|
19
|
+
f"/aws/bedrock-agentcore/runtimes/{agent_id}-{endpoint_name} "
|
|
20
|
+
f'--log-stream-name-prefix "{datetime.now(timezone.utc).strftime("%Y/%m/%d")}/\\[runtime-logs]"'
|
|
21
|
+
)
|
|
22
|
+
otel_log_group = f'/aws/bedrock-agentcore/runtimes/{agent_id}-{endpoint_name} --log-stream-names "otel-rt-logs"'
|
|
19
23
|
return runtime_log_group, otel_log_group
|
|
20
24
|
|
|
21
25
|
|
|
@@ -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.10
|
|
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
|
|
@@ -38,6 +38,7 @@ Requires-Dist: questionary>=2.1.0
|
|
|
38
38
|
Requires-Dist: requests>=2.25.0
|
|
39
39
|
Requires-Dist: rich>=13.0.0
|
|
40
40
|
Requires-Dist: ruamel-yaml>=0.18.14
|
|
41
|
+
Requires-Dist: strands-agents>=1.7.1
|
|
41
42
|
Requires-Dist: toml>=0.10.2
|
|
42
43
|
Requires-Dist: typer>=0.16.0
|
|
43
44
|
Requires-Dist: typing-extensions<5.0.0,>=4.13.2
|
|
@@ -87,6 +88,7 @@ AgentCore Runtime is a secure, serverless runtime purpose-built for deploying an
|
|
|
87
88
|
## 🧠 Amazon Bedrock AgentCore Memory
|
|
88
89
|
AgentCore Memory makes it easy for developers to build context aware agents by eliminating complex memory infrastructure management while providing full control over what the AI agent remembers. Memory provides industry-leading accuracy along with support for both short-term memory for multi-turn conversations and long-term memory that can be shared across agents and sessions.
|
|
89
90
|
|
|
91
|
+
|
|
90
92
|
**[Memory Quick Start](https://aws.github.io/bedrock-agentcore-starter-toolkit/user-guide/memory/quickstart.html)**
|
|
91
93
|
|
|
92
94
|
## 🔗 Amazon Bedrock AgentCore Gateway
|
|
@@ -99,7 +101,6 @@ AgentCore Code Interpreter tool enables agents to securely execute code in isola
|
|
|
99
101
|
|
|
100
102
|
**[Code Interpreter Quick Start](https://aws.github.io/bedrock-agentcore-starter-toolkit/user-guide/builtin-tools/quickstart-code-interpreter.html)**
|
|
101
103
|
|
|
102
|
-
|
|
103
104
|
## 🌐 Amazon Bedrock AgentCore Browser
|
|
104
105
|
AgentCore Browser tool provides a fast, secure, cloud-based browser runtime to enable AI agents to interact with websites at scale. It provides enterprise-grade security, comprehensive observability features, and automatically scales— all without infrastructure management overhead.
|
|
105
106
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
bedrock_agentcore_starter_toolkit/__init__.py,sha256=tN3-JWKvxk4ZSJQJIHQ4mMsDtt8J_cDCz-drcGU9USA,120
|
|
2
2
|
bedrock_agentcore_starter_toolkit/cli/__init__.py,sha256=WuIWfHtJKD9gQA-mE49bq8OHGb0Ugt8upRGaOp6-H90,62
|
|
3
|
-
bedrock_agentcore_starter_toolkit/cli/cli.py,sha256=
|
|
3
|
+
bedrock_agentcore_starter_toolkit/cli/cli.py,sha256=QcwVMLtiTcvgW166tgOmhmI56UQJez-P7b45eujr8wc,1064
|
|
4
4
|
bedrock_agentcore_starter_toolkit/cli/common.py,sha256=R9ZRKmW9gq7u7gkTiCUOTCQTno2lXnsplnq2x0-k2v8,1311
|
|
5
5
|
bedrock_agentcore_starter_toolkit/cli/gateway/__init__.py,sha256=8IZ0kSe6Kz5s2j-SBsoc6qy04MbK85RMTQwZCiR2wmo,68
|
|
6
6
|
bedrock_agentcore_starter_toolkit/cli/gateway/commands.py,sha256=3DuXCvqXlmHU2cmjGzDruyc2Fkrpgoi158myj0vc3nA,3265
|
|
@@ -9,7 +9,7 @@ bedrock_agentcore_starter_toolkit/cli/import_agent/__init__.py,sha256=tyM3dXM3Tc
|
|
|
9
9
|
bedrock_agentcore_starter_toolkit/cli/import_agent/agent_info.py,sha256=V0fZEbV76_H3gmkA17yscyJ8UdcMAquzNqENQ9DXdHA,9477
|
|
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=
|
|
12
|
+
bedrock_agentcore_starter_toolkit/cli/runtime/commands.py,sha256=bo6SXsYPDH-X0pxBwmBASz1hS5DrkJ-Wip5JTpU-7r4,44208
|
|
13
13
|
bedrock_agentcore_starter_toolkit/cli/runtime/configuration_manager.py,sha256=5TJK80uzA1ARh263smLfthw1t5Ona3bAtdO1pE7OfNo,5808
|
|
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
|
|
@@ -19,19 +19,20 @@ bedrock_agentcore_starter_toolkit/operations/gateway/__init__.py,sha256=5Qo1GeN-
|
|
|
19
19
|
bedrock_agentcore_starter_toolkit/operations/gateway/client.py,sha256=8WP2E_u6h1-mPfz4TgNMloD6bcXfoXQDL3UCrbyhT7g,20068
|
|
20
20
|
bedrock_agentcore_starter_toolkit/operations/gateway/constants.py,sha256=0_4J6BN4VAE4-XTQhPTEACkhilRrFqu_iKiuHSm2pYk,4610
|
|
21
21
|
bedrock_agentcore_starter_toolkit/operations/gateway/create_lambda.py,sha256=MQsBJfUj26zBh7LqYWLoekHuvbAHIJE8qcXwrmJOhM0,2875
|
|
22
|
-
bedrock_agentcore_starter_toolkit/operations/gateway/create_role.py,sha256=
|
|
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/runtime/__init__.py,sha256=
|
|
24
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/__init__.py,sha256=0jRUuwSoqh4R_WqzfP4XAXngrgyFK5uH8JGXUVars6Y,793
|
|
25
25
|
bedrock_agentcore_starter_toolkit/operations/runtime/configure.py,sha256=7xjNN6fn1U2cv20W2tmHdlbSjc-RU953tnbOaH5iXPQ,9056
|
|
26
26
|
bedrock_agentcore_starter_toolkit/operations/runtime/create_role.py,sha256=o3rimy-9SDOS0r-DKHctKSS6dAVIGelhn1zUhrSeolY,15952
|
|
27
|
-
bedrock_agentcore_starter_toolkit/operations/runtime/
|
|
27
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/destroy.py,sha256=a-sAYJScn2Ut2i6NE8AC0-uLtSzjMo204P5nTiGil6M,23920
|
|
28
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/invoke.py,sha256=Wx8NFIEdDmnZDuo0JW0inS6iUQVuGQuxxYBjMHUTwvw,4560
|
|
28
29
|
bedrock_agentcore_starter_toolkit/operations/runtime/launch.py,sha256=RbQt76m1a3TZCWDuMBAP91AA4eH35nW3jk7He8Yqlf8,19260
|
|
29
|
-
bedrock_agentcore_starter_toolkit/operations/runtime/models.py,sha256=
|
|
30
|
+
bedrock_agentcore_starter_toolkit/operations/runtime/models.py,sha256=iSpD6Zc-FyS4Fu_oRzXzre4N9uYuzBMDkvZZx4MhBGE,4220
|
|
30
31
|
bedrock_agentcore_starter_toolkit/operations/runtime/status.py,sha256=tpOtzAq1S3z_7baxR_WOT8Avo3MtWKGpelVOOfb-uMA,2516
|
|
31
32
|
bedrock_agentcore_starter_toolkit/services/__init__.py,sha256=s7QtYYFCCX2ff0gZHUdDxCDI3zhUq0fPsjevZbF9xdA,66
|
|
32
33
|
bedrock_agentcore_starter_toolkit/services/codebuild.py,sha256=77aagVvjSMQxBfNmwYTO6lwE_2izXGqgc6kWp9Bf98U,13618
|
|
33
34
|
bedrock_agentcore_starter_toolkit/services/ecr.py,sha256=nW9wIZcXI6amZeLVSmM9F6awVBQP1-zrFXTozSNEDjo,2805
|
|
34
|
-
bedrock_agentcore_starter_toolkit/services/runtime.py,sha256=
|
|
35
|
+
bedrock_agentcore_starter_toolkit/services/runtime.py,sha256=YXz_1XW6yN6H1_2JNwHpkazYIMQ8bv4pBmt2M8Xawhs,19921
|
|
35
36
|
bedrock_agentcore_starter_toolkit/services/import_agent/__init__.py,sha256=ig-xanZqA3oJdRTucYz9xF9_2yi31ADRVIKFsnIw_l4,68
|
|
36
37
|
bedrock_agentcore_starter_toolkit/services/import_agent/utils.py,sha256=ErY-J0hClJbt5D-pQ99ma-1Fll35tHjqOttM-h0bKKw,15675
|
|
37
38
|
bedrock_agentcore_starter_toolkit/services/import_agent/assets/memory_manager_template.py,sha256=RKrtTxir5XxyMg6cim4CAEbguaxb4mg1Qb31pd7D_kY,7892
|
|
@@ -39,7 +40,7 @@ bedrock_agentcore_starter_toolkit/services/import_agent/assets/requirements_lang
|
|
|
39
40
|
bedrock_agentcore_starter_toolkit/services/import_agent/assets/requirements_strands.j2,sha256=ZAWzCFwdj8Mbq8aBGO3Jnxz0G8XJZPNpIsPf_2Jetfk,100
|
|
40
41
|
bedrock_agentcore_starter_toolkit/services/import_agent/assets/template_fixtures_merged.json,sha256=Xem7jS8n96QEyHBmnPAvWHM4AyTLyma7Nq9sCVHuXJA,175239
|
|
41
42
|
bedrock_agentcore_starter_toolkit/services/import_agent/scripts/__init__.py,sha256=UmhcnsfIo2P1Z9VAJ6Ua2mSkxs4BOeTxgFMcgQXQWCQ,79
|
|
42
|
-
bedrock_agentcore_starter_toolkit/services/import_agent/scripts/base_bedrock_translate.py,sha256=
|
|
43
|
+
bedrock_agentcore_starter_toolkit/services/import_agent/scripts/base_bedrock_translate.py,sha256=bgiPQAFScuiDGQW2v5Y-qDKwPY8v_GtUcrLnoqjTNM0,72721
|
|
43
44
|
bedrock_agentcore_starter_toolkit/services/import_agent/scripts/bedrock_to_langchain.py,sha256=xwoZcmZ27CfYohwSfLIgbFxa2ubiBFhvufgQEWZkmLk,14950
|
|
44
45
|
bedrock_agentcore_starter_toolkit/services/import_agent/scripts/bedrock_to_strands.py,sha256=eC3v2Ts7B_RUGl4bkUim2uFYYuZZYP9syYBlylJ2gXs,14642
|
|
45
46
|
bedrock_agentcore_starter_toolkit/utils/endpoints.py,sha256=1gIDRd1oO1fymYpiedVit7m6zl5k6N8Ns9N-2ix7ZaE,1153
|
|
@@ -47,16 +48,16 @@ bedrock_agentcore_starter_toolkit/utils/logging_config.py,sha256=NtZDyndNKCAbz7j
|
|
|
47
48
|
bedrock_agentcore_starter_toolkit/utils/runtime/config.py,sha256=qRQid59rD3zJ0d0hcBY4-8R52PNIWEIUt9iR3biuz_c,4495
|
|
48
49
|
bedrock_agentcore_starter_toolkit/utils/runtime/container.py,sha256=wGJLxwT2mhTGPxSoFb6x9lW7Tyz37YghIvSs4jBnO8A,15679
|
|
49
50
|
bedrock_agentcore_starter_toolkit/utils/runtime/entrypoint.py,sha256=d-XjEwvQOdpRHvBGLdIBCs1fgUwNwB0EL_WkcdQXwXQ,5893
|
|
50
|
-
bedrock_agentcore_starter_toolkit/utils/runtime/logs.py,sha256
|
|
51
|
+
bedrock_agentcore_starter_toolkit/utils/runtime/logs.py,sha256=-8Nipxg13VJTPuztewvZh04fy1w-pxlR_ALriFr9FIY,1265
|
|
51
52
|
bedrock_agentcore_starter_toolkit/utils/runtime/policy_template.py,sha256=CgER7YXPh0BpR6JcTcumDL_k8bhmfLSEok1sf09-31I,2054
|
|
52
53
|
bedrock_agentcore_starter_toolkit/utils/runtime/schema.py,sha256=gZ0zPvry-ZkXwqUEAy6Izz1RJvmZaXA6a2twnSdk1AY,6418
|
|
53
54
|
bedrock_agentcore_starter_toolkit/utils/runtime/templates/Dockerfile.j2,sha256=0KmVBMP3ZeCrt7dQ5cR8WTvI8ZVt_SFgHYRxn6DYMfA,1261
|
|
54
55
|
bedrock_agentcore_starter_toolkit/utils/runtime/templates/dockerignore.template,sha256=b_70sBi0MwkTuA9TqxPqFcWK7TcmpaXBJ6M2Ipox65Q,691
|
|
55
56
|
bedrock_agentcore_starter_toolkit/utils/runtime/templates/execution_role_policy.json.j2,sha256=-0AXT46IYVQr4fwueXTQ0FVXcCshZFNx7-2mViR34Co,4941
|
|
56
57
|
bedrock_agentcore_starter_toolkit/utils/runtime/templates/execution_role_trust_policy.json.j2,sha256=PPJF6Ofq70W5DUE0NlbmnZjw5RkgepPgkskxEgEG28o,473
|
|
57
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
58
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
59
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
60
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
61
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
62
|
-
bedrock_agentcore_starter_toolkit-0.1.
|
|
58
|
+
bedrock_agentcore_starter_toolkit-0.1.10.dist-info/METADATA,sha256=Jj6DyqfwRMHvN38lQ4rpB6dzheNwtFLgyLiGpXFpBIU,9744
|
|
59
|
+
bedrock_agentcore_starter_toolkit-0.1.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
60
|
+
bedrock_agentcore_starter_toolkit-0.1.10.dist-info/entry_points.txt,sha256=Tf94DkUf2Tp8P7p8MEXLxre7A7Pp_XNukteiz0wHnk8,77
|
|
61
|
+
bedrock_agentcore_starter_toolkit-0.1.10.dist-info/licenses/LICENSE.txt,sha256=nNPOMinitYdtfbhdQgsPgz1UowBznU6QVN3Xs0pSTKU,10768
|
|
62
|
+
bedrock_agentcore_starter_toolkit-0.1.10.dist-info/licenses/NOTICE.txt,sha256=rkBsg8DbKqfIoQbveqX9foR4uJPUVAokbkr02pRPilE,8674
|
|
63
|
+
bedrock_agentcore_starter_toolkit-0.1.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|