Skip to content

Commit f2f40c1

Browse files
author
awstools
committed
feat(client-bedrock-agent-runtime): Introduces query decomposition, enhanced Agents integration with Knowledge bases, session summary generation, and code interpretation (preview) for Claude V3 Sonnet and Haiku models. Also introduces Prompt Flows (preview) to link prompts, foundational models, and resources for end-to-end solutions.
1 parent 427a732 commit f2f40c1

15 files changed

+4023
-343
lines changed

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

+24
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,37 @@ see LICENSE for more information.
203203

204204
## Client Commands (Operations List)
205205

206+
<details>
207+
<summary>
208+
DeleteAgentMemory
209+
</summary>
210+
211+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/DeleteAgentMemoryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/DeleteAgentMemoryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/DeleteAgentMemoryCommandOutput/)
212+
213+
</details>
214+
<details>
215+
<summary>
216+
GetAgentMemory
217+
</summary>
218+
219+
[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/)
220+
221+
</details>
206222
<details>
207223
<summary>
208224
InvokeAgent
209225
</summary>
210226

211227
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/InvokeAgentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/InvokeAgentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/InvokeAgentCommandOutput/)
212228

229+
</details>
230+
<details>
231+
<summary>
232+
InvokeFlow
233+
</summary>
234+
235+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock-agent-runtime/command/InvokeFlowCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/InvokeFlowCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock-agent-runtime/Interface/InvokeFlowCommandOutput/)
236+
213237
</details>
214238
<details>
215239
<summary>

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

+56
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@ import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

55
import { BedrockAgentRuntimeClient, BedrockAgentRuntimeClientConfig } from "./BedrockAgentRuntimeClient";
6+
import {
7+
DeleteAgentMemoryCommand,
8+
DeleteAgentMemoryCommandInput,
9+
DeleteAgentMemoryCommandOutput,
10+
} from "./commands/DeleteAgentMemoryCommand";
11+
import {
12+
GetAgentMemoryCommand,
13+
GetAgentMemoryCommandInput,
14+
GetAgentMemoryCommandOutput,
15+
} from "./commands/GetAgentMemoryCommand";
616
import { InvokeAgentCommand, InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
17+
import { InvokeFlowCommand, InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
718
import {
819
RetrieveAndGenerateCommand,
920
RetrieveAndGenerateCommandInput,
@@ -12,12 +23,46 @@ import {
1223
import { RetrieveCommand, RetrieveCommandInput, RetrieveCommandOutput } from "./commands/RetrieveCommand";
1324

1425
const commands = {
26+
DeleteAgentMemoryCommand,
27+
GetAgentMemoryCommand,
1528
InvokeAgentCommand,
29+
InvokeFlowCommand,
1630
RetrieveCommand,
1731
RetrieveAndGenerateCommand,
1832
};
1933

2034
export interface BedrockAgentRuntime {
35+
/**
36+
* @see {@link DeleteAgentMemoryCommand}
37+
*/
38+
deleteAgentMemory(
39+
args: DeleteAgentMemoryCommandInput,
40+
options?: __HttpHandlerOptions
41+
): Promise<DeleteAgentMemoryCommandOutput>;
42+
deleteAgentMemory(
43+
args: DeleteAgentMemoryCommandInput,
44+
cb: (err: any, data?: DeleteAgentMemoryCommandOutput) => void
45+
): void;
46+
deleteAgentMemory(
47+
args: DeleteAgentMemoryCommandInput,
48+
options: __HttpHandlerOptions,
49+
cb: (err: any, data?: DeleteAgentMemoryCommandOutput) => void
50+
): void;
51+
52+
/**
53+
* @see {@link GetAgentMemoryCommand}
54+
*/
55+
getAgentMemory(
56+
args: GetAgentMemoryCommandInput,
57+
options?: __HttpHandlerOptions
58+
): Promise<GetAgentMemoryCommandOutput>;
59+
getAgentMemory(args: GetAgentMemoryCommandInput, cb: (err: any, data?: GetAgentMemoryCommandOutput) => void): void;
60+
getAgentMemory(
61+
args: GetAgentMemoryCommandInput,
62+
options: __HttpHandlerOptions,
63+
cb: (err: any, data?: GetAgentMemoryCommandOutput) => void
64+
): void;
65+
2166
/**
2267
* @see {@link InvokeAgentCommand}
2368
*/
@@ -29,6 +74,17 @@ export interface BedrockAgentRuntime {
2974
cb: (err: any, data?: InvokeAgentCommandOutput) => void
3075
): void;
3176

77+
/**
78+
* @see {@link InvokeFlowCommand}
79+
*/
80+
invokeFlow(args: InvokeFlowCommandInput, options?: __HttpHandlerOptions): Promise<InvokeFlowCommandOutput>;
81+
invokeFlow(args: InvokeFlowCommandInput, cb: (err: any, data?: InvokeFlowCommandOutput) => void): void;
82+
invokeFlow(
83+
args: InvokeFlowCommandInput,
84+
options: __HttpHandlerOptions,
85+
cb: (err: any, data?: InvokeFlowCommandOutput) => void
86+
): void;
87+
3288
/**
3389
* @see {@link RetrieveCommand}
3490
*/

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

+17-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ import {
5959
HttpAuthSchemeResolvedConfig,
6060
resolveHttpAuthSchemeConfig,
6161
} from "./auth/httpAuthSchemeProvider";
62+
import { DeleteAgentMemoryCommandInput, DeleteAgentMemoryCommandOutput } from "./commands/DeleteAgentMemoryCommand";
63+
import { GetAgentMemoryCommandInput, GetAgentMemoryCommandOutput } from "./commands/GetAgentMemoryCommand";
6264
import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
65+
import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
6366
import {
6467
RetrieveAndGenerateCommandInput,
6568
RetrieveAndGenerateCommandOutput,
@@ -79,12 +82,24 @@ export { __Client };
7982
/**
8083
* @public
8184
*/
82-
export type ServiceInputTypes = InvokeAgentCommandInput | RetrieveAndGenerateCommandInput | RetrieveCommandInput;
85+
export type ServiceInputTypes =
86+
| DeleteAgentMemoryCommandInput
87+
| GetAgentMemoryCommandInput
88+
| InvokeAgentCommandInput
89+
| InvokeFlowCommandInput
90+
| RetrieveAndGenerateCommandInput
91+
| RetrieveCommandInput;
8392

8493
/**
8594
* @public
8695
*/
87-
export type ServiceOutputTypes = InvokeAgentCommandOutput | RetrieveAndGenerateCommandOutput | RetrieveCommandOutput;
96+
export type ServiceOutputTypes =
97+
| DeleteAgentMemoryCommandOutput
98+
| GetAgentMemoryCommandOutput
99+
| InvokeAgentCommandOutput
100+
| InvokeFlowCommandOutput
101+
| RetrieveAndGenerateCommandOutput
102+
| RetrieveCommandOutput;
88103

89104
/**
90105
* @public
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import {
8+
BedrockAgentRuntimeClientResolvedConfig,
9+
ServiceInputTypes,
10+
ServiceOutputTypes,
11+
} from "../BedrockAgentRuntimeClient";
12+
import { commonParams } from "../endpoint/EndpointParameters";
13+
import { DeleteAgentMemoryRequest, DeleteAgentMemoryResponse } from "../models/models_0";
14+
import { de_DeleteAgentMemoryCommand, se_DeleteAgentMemoryCommand } from "../protocols/Aws_restJson1";
15+
16+
/**
17+
* @public
18+
*/
19+
export type { __MetadataBearer };
20+
export { $Command };
21+
/**
22+
* @public
23+
*
24+
* The input for {@link DeleteAgentMemoryCommand}.
25+
*/
26+
export interface DeleteAgentMemoryCommandInput extends DeleteAgentMemoryRequest {}
27+
/**
28+
* @public
29+
*
30+
* The output of {@link DeleteAgentMemoryCommand}.
31+
*/
32+
export interface DeleteAgentMemoryCommandOutput extends DeleteAgentMemoryResponse, __MetadataBearer {}
33+
34+
/**
35+
* <p>Deletes memory from the specified memory identifier.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { BedrockAgentRuntimeClient, DeleteAgentMemoryCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import
40+
* // const { BedrockAgentRuntimeClient, DeleteAgentMemoryCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import
41+
* const client = new BedrockAgentRuntimeClient(config);
42+
* const input = { // DeleteAgentMemoryRequest
43+
* agentId: "STRING_VALUE", // required
44+
* agentAliasId: "STRING_VALUE", // required
45+
* memoryId: "STRING_VALUE",
46+
* };
47+
* const command = new DeleteAgentMemoryCommand(input);
48+
* const response = await client.send(command);
49+
* // {};
50+
*
51+
* ```
52+
*
53+
* @param DeleteAgentMemoryCommandInput - {@link DeleteAgentMemoryCommandInput}
54+
* @returns {@link DeleteAgentMemoryCommandOutput}
55+
* @see {@link DeleteAgentMemoryCommandInput} for command's `input` shape.
56+
* @see {@link DeleteAgentMemoryCommandOutput} for command's `response` shape.
57+
* @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape.
58+
*
59+
* @throws {@link AccessDeniedException} (client fault)
60+
* <p>The request is denied because of missing access permissions. Check your permissions and retry your request.</p>
61+
*
62+
* @throws {@link BadGatewayException} (server fault)
63+
* <p>There was an issue with a dependency due to a server issue. Retry your request.</p>
64+
*
65+
* @throws {@link ConflictException} (client fault)
66+
* <p>There was a conflict performing an operation. Resolve the conflict and retry your request.</p>
67+
*
68+
* @throws {@link DependencyFailedException} (client fault)
69+
* <p>There was an issue with a dependency. Check the resource configurations and retry the request.</p>
70+
*
71+
* @throws {@link InternalServerException} (server fault)
72+
* <p>An internal server error occurred. Retry your request.</p>
73+
*
74+
* @throws {@link ResourceNotFoundException} (client fault)
75+
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
76+
*
77+
* @throws {@link ServiceQuotaExceededException} (client fault)
78+
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
79+
*
80+
* @throws {@link ThrottlingException} (client fault)
81+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
82+
*
83+
* @throws {@link ValidationException} (client fault)
84+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
85+
*
86+
* @throws {@link BedrockAgentRuntimeServiceException}
87+
* <p>Base exception class for all service exceptions from BedrockAgentRuntime service.</p>
88+
*
89+
* @public
90+
*/
91+
export class DeleteAgentMemoryCommand extends $Command
92+
.classBuilder<
93+
DeleteAgentMemoryCommandInput,
94+
DeleteAgentMemoryCommandOutput,
95+
BedrockAgentRuntimeClientResolvedConfig,
96+
ServiceInputTypes,
97+
ServiceOutputTypes
98+
>()
99+
.ep({
100+
...commonParams,
101+
})
102+
.m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) {
103+
return [
104+
getSerdePlugin(config, this.serialize, this.deserialize),
105+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
106+
];
107+
})
108+
.s("AmazonBedrockAgentRunTimeService", "DeleteAgentMemory", {})
109+
.n("BedrockAgentRuntimeClient", "DeleteAgentMemoryCommand")
110+
.f(void 0, void 0)
111+
.ser(se_DeleteAgentMemoryCommand)
112+
.de(de_DeleteAgentMemoryCommand)
113+
.build() {}

0 commit comments

Comments
 (0)