Skip to content

Commit 8dff96a

Browse files
author
awstools
committed
feat(client-bedrock-agentcore): Add support for batch memory management, agent card retrieval and session termination
1 parent 806f651 commit 8dff96a

21 files changed

+2907
-299
lines changed

clients/client-bedrock-agentcore/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,30 @@ see LICENSE for more information.
203203

204204
## Client Commands (Operations List)
205205

206+
<details>
207+
<summary>
208+
BatchCreateMemoryRecords
209+
</summary>
210+
211+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agentcore/command/BatchCreateMemoryRecordsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/BatchCreateMemoryRecordsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/BatchCreateMemoryRecordsCommandOutput/)
212+
213+
</details>
214+
<details>
215+
<summary>
216+
BatchDeleteMemoryRecords
217+
</summary>
218+
219+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agentcore/command/BatchDeleteMemoryRecordsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/BatchDeleteMemoryRecordsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/BatchDeleteMemoryRecordsCommandOutput/)
220+
221+
</details>
222+
<details>
223+
<summary>
224+
BatchUpdateMemoryRecords
225+
</summary>
226+
227+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agentcore/command/BatchUpdateMemoryRecordsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/BatchUpdateMemoryRecordsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/BatchUpdateMemoryRecordsCommandOutput/)
228+
229+
</details>
206230
<details>
207231
<summary>
208232
CreateEvent
@@ -226,6 +250,14 @@ DeleteMemoryRecord
226250

227251
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agentcore/command/DeleteMemoryRecordCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/DeleteMemoryRecordCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/DeleteMemoryRecordCommandOutput/)
228252

253+
</details>
254+
<details>
255+
<summary>
256+
GetAgentCard
257+
</summary>
258+
259+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agentcore/command/GetAgentCardCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/GetAgentCardCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/GetAgentCardCommandOutput/)
260+
229261
</details>
230262
<details>
231263
<summary>
@@ -402,6 +434,14 @@ StopCodeInterpreterSession
402434

403435
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agentcore/command/StopCodeInterpreterSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/StopCodeInterpreterSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/StopCodeInterpreterSessionCommandOutput/)
404436

437+
</details>
438+
<details>
439+
<summary>
440+
StopRuntimeSession
441+
</summary>
442+
443+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agentcore/command/StopRuntimeSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/StopRuntimeSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agentcore/Interface/StopRuntimeSessionCommandOutput/)
444+
405445
</details>
406446
<details>
407447
<summary>

clients/client-bedrock-agentcore/src/BedrockAgentCore.ts

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,33 @@ import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

55
import { BedrockAgentCoreClient, BedrockAgentCoreClientConfig } from "./BedrockAgentCoreClient";
6+
import {
7+
BatchCreateMemoryRecordsCommand,
8+
BatchCreateMemoryRecordsCommandInput,
9+
BatchCreateMemoryRecordsCommandOutput,
10+
} from "./commands/BatchCreateMemoryRecordsCommand";
11+
import {
12+
BatchDeleteMemoryRecordsCommand,
13+
BatchDeleteMemoryRecordsCommandInput,
14+
BatchDeleteMemoryRecordsCommandOutput,
15+
} from "./commands/BatchDeleteMemoryRecordsCommand";
16+
import {
17+
BatchUpdateMemoryRecordsCommand,
18+
BatchUpdateMemoryRecordsCommandInput,
19+
BatchUpdateMemoryRecordsCommandOutput,
20+
} from "./commands/BatchUpdateMemoryRecordsCommand";
621
import { CreateEventCommand, CreateEventCommandInput, CreateEventCommandOutput } from "./commands/CreateEventCommand";
722
import { DeleteEventCommand, DeleteEventCommandInput, DeleteEventCommandOutput } from "./commands/DeleteEventCommand";
823
import {
924
DeleteMemoryRecordCommand,
1025
DeleteMemoryRecordCommandInput,
1126
DeleteMemoryRecordCommandOutput,
1227
} from "./commands/DeleteMemoryRecordCommand";
28+
import {
29+
GetAgentCardCommand,
30+
GetAgentCardCommandInput,
31+
GetAgentCardCommandOutput,
32+
} from "./commands/GetAgentCardCommand";
1333
import {
1434
GetBrowserSessionCommand,
1535
GetBrowserSessionCommandInput,
@@ -108,16 +128,25 @@ import {
108128
StopCodeInterpreterSessionCommandInput,
109129
StopCodeInterpreterSessionCommandOutput,
110130
} from "./commands/StopCodeInterpreterSessionCommand";
131+
import {
132+
StopRuntimeSessionCommand,
133+
StopRuntimeSessionCommandInput,
134+
StopRuntimeSessionCommandOutput,
135+
} from "./commands/StopRuntimeSessionCommand";
111136
import {
112137
UpdateBrowserStreamCommand,
113138
UpdateBrowserStreamCommandInput,
114139
UpdateBrowserStreamCommandOutput,
115140
} from "./commands/UpdateBrowserStreamCommand";
116141

117142
const commands = {
143+
BatchCreateMemoryRecordsCommand,
144+
BatchDeleteMemoryRecordsCommand,
145+
BatchUpdateMemoryRecordsCommand,
118146
CreateEventCommand,
119147
DeleteEventCommand,
120148
DeleteMemoryRecordCommand,
149+
GetAgentCardCommand,
121150
GetBrowserSessionCommand,
122151
GetCodeInterpreterSessionCommand,
123152
GetEventCommand,
@@ -140,10 +169,62 @@ const commands = {
140169
StartCodeInterpreterSessionCommand,
141170
StopBrowserSessionCommand,
142171
StopCodeInterpreterSessionCommand,
172+
StopRuntimeSessionCommand,
143173
UpdateBrowserStreamCommand,
144174
};
145175

146176
export interface BedrockAgentCore {
177+
/**
178+
* @see {@link BatchCreateMemoryRecordsCommand}
179+
*/
180+
batchCreateMemoryRecords(
181+
args: BatchCreateMemoryRecordsCommandInput,
182+
options?: __HttpHandlerOptions
183+
): Promise<BatchCreateMemoryRecordsCommandOutput>;
184+
batchCreateMemoryRecords(
185+
args: BatchCreateMemoryRecordsCommandInput,
186+
cb: (err: any, data?: BatchCreateMemoryRecordsCommandOutput) => void
187+
): void;
188+
batchCreateMemoryRecords(
189+
args: BatchCreateMemoryRecordsCommandInput,
190+
options: __HttpHandlerOptions,
191+
cb: (err: any, data?: BatchCreateMemoryRecordsCommandOutput) => void
192+
): void;
193+
194+
/**
195+
* @see {@link BatchDeleteMemoryRecordsCommand}
196+
*/
197+
batchDeleteMemoryRecords(
198+
args: BatchDeleteMemoryRecordsCommandInput,
199+
options?: __HttpHandlerOptions
200+
): Promise<BatchDeleteMemoryRecordsCommandOutput>;
201+
batchDeleteMemoryRecords(
202+
args: BatchDeleteMemoryRecordsCommandInput,
203+
cb: (err: any, data?: BatchDeleteMemoryRecordsCommandOutput) => void
204+
): void;
205+
batchDeleteMemoryRecords(
206+
args: BatchDeleteMemoryRecordsCommandInput,
207+
options: __HttpHandlerOptions,
208+
cb: (err: any, data?: BatchDeleteMemoryRecordsCommandOutput) => void
209+
): void;
210+
211+
/**
212+
* @see {@link BatchUpdateMemoryRecordsCommand}
213+
*/
214+
batchUpdateMemoryRecords(
215+
args: BatchUpdateMemoryRecordsCommandInput,
216+
options?: __HttpHandlerOptions
217+
): Promise<BatchUpdateMemoryRecordsCommandOutput>;
218+
batchUpdateMemoryRecords(
219+
args: BatchUpdateMemoryRecordsCommandInput,
220+
cb: (err: any, data?: BatchUpdateMemoryRecordsCommandOutput) => void
221+
): void;
222+
batchUpdateMemoryRecords(
223+
args: BatchUpdateMemoryRecordsCommandInput,
224+
options: __HttpHandlerOptions,
225+
cb: (err: any, data?: BatchUpdateMemoryRecordsCommandOutput) => void
226+
): void;
227+
147228
/**
148229
* @see {@link CreateEventCommand}
149230
*/
@@ -183,6 +264,17 @@ export interface BedrockAgentCore {
183264
cb: (err: any, data?: DeleteMemoryRecordCommandOutput) => void
184265
): void;
185266

267+
/**
268+
* @see {@link GetAgentCardCommand}
269+
*/
270+
getAgentCard(args: GetAgentCardCommandInput, options?: __HttpHandlerOptions): Promise<GetAgentCardCommandOutput>;
271+
getAgentCard(args: GetAgentCardCommandInput, cb: (err: any, data?: GetAgentCardCommandOutput) => void): void;
272+
getAgentCard(
273+
args: GetAgentCardCommandInput,
274+
options: __HttpHandlerOptions,
275+
cb: (err: any, data?: GetAgentCardCommandOutput) => void
276+
): void;
277+
186278
/**
187279
* @see {@link GetBrowserSessionCommand}
188280
*/
@@ -530,6 +622,23 @@ export interface BedrockAgentCore {
530622
cb: (err: any, data?: StopCodeInterpreterSessionCommandOutput) => void
531623
): void;
532624

625+
/**
626+
* @see {@link StopRuntimeSessionCommand}
627+
*/
628+
stopRuntimeSession(
629+
args: StopRuntimeSessionCommandInput,
630+
options?: __HttpHandlerOptions
631+
): Promise<StopRuntimeSessionCommandOutput>;
632+
stopRuntimeSession(
633+
args: StopRuntimeSessionCommandInput,
634+
cb: (err: any, data?: StopRuntimeSessionCommandOutput) => void
635+
): void;
636+
stopRuntimeSession(
637+
args: StopRuntimeSessionCommandInput,
638+
options: __HttpHandlerOptions,
639+
cb: (err: any, data?: StopRuntimeSessionCommandOutput) => void
640+
): void;
641+
533642
/**
534643
* @see {@link UpdateBrowserStreamCommand}
535644
*/

clients/client-bedrock-agentcore/src/BedrockAgentCoreClient.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,22 @@ import {
6060
HttpAuthSchemeResolvedConfig,
6161
resolveHttpAuthSchemeConfig,
6262
} from "./auth/httpAuthSchemeProvider";
63+
import {
64+
BatchCreateMemoryRecordsCommandInput,
65+
BatchCreateMemoryRecordsCommandOutput,
66+
} from "./commands/BatchCreateMemoryRecordsCommand";
67+
import {
68+
BatchDeleteMemoryRecordsCommandInput,
69+
BatchDeleteMemoryRecordsCommandOutput,
70+
} from "./commands/BatchDeleteMemoryRecordsCommand";
71+
import {
72+
BatchUpdateMemoryRecordsCommandInput,
73+
BatchUpdateMemoryRecordsCommandOutput,
74+
} from "./commands/BatchUpdateMemoryRecordsCommand";
6375
import { CreateEventCommandInput, CreateEventCommandOutput } from "./commands/CreateEventCommand";
6476
import { DeleteEventCommandInput, DeleteEventCommandOutput } from "./commands/DeleteEventCommand";
6577
import { DeleteMemoryRecordCommandInput, DeleteMemoryRecordCommandOutput } from "./commands/DeleteMemoryRecordCommand";
78+
import { GetAgentCardCommandInput, GetAgentCardCommandOutput } from "./commands/GetAgentCardCommand";
6679
import { GetBrowserSessionCommandInput, GetBrowserSessionCommandOutput } from "./commands/GetBrowserSessionCommand";
6780
import {
6881
GetCodeInterpreterSessionCommandInput,
@@ -121,6 +134,7 @@ import {
121134
StopCodeInterpreterSessionCommandInput,
122135
StopCodeInterpreterSessionCommandOutput,
123136
} from "./commands/StopCodeInterpreterSessionCommand";
137+
import { StopRuntimeSessionCommandInput, StopRuntimeSessionCommandOutput } from "./commands/StopRuntimeSessionCommand";
124138
import {
125139
UpdateBrowserStreamCommandInput,
126140
UpdateBrowserStreamCommandOutput,
@@ -140,9 +154,13 @@ export { __Client };
140154
* @public
141155
*/
142156
export type ServiceInputTypes =
157+
| BatchCreateMemoryRecordsCommandInput
158+
| BatchDeleteMemoryRecordsCommandInput
159+
| BatchUpdateMemoryRecordsCommandInput
143160
| CreateEventCommandInput
144161
| DeleteEventCommandInput
145162
| DeleteMemoryRecordCommandInput
163+
| GetAgentCardCommandInput
146164
| GetBrowserSessionCommandInput
147165
| GetCodeInterpreterSessionCommandInput
148166
| GetEventCommandInput
@@ -165,15 +183,20 @@ export type ServiceInputTypes =
165183
| StartCodeInterpreterSessionCommandInput
166184
| StopBrowserSessionCommandInput
167185
| StopCodeInterpreterSessionCommandInput
186+
| StopRuntimeSessionCommandInput
168187
| UpdateBrowserStreamCommandInput;
169188

170189
/**
171190
* @public
172191
*/
173192
export type ServiceOutputTypes =
193+
| BatchCreateMemoryRecordsCommandOutput
194+
| BatchDeleteMemoryRecordsCommandOutput
195+
| BatchUpdateMemoryRecordsCommandOutput
174196
| CreateEventCommandOutput
175197
| DeleteEventCommandOutput
176198
| DeleteMemoryRecordCommandOutput
199+
| GetAgentCardCommandOutput
177200
| GetBrowserSessionCommandOutput
178201
| GetCodeInterpreterSessionCommandOutput
179202
| GetEventCommandOutput
@@ -196,6 +219,7 @@ export type ServiceOutputTypes =
196219
| StartCodeInterpreterSessionCommandOutput
197220
| StopBrowserSessionCommandOutput
198221
| StopCodeInterpreterSessionCommandOutput
222+
| StopRuntimeSessionCommandOutput
199223
| UpdateBrowserStreamCommandOutput;
200224

201225
/**

0 commit comments

Comments
 (0)