bedrock-agentcore 0.0.1 → 0.1.1
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 +202 -0
- package/README.md +151 -9
- package/dist/src/tools/browser/client.d.ts +125 -0
- package/dist/src/tools/browser/client.d.ts.map +1 -0
- package/dist/src/tools/browser/client.js +320 -0
- package/dist/src/tools/browser/client.js.map +1 -0
- package/dist/src/tools/browser/index.d.ts +4 -0
- package/dist/src/tools/browser/index.d.ts.map +1 -0
- package/dist/src/tools/browser/index.js +3 -0
- package/dist/src/tools/browser/index.js.map +1 -0
- package/dist/src/tools/browser/integrations/playwright/client.d.ts +147 -0
- package/dist/src/tools/browser/integrations/playwright/client.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/playwright/client.js +324 -0
- package/dist/src/tools/browser/integrations/playwright/client.js.map +1 -0
- package/dist/src/tools/browser/integrations/playwright/index.d.ts +20 -0
- package/dist/src/tools/browser/integrations/playwright/index.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/playwright/index.js +19 -0
- package/dist/src/tools/browser/integrations/playwright/index.js.map +1 -0
- package/dist/src/tools/browser/integrations/playwright/types.d.ts +169 -0
- package/dist/src/tools/browser/integrations/playwright/types.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/playwright/types.js +2 -0
- package/dist/src/tools/browser/integrations/playwright/types.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/click-tool.d.ts +18 -0
- package/dist/src/tools/browser/integrations/vercel-ai/click-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/click-tool.js +31 -0
- package/dist/src/tools/browser/integrations/vercel-ai/click-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/evaluate-tool.d.ts +18 -0
- package/dist/src/tools/browser/integrations/vercel-ai/evaluate-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/evaluate-tool.js +32 -0
- package/dist/src/tools/browser/integrations/vercel-ai/evaluate-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/get-html-tool.d.ts +17 -0
- package/dist/src/tools/browser/integrations/vercel-ai/get-html-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/get-html-tool.js +30 -0
- package/dist/src/tools/browser/integrations/vercel-ai/get-html-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/get-text-tool.d.ts +17 -0
- package/dist/src/tools/browser/integrations/vercel-ai/get-text-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/get-text-tool.js +30 -0
- package/dist/src/tools/browser/integrations/vercel-ai/get-text-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/index.d.ts +19 -0
- package/dist/src/tools/browser/integrations/vercel-ai/index.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/index.js +19 -0
- package/dist/src/tools/browser/integrations/vercel-ai/index.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/navigate-tool.d.ts +19 -0
- package/dist/src/tools/browser/integrations/vercel-ai/navigate-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/navigate-tool.js +39 -0
- package/dist/src/tools/browser/integrations/vercel-ai/navigate-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/screenshot-tool.d.ts +22 -0
- package/dist/src/tools/browser/integrations/vercel-ai/screenshot-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/screenshot-tool.js +44 -0
- package/dist/src/tools/browser/integrations/vercel-ai/screenshot-tool.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/tools.d.ts +123 -0
- package/dist/src/tools/browser/integrations/vercel-ai/tools.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/tools.js +145 -0
- package/dist/src/tools/browser/integrations/vercel-ai/tools.js.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/type-tool.d.ts +20 -0
- package/dist/src/tools/browser/integrations/vercel-ai/type-tool.d.ts.map +1 -0
- package/dist/src/tools/browser/integrations/vercel-ai/type-tool.js +35 -0
- package/dist/src/tools/browser/integrations/vercel-ai/type-tool.js.map +1 -0
- package/dist/src/tools/browser/types.d.ts +336 -0
- package/dist/src/tools/browser/types.d.ts.map +1 -0
- package/dist/src/tools/browser/types.js +17 -0
- package/dist/src/tools/browser/types.js.map +1 -0
- package/dist/src/tools/code-interpreter/client.d.ts +212 -0
- package/dist/src/tools/code-interpreter/client.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/client.js +512 -0
- package/dist/src/tools/code-interpreter/client.js.map +1 -0
- package/dist/src/tools/code-interpreter/index.d.ts +4 -0
- package/dist/src/tools/code-interpreter/index.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/index.js +5 -0
- package/dist/src/tools/code-interpreter/index.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-code-tool.d.ts +27 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-code-tool.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-code-tool.js +46 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-code-tool.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-command-tool.d.ts +26 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-command-tool.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-command-tool.js +41 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/execute-command-tool.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/file-operations-tool.d.ts +32 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/file-operations-tool.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/file-operations-tool.js +77 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/file-operations-tool.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/index.d.ts +26 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/index.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/index.js +26 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/index.js.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/tools.d.ts +94 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/tools.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/tools.js +112 -0
- package/dist/src/tools/code-interpreter/integrations/vercel-ai/tools.js.map +1 -0
- package/dist/src/tools/code-interpreter/types.d.ts +473 -0
- package/dist/src/tools/code-interpreter/types.d.ts.map +1 -0
- package/dist/src/tools/code-interpreter/types.js +52 -0
- package/dist/src/tools/code-interpreter/types.js.map +1 -0
- package/package.json +99 -12
- package/index.js +0 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,14 +1,156 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<div>
|
|
3
|
+
<a href="https://aws.amazon.com/bedrock/agentcore/">
|
|
4
|
+
<img width="150" height="150" alt="image" src="https://github.com/user-attachments/assets/b8b9456d-c9e2-45e1-ac5b-760f21f1ac18" />
|
|
5
|
+
</a>
|
|
6
|
+
</div>
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
<h1>
|
|
9
|
+
Bedrock AgentCore SDK
|
|
10
|
+
</h1>
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
<h2>
|
|
13
|
+
Deploy your local AI agent to Bedrock AgentCore with zero infrastructure
|
|
14
|
+
</h2>
|
|
6
15
|
|
|
7
|
-
|
|
16
|
+
<div align="center">
|
|
17
|
+
<a href="https://github.com/aws/bedrock-agentcore-sdk-typescript/graphs/commit-activity"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/aws/bedrock-agentcore-sdk-typescript"/></a>
|
|
18
|
+
<a href="https://github.com/aws/bedrock-agentcore-sdk-typescript/issues"><img alt="GitHub open issues" src="https://img.shields.io/github/issues/aws/bedrock-agentcore-sdk-typescript"/></a>
|
|
19
|
+
<a href="https://github.com/aws/bedrock-agentcore-sdk-typescript/pulls"><img alt="GitHub open pull requests" src="https://img.shields.io/github/issues-pr/aws/bedrock-agentcore-sdk-typescript"/></a>
|
|
20
|
+
<a href="https://github.com/aws/bedrock-agentcore-sdk-typescript/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/aws/bedrock-agentcore-sdk-typescript"/></a>
|
|
21
|
+
<a href="https://www.npmjs.com/package/bedrock-agentcore"><img alt="npm version" src="https://img.shields.io/npm/v/bedrock-agentcore"/></a>
|
|
22
|
+
<a href="https://nodejs.org"><img alt="Node.js versions" src="https://img.shields.io/node/v/bedrock-agentcore"/></a>
|
|
23
|
+
</div>
|
|
8
24
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
<p>
|
|
26
|
+
<a href="https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/what-is-bedrock-agentcore.html">Documentation</a>
|
|
27
|
+
◆ <a href="https://github.com/awslabs/amazon-bedrock-agentcore-samples">Samples</a>
|
|
28
|
+
◆ <a href="https://discord.gg/bedrockagentcore-preview">Discord</a>
|
|
29
|
+
◆ <a href="https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agentcore-control.html">AWS Boto3 SDK</a>
|
|
30
|
+
◆ <a href="https://github.com/aws/bedrock-agentcore-sdk-python">Python SDK</a>
|
|
31
|
+
◆ <a href="https://github.com/aws/bedrock-agentcore-sdk-typescript">TypeScript SDK</a>
|
|
32
|
+
◆ <a href="https://github.com/aws/bedrock-agentcore-starter-toolkit">Starter Toolkit</a>
|
|
13
33
|
|
|
14
|
-
|
|
34
|
+
</p>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
## Overview
|
|
38
|
+
Amazon Bedrock AgentCore enables you to deploy and operate highly effective agents securely, at scale using any framework and model. With Amazon Bedrock AgentCore, developers can accelerate AI agents into production with the scale, reliability, and security, critical to real-world deployment. AgentCore provides tools and capabilities to make agents more effective and capable, purpose-built infrastructure to securely scale agents, and controls to operate trustworthy agents. Amazon Bedrock AgentCore services are composable and work with popular open-source frameworks and any model, so you don’t have to choose between open-source flexibility and enterprise-grade security and reliability.
|
|
39
|
+
|
|
40
|
+
**What you get with Bedrock AgentCore:**
|
|
41
|
+
- ✅ **Keep your agent logic** - Works with Strands, LangGraph, CrewAI, Autogen, custom frameworks
|
|
42
|
+
- ✅ **Zero infrastructure management** - No servers, containers, or scaling concerns
|
|
43
|
+
- ✅ **Enterprise-grade platform** - Built-in auth, memory, observability, security
|
|
44
|
+
- ✅ **Production-ready deployment** - Reliable, scalable, compliant hosting
|
|
45
|
+
|
|
46
|
+
## Amazon Bedrock AgentCore services
|
|
47
|
+
- 🚀 **Runtime** - Secure and session isolated compute: **[Runtime Quick Start](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started-toolkit.html)**
|
|
48
|
+
- 🧠 **Memory** - Persistent knowledge across sessions: **[Memory Quick Start](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory-get-started.html)**
|
|
49
|
+
- 🔗 **Gateway** - Transform APIs into MCP tools: **[Gateway Quick Start](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway-quick-start.html)**
|
|
50
|
+
- 💻 **Code Interpreter** - Secure sandboxed execution: **[Code Interpreter Quick Start](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/code-interpreter-getting-started.html)**
|
|
51
|
+
- 🌐 **Browser** - Cloud-based web automation: **[Browser Quick Start](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/browser-onboarding.html)**
|
|
52
|
+
- 📊 **Observability** - OpenTelemetry tracing: **[Observability Quick Start](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability-get-started.html)**
|
|
53
|
+
- 🔐 **Identity** - AWS & third-party auth: **[Identity Quick Start](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity-getting-started-cognito.html)**
|
|
54
|
+
|
|
55
|
+
## ⚠️ TypeScript SDK Scope
|
|
56
|
+
|
|
57
|
+
This SDK currently provides Code Interpreter and Browser tools. Additional service integrations are on the roadmap.
|
|
58
|
+
|
|
59
|
+
## AgentCore Tools
|
|
60
|
+
|
|
61
|
+
### 💻 Code Interpreter
|
|
62
|
+
Execute Python, JavaScript, or TypeScript in a secure AWS-managed sandbox:
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
// Core client (framework-agnostic)
|
|
66
|
+
import { CodeInterpreterClient } from 'bedrock-agentcore/code-interpreter'
|
|
67
|
+
// Methods: startSession, stopSession, executeCode, writeFiles, readFiles,
|
|
68
|
+
// listFiles, deleteFiles, executeCommand
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 🌐 Browser
|
|
72
|
+
Automate web browsing with cloud-based browser automation (compatible with Playwright, Puppeteer, and other browser automation SDKs):
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
// Playwright client (framework-agnostic)
|
|
76
|
+
import { PlaywrightBrowser } from 'bedrock-agentcore/browser/playwright'
|
|
77
|
+
// Methods: startSession, stopSession, navigate, click, fill, type, getText,
|
|
78
|
+
// getHtml, screenshot, evaluate, waitForSelector, back, forward
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## AgentCore Tools with Vercel AI SDK
|
|
82
|
+
|
|
83
|
+
Integrate Code Interpreter and Browser capabilities into your AI agents using the Vercel AI SDK.
|
|
84
|
+
|
|
85
|
+
### Installation
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Install the SDK
|
|
89
|
+
npm install bedrock-agentcore
|
|
90
|
+
|
|
91
|
+
# Install AI SDK v6 (required), use any model provider
|
|
92
|
+
npm install ai@beta @ai-sdk/amazon-bedrock@beta
|
|
93
|
+
|
|
94
|
+
# Install Playwright (optional, only for Browser tools)
|
|
95
|
+
npm install playwright
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Prerequisites:**
|
|
99
|
+
- Node.js >= 20.0.0
|
|
100
|
+
- [AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) with Bedrock AgentCore access
|
|
101
|
+
- Access to any large language model like models available in AWS Bedrock
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Integration
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
import { bedrock } from '@ai-sdk/amazon-bedrock'
|
|
108
|
+
import { ToolLoopAgent } from 'ai'
|
|
109
|
+
import { CodeInterpreterTools } from 'bedrock-agentcore/code-interpreter/vercel-ai'
|
|
110
|
+
import { BrowserTools } from 'bedrock-agentcore/browser/vercel-ai'
|
|
111
|
+
|
|
112
|
+
const codeInterpreter = new CodeInterpreterTools()
|
|
113
|
+
const browser = new BrowserTools()
|
|
114
|
+
|
|
115
|
+
const agent = new ToolLoopAgent({
|
|
116
|
+
model: bedrock('global.anthropic.claude-sonnet-4-20250514-v1:0'),
|
|
117
|
+
tools: {
|
|
118
|
+
...codeInterpreter.tools,
|
|
119
|
+
...browser.tools,
|
|
120
|
+
},
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
// Invoke the agent with any prompt
|
|
124
|
+
const result = await agent.run({
|
|
125
|
+
prompt: 'Visit news.ycombinator.com, scrape the top 5 stories, and analyze sentiment',
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
console.log(result.text)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
> **Note:** If deploying to Vercel, use [Vercel OIDC](https://vercel.com/docs/oidc/aws) for secure AWS credentials.
|
|
132
|
+
|
|
133
|
+
## Try Examples
|
|
134
|
+
|
|
135
|
+
Run the standalone example:
|
|
136
|
+
```bash
|
|
137
|
+
npx tsx examples/agent-with-code-interpreter.ts
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Or try the Next.js app with streaming UI:
|
|
141
|
+
```bash
|
|
142
|
+
cd examples/deep-research-ui && npm install && npm run dev
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## 🏗️ Deployment
|
|
146
|
+
|
|
147
|
+
See [AWS setup guide](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/getting-started-custom.html) for getting started with agentcore.
|
|
148
|
+
|
|
149
|
+
**Production:** [AWS CDK](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore-readme.html).
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## 📝 License & Contributing
|
|
153
|
+
|
|
154
|
+
- **License:** Apache 2.0 - see [LICENSE](LICENSE)
|
|
155
|
+
- **Contributing:** See [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
156
|
+
- **Security:** See [SECURITY.md](SECURITY.md)
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { BedrockAgentCoreClient } from '@aws-sdk/client-bedrock-agentcore';
|
|
2
|
+
import type { BrowserClientConfig, SessionInfo, StartSessionParams, WebSocketConnection, GetSessionParams, GetSessionResponse, ListSessionsParams, ListSessionsResponse, UpdateStreamParams, UpdateStreamResponse } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Base client for AWS Bedrock AgentCore Browser service.
|
|
5
|
+
*
|
|
6
|
+
* Provides core AWS SDK operations for browser session management and WebSocket connectivity.
|
|
7
|
+
* This client handles session lifecycle and authentication but does not include browser
|
|
8
|
+
* automation methods. Use PlaywrightBrowser for full browser automation capabilities.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const browser = new Browser({ region: 'us-east-1' })
|
|
13
|
+
*
|
|
14
|
+
* // Start a session
|
|
15
|
+
* const session = await browser.startSession({ sessionName: 'my-session' })
|
|
16
|
+
*
|
|
17
|
+
* // Get WebSocket URL for custom browser integration
|
|
18
|
+
* const wsConnection = await browser.generateWebSocketUrl()
|
|
19
|
+
*
|
|
20
|
+
* // Stop the session
|
|
21
|
+
* await browser.stopSession()
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class Browser {
|
|
25
|
+
readonly region: string;
|
|
26
|
+
readonly identifier: string;
|
|
27
|
+
protected _client: BedrockAgentCoreClient;
|
|
28
|
+
protected _session: SessionInfo | null;
|
|
29
|
+
private _credentialsProvider;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new BrowserClient instance.
|
|
32
|
+
*
|
|
33
|
+
* @param config - Configuration options for the client
|
|
34
|
+
*/
|
|
35
|
+
constructor(config: BrowserClientConfig);
|
|
36
|
+
/**
|
|
37
|
+
* Starts a new browser session.
|
|
38
|
+
*
|
|
39
|
+
* @param params - Optional parameters for session configuration
|
|
40
|
+
* @returns Information about the started session
|
|
41
|
+
*
|
|
42
|
+
* @throws Error if a session is already active
|
|
43
|
+
*/
|
|
44
|
+
startSession(params?: StartSessionParams): Promise<SessionInfo>;
|
|
45
|
+
/**
|
|
46
|
+
* Stops the active browser session.
|
|
47
|
+
*
|
|
48
|
+
* @throws Error if no session is active
|
|
49
|
+
*/
|
|
50
|
+
stopSession(): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Get detailed information about a browser session.
|
|
53
|
+
*
|
|
54
|
+
* @param params - Optional parameters specifying which session to query
|
|
55
|
+
* @returns Detailed session information
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* // Get current active session details
|
|
60
|
+
* const sessionInfo = await browser.getSession()
|
|
61
|
+
* console.log(`Session status: ${sessionInfo.status}`)
|
|
62
|
+
*
|
|
63
|
+
* // Get details for a specific session
|
|
64
|
+
* const sessionInfo = await browser.getSession({
|
|
65
|
+
* sessionId: 'specific-session-id'
|
|
66
|
+
* })
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
getSession(params?: GetSessionParams): Promise<GetSessionResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* List browser sessions for this browser.
|
|
72
|
+
*
|
|
73
|
+
* @param params - Optional filtering and pagination parameters
|
|
74
|
+
* @returns List of session summaries with optional pagination token
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* // List all active sessions
|
|
79
|
+
* const response = await browser.listSessions({ status: 'READY' })
|
|
80
|
+
* for (const session of response.items) {
|
|
81
|
+
* console.log(`Session ${session.sessionId}: ${session.status}`)
|
|
82
|
+
* }
|
|
83
|
+
*
|
|
84
|
+
* // Paginate through results
|
|
85
|
+
* let response = await browser.listSessions({ maxResults: 10 })
|
|
86
|
+
* while (response.nextToken) {
|
|
87
|
+
* response = await browser.listSessions({
|
|
88
|
+
* maxResults: 10,
|
|
89
|
+
* nextToken: response.nextToken
|
|
90
|
+
* })
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
listSessions(params?: ListSessionsParams): Promise<ListSessionsResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* Update the browser automation stream status.
|
|
97
|
+
*
|
|
98
|
+
* @param params - Stream update parameters
|
|
99
|
+
* @returns Updated stream information
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* // Enable automation stream
|
|
104
|
+
* const result = await browser.updateBrowserStream({
|
|
105
|
+
* streamStatus: 'ENABLED'
|
|
106
|
+
* })
|
|
107
|
+
*
|
|
108
|
+
* // Disable automation stream
|
|
109
|
+
* await browser.updateBrowserStream({
|
|
110
|
+
* streamStatus: 'DISABLED'
|
|
111
|
+
* })
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
updateBrowserStream(params: UpdateStreamParams): Promise<UpdateStreamResponse>;
|
|
115
|
+
/**
|
|
116
|
+
* Generates a WebSocket URL and authentication headers for browser automation.
|
|
117
|
+
* Uses AWS Signature Version 4 to sign the WebSocket connection request.
|
|
118
|
+
*
|
|
119
|
+
* @returns WebSocket connection details with URL and authentication headers
|
|
120
|
+
*
|
|
121
|
+
* @throws Error if no session is active
|
|
122
|
+
*/
|
|
123
|
+
generateWebSocketUrl(): Promise<WebSocketConnection>;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/tools/browser/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAOvB,MAAM,mCAAmC,CAAA;AAM1C,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EAEpB,kBAAkB,EAClB,oBAAoB,EAErB,MAAM,YAAY,CAAA;AAGnB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,OAAO;IAClB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAE3B,SAAS,CAAC,OAAO,EAAE,sBAAsB,CAAA;IACzC,SAAS,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAO;IAC7C,OAAO,CAAC,oBAAoB,CAAuD;IAEnF;;;;OAIG;gBACS,MAAM,EAAE,mBAAmB;IAevC;;;;;;;OAOG;IACG,YAAY,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IAqCrE;;;;OAIG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBlC;;;;;;;;;;;;;;;;;OAiBG;IACG,UAAU,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAsExE;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,YAAY,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAiC9E;;;;;;;;;;;;;;;;;;OAkBG;IACG,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAqCpF;;;;;;;OAOG;IACG,oBAAoB,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAiD3D"}
|