Skip to content

Commit 9128be8

Browse files
author
awstools
committed
feat(client-bedrock-agent-runtime): Amazon Bedrock introduces asynchronous flows (in preview), which let you run flows for longer durations and yield control so that your application can perform other tasks and you don't have to actively monitor the flow's progress.
1 parent 1076a5e commit 9128be8

29 files changed

+8871
-4657
lines changed

clients/client-bedrock-agent-runtime/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,22 @@ GetAgentMemory
258258

259259
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/GetAgentMemoryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/GetAgentMemoryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/GetAgentMemoryCommandOutput/)
260260

261+
</details>
262+
<details>
263+
<summary>
264+
GetExecutionFlowSnapshot
265+
</summary>
266+
267+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/GetExecutionFlowSnapshotCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/GetExecutionFlowSnapshotCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/GetExecutionFlowSnapshotCommandOutput/)
268+
269+
</details>
270+
<details>
271+
<summary>
272+
GetFlowExecution
273+
</summary>
274+
275+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/GetFlowExecutionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/GetFlowExecutionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/GetFlowExecutionCommandOutput/)
276+
261277
</details>
262278
<details>
263279
<summary>
@@ -298,6 +314,22 @@ InvokeInlineAgent
298314

299315
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/InvokeInlineAgentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/InvokeInlineAgentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/InvokeInlineAgentCommandOutput/)
300316

317+
</details>
318+
<details>
319+
<summary>
320+
ListFlowExecutionEvents
321+
</summary>
322+
323+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/ListFlowExecutionEventsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/ListFlowExecutionEventsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/ListFlowExecutionEventsCommandOutput/)
324+
325+
</details>
326+
<details>
327+
<summary>
328+
ListFlowExecutions
329+
</summary>
330+
331+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/ListFlowExecutionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/ListFlowExecutionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/ListFlowExecutionsCommandOutput/)
332+
301333
</details>
302334
<details>
303335
<summary>
@@ -378,6 +410,22 @@ RetrieveAndGenerateStream
378410

379411
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/RetrieveAndGenerateStreamCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/RetrieveAndGenerateStreamCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/RetrieveAndGenerateStreamCommandOutput/)
380412

413+
</details>
414+
<details>
415+
<summary>
416+
StartFlowExecution
417+
</summary>
418+
419+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/StartFlowExecutionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/StartFlowExecutionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/StartFlowExecutionCommandOutput/)
420+
421+
</details>
422+
<details>
423+
<summary>
424+
StopFlowExecution
425+
</summary>
426+
427+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/StopFlowExecutionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/StopFlowExecutionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/StopFlowExecutionCommandOutput/)
428+
381429
</details>
382430
<details>
383431
<summary>

clients/client-bedrock-agent-runtime/src/BedrockAgentRuntime.ts

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ import {
3434
GetAgentMemoryCommandInput,
3535
GetAgentMemoryCommandOutput,
3636
} from "./commands/GetAgentMemoryCommand";
37+
import {
38+
GetExecutionFlowSnapshotCommand,
39+
GetExecutionFlowSnapshotCommandInput,
40+
GetExecutionFlowSnapshotCommandOutput,
41+
} from "./commands/GetExecutionFlowSnapshotCommand";
42+
import {
43+
GetFlowExecutionCommand,
44+
GetFlowExecutionCommandInput,
45+
GetFlowExecutionCommandOutput,
46+
} from "./commands/GetFlowExecutionCommand";
3747
import {
3848
GetInvocationStepCommand,
3949
GetInvocationStepCommandInput,
@@ -47,6 +57,16 @@ import {
4757
InvokeInlineAgentCommandInput,
4858
InvokeInlineAgentCommandOutput,
4959
} from "./commands/InvokeInlineAgentCommand";
60+
import {
61+
ListFlowExecutionEventsCommand,
62+
ListFlowExecutionEventsCommandInput,
63+
ListFlowExecutionEventsCommandOutput,
64+
} from "./commands/ListFlowExecutionEventsCommand";
65+
import {
66+
ListFlowExecutionsCommand,
67+
ListFlowExecutionsCommandInput,
68+
ListFlowExecutionsCommandOutput,
69+
} from "./commands/ListFlowExecutionsCommand";
5070
import {
5171
ListInvocationsCommand,
5272
ListInvocationsCommandInput,
@@ -89,6 +109,16 @@ import {
89109
RetrieveAndGenerateStreamCommandOutput,
90110
} from "./commands/RetrieveAndGenerateStreamCommand";
91111
import { RetrieveCommand, RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
112+
import {
113+
StartFlowExecutionCommand,
114+
StartFlowExecutionCommandInput,
115+
StartFlowExecutionCommandOutput,
116+
} from "./commands/StartFlowExecutionCommand";
117+
import {
118+
StopFlowExecutionCommand,
119+
StopFlowExecutionCommandInput,
120+
StopFlowExecutionCommandOutput,
121+
} from "./commands/StopFlowExecutionCommand";
92122
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
93123
import {
94124
UntagResourceCommand,
@@ -109,11 +139,15 @@ const commands = {
109139
EndSessionCommand,
110140
GenerateQueryCommand,
111141
GetAgentMemoryCommand,
142+
GetExecutionFlowSnapshotCommand,
143+
GetFlowExecutionCommand,
112144
GetInvocationStepCommand,
113145
GetSessionCommand,
114146
InvokeAgentCommand,
115147
InvokeFlowCommand,
116148
InvokeInlineAgentCommand,
149+
ListFlowExecutionEventsCommand,
150+
ListFlowExecutionsCommand,
117151
ListInvocationsCommand,
118152
ListInvocationStepsCommand,
119153
ListSessionsCommand,
@@ -124,6 +158,8 @@ const commands = {
124158
RetrieveCommand,
125159
RetrieveAndGenerateCommand,
126160
RetrieveAndGenerateStreamCommand,
161+
StartFlowExecutionCommand,
162+
StopFlowExecutionCommand,
127163
TagResourceCommand,
128164
UntagResourceCommand,
129165
UpdateSessionCommand,
@@ -223,6 +259,40 @@ export interface BedrockAgentRuntime {
223259
cb: (err: any, data?: GetAgentMemoryCommandOutput) => void
224260
): void;
225261

262+
/**
263+
* @see {@link GetExecutionFlowSnapshotCommand}
264+
*/
265+
getExecutionFlowSnapshot(
266+
args: GetExecutionFlowSnapshotCommandInput,
267+
options?: __HttpHandlerOptions
268+
): Promise<GetExecutionFlowSnapshotCommandOutput>;
269+
getExecutionFlowSnapshot(
270+
args: GetExecutionFlowSnapshotCommandInput,
271+
cb: (err: any, data?: GetExecutionFlowSnapshotCommandOutput) => void
272+
): void;
273+
getExecutionFlowSnapshot(
274+
args: GetExecutionFlowSnapshotCommandInput,
275+
options: __HttpHandlerOptions,
276+
cb: (err: any, data?: GetExecutionFlowSnapshotCommandOutput) => void
277+
): void;
278+
279+
/**
280+
* @see {@link GetFlowExecutionCommand}
281+
*/
282+
getFlowExecution(
283+
args: GetFlowExecutionCommandInput,
284+
options?: __HttpHandlerOptions
285+
): Promise<GetFlowExecutionCommandOutput>;
286+
getFlowExecution(
287+
args: GetFlowExecutionCommandInput,
288+
cb: (err: any, data?: GetFlowExecutionCommandOutput) => void
289+
): void;
290+
getFlowExecution(
291+
args: GetFlowExecutionCommandInput,
292+
options: __HttpHandlerOptions,
293+
cb: (err: any, data?: GetFlowExecutionCommandOutput) => void
294+
): void;
295+
226296
/**
227297
* @see {@link GetInvocationStepCommand}
228298
*/
@@ -290,6 +360,40 @@ export interface BedrockAgentRuntime {
290360
cb: (err: any, data?: InvokeInlineAgentCommandOutput) => void
291361
): void;
292362

363+
/**
364+
* @see {@link ListFlowExecutionEventsCommand}
365+
*/
366+
listFlowExecutionEvents(
367+
args: ListFlowExecutionEventsCommandInput,
368+
options?: __HttpHandlerOptions
369+
): Promise<ListFlowExecutionEventsCommandOutput>;
370+
listFlowExecutionEvents(
371+
args: ListFlowExecutionEventsCommandInput,
372+
cb: (err: any, data?: ListFlowExecutionEventsCommandOutput) => void
373+
): void;
374+
listFlowExecutionEvents(
375+
args: ListFlowExecutionEventsCommandInput,
376+
options: __HttpHandlerOptions,
377+
cb: (err: any, data?: ListFlowExecutionEventsCommandOutput) => void
378+
): void;
379+
380+
/**
381+
* @see {@link ListFlowExecutionsCommand}
382+
*/
383+
listFlowExecutions(
384+
args: ListFlowExecutionsCommandInput,
385+
options?: __HttpHandlerOptions
386+
): Promise<ListFlowExecutionsCommandOutput>;
387+
listFlowExecutions(
388+
args: ListFlowExecutionsCommandInput,
389+
cb: (err: any, data?: ListFlowExecutionsCommandOutput) => void
390+
): void;
391+
listFlowExecutions(
392+
args: ListFlowExecutionsCommandInput,
393+
options: __HttpHandlerOptions,
394+
cb: (err: any, data?: ListFlowExecutionsCommandOutput) => void
395+
): void;
396+
293397
/**
294398
* @see {@link ListInvocationsCommand}
295399
*/
@@ -437,6 +541,40 @@ export interface BedrockAgentRuntime {
437541
cb: (err: any, data?: RetrieveAndGenerateStreamCommandOutput) => void
438542
): void;
439543

544+
/**
545+
* @see {@link StartFlowExecutionCommand}
546+
*/
547+
startFlowExecution(
548+
args: StartFlowExecutionCommandInput,
549+
options?: __HttpHandlerOptions
550+
): Promise<StartFlowExecutionCommandOutput>;
551+
startFlowExecution(
552+
args: StartFlowExecutionCommandInput,
553+
cb: (err: any, data?: StartFlowExecutionCommandOutput) => void
554+
): void;
555+
startFlowExecution(
556+
args: StartFlowExecutionCommandInput,
557+
options: __HttpHandlerOptions,
558+
cb: (err: any, data?: StartFlowExecutionCommandOutput) => void
559+
): void;
560+
561+
/**
562+
* @see {@link StopFlowExecutionCommand}
563+
*/
564+
stopFlowExecution(
565+
args: StopFlowExecutionCommandInput,
566+
options?: __HttpHandlerOptions
567+
): Promise<StopFlowExecutionCommandOutput>;
568+
stopFlowExecution(
569+
args: StopFlowExecutionCommandInput,
570+
cb: (err: any, data?: StopFlowExecutionCommandOutput) => void
571+
): void;
572+
stopFlowExecution(
573+
args: StopFlowExecutionCommandInput,
574+
options: __HttpHandlerOptions,
575+
cb: (err: any, data?: StopFlowExecutionCommandOutput) => void
576+
): void;
577+
440578
/**
441579
* @see {@link TagResourceCommand}
442580
*/

clients/client-bedrock-agent-runtime/src/BedrockAgentRuntimeClient.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,21 @@ import { DeleteSessionCommandInput, DeleteSessionCommandOutput } from "./command
6666
import { EndSessionCommandInput, EndSessionCommandOutput } from "./commands/EndSessionCommand";
6767
import { GenerateQueryCommandInput, GenerateQueryCommandOutput } from "./commands/GenerateQueryCommand";
6868
import { GetAgentMemoryCommandInput, GetAgentMemoryCommandOutput } from "./commands/GetAgentMemoryCommand";
69+
import {
70+
GetExecutionFlowSnapshotCommandInput,
71+
GetExecutionFlowSnapshotCommandOutput,
72+
} from "./commands/GetExecutionFlowSnapshotCommand";
73+
import { GetFlowExecutionCommandInput, GetFlowExecutionCommandOutput } from "./commands/GetFlowExecutionCommand";
6974
import { GetInvocationStepCommandInput, GetInvocationStepCommandOutput } from "./commands/GetInvocationStepCommand";
7075
import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
7176
import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
7277
import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
7378
import { InvokeInlineAgentCommandInput, InvokeInlineAgentCommandOutput } from "./commands/InvokeInlineAgentCommand";
79+
import {
80+
ListFlowExecutionEventsCommandInput,
81+
ListFlowExecutionEventsCommandOutput,
82+
} from "./commands/ListFlowExecutionEventsCommand";
83+
import { ListFlowExecutionsCommandInput, ListFlowExecutionsCommandOutput } from "./commands/ListFlowExecutionsCommand";
7484
import { ListInvocationsCommandInput, ListInvocationsCommandOutput } from "./commands/ListInvocationsCommand";
7585
import {
7686
ListInvocationStepsCommandInput,
@@ -93,6 +103,8 @@ import {
93103
RetrieveAndGenerateStreamCommandOutput,
94104
} from "./commands/RetrieveAndGenerateStreamCommand";
95105
import { RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
106+
import { StartFlowExecutionCommandInput, StartFlowExecutionCommandOutput } from "./commands/StartFlowExecutionCommand";
107+
import { StopFlowExecutionCommandInput, StopFlowExecutionCommandOutput } from "./commands/StopFlowExecutionCommand";
96108
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
97109
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
98110
import { UpdateSessionCommandInput, UpdateSessionCommandOutput } from "./commands/UpdateSessionCommand";
@@ -118,11 +130,15 @@ export type ServiceInputTypes =
118130
| EndSessionCommandInput
119131
| GenerateQueryCommandInput
120132
| GetAgentMemoryCommandInput
133+
| GetExecutionFlowSnapshotCommandInput
134+
| GetFlowExecutionCommandInput
121135
| GetInvocationStepCommandInput
122136
| GetSessionCommandInput
123137
| InvokeAgentCommandInput
124138
| InvokeFlowCommandInput
125139
| InvokeInlineAgentCommandInput
140+
| ListFlowExecutionEventsCommandInput
141+
| ListFlowExecutionsCommandInput
126142
| ListInvocationStepsCommandInput
127143
| ListInvocationsCommandInput
128144
| ListSessionsCommandInput
@@ -133,6 +149,8 @@ export type ServiceInputTypes =
133149
| RetrieveAndGenerateCommandInput
134150
| RetrieveAndGenerateStreamCommandInput
135151
| RetrieveCommandInput
152+
| StartFlowExecutionCommandInput
153+
| StopFlowExecutionCommandInput
136154
| TagResourceCommandInput
137155
| UntagResourceCommandInput
138156
| UpdateSessionCommandInput;
@@ -148,11 +166,15 @@ export type ServiceOutputTypes =
148166
| EndSessionCommandOutput
149167
| GenerateQueryCommandOutput
150168
| GetAgentMemoryCommandOutput
169+
| GetExecutionFlowSnapshotCommandOutput
170+
| GetFlowExecutionCommandOutput
151171
| GetInvocationStepCommandOutput
152172
| GetSessionCommandOutput
153173
| InvokeAgentCommandOutput
154174
| InvokeFlowCommandOutput
155175
| InvokeInlineAgentCommandOutput
176+
| ListFlowExecutionEventsCommandOutput
177+
| ListFlowExecutionsCommandOutput
156178
| ListInvocationStepsCommandOutput
157179
| ListInvocationsCommandOutput
158180
| ListSessionsCommandOutput
@@ -163,6 +185,8 @@ export type ServiceOutputTypes =
163185
| RetrieveAndGenerateCommandOutput
164186
| RetrieveAndGenerateStreamCommandOutput
165187
| RetrieveCommandOutput
188+
| StartFlowExecutionCommandOutput
189+
| StopFlowExecutionCommandOutput
166190
| TagResourceCommandOutput
167191
| UntagResourceCommandOutput
168192
| UpdateSessionCommandOutput;

clients/client-bedrock-agent-runtime/src/commands/CreateInvocationCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ServiceOutputTypes,
1111
} from "../BedrockAgentRuntimeClient";
1212
import { commonParams } from "../endpoint/EndpointParameters";
13-
import { CreateInvocationRequest, CreateInvocationResponse } from "../models/models_0";
13+
import { CreateInvocationRequest, CreateInvocationResponse } from "../models/models_1";
1414
import { de_CreateInvocationCommand, se_CreateInvocationCommand } from "../protocols/Aws_restJson1";
1515

1616
/**

clients/client-bedrock-agent-runtime/src/commands/CreateSessionCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ServiceOutputTypes,
1111
} from "../BedrockAgentRuntimeClient";
1212
import { commonParams } from "../endpoint/EndpointParameters";
13-
import { CreateSessionRequest, CreateSessionResponse } from "../models/models_0";
13+
import { CreateSessionRequest, CreateSessionResponse } from "../models/models_1";
1414
import { de_CreateSessionCommand, se_CreateSessionCommand } from "../protocols/Aws_restJson1";
1515

1616
/**

clients/client-bedrock-agent-runtime/src/commands/DeleteSessionCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ServiceOutputTypes,
1111
} from "../BedrockAgentRuntimeClient";
1212
import { commonParams } from "../endpoint/EndpointParameters";
13-
import { DeleteSessionRequest, DeleteSessionResponse } from "../models/models_0";
13+
import { DeleteSessionRequest, DeleteSessionResponse } from "../models/models_1";
1414
import { de_DeleteSessionCommand, se_DeleteSessionCommand } from "../protocols/Aws_restJson1";
1515

1616
/**

clients/client-bedrock-agent-runtime/src/commands/EndSessionCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ServiceOutputTypes,
1111
} from "../BedrockAgentRuntimeClient";
1212
import { commonParams } from "../endpoint/EndpointParameters";
13-
import { EndSessionRequest, EndSessionResponse } from "../models/models_0";
13+
import { EndSessionRequest, EndSessionResponse } from "../models/models_1";
1414
import { de_EndSessionCommand, se_EndSessionCommand } from "../protocols/Aws_restJson1";
1515

1616
/**

0 commit comments

Comments
 (0)