Skip to content

Commit 372482a

Browse files
author
awstools
committed
feat(client-bedrock-agent-runtime): InvokeInlineAgent API release to help invoke runtime agents without any dependency on preconfigured agents.
1 parent 3ef966f commit 372482a

File tree

9 files changed

+3557
-121
lines changed

9 files changed

+3557
-121
lines changed

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

+8
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@ InvokeFlow
234234

235235
[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/)
236236

237+
</details>
238+
<details>
239+
<summary>
240+
InvokeInlineAgent
241+
</summary>
242+
243+
[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/)
244+
237245
</details>
238246
<details>
239247
<summary>

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

+23
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ import {
1515
} from "./commands/GetAgentMemoryCommand";
1616
import { InvokeAgentCommand, InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
1717
import { InvokeFlowCommand, InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
18+
import {
19+
InvokeInlineAgentCommand,
20+
InvokeInlineAgentCommandInput,
21+
InvokeInlineAgentCommandOutput,
22+
} from "./commands/InvokeInlineAgentCommand";
1823
import {
1924
OptimizePromptCommand,
2025
OptimizePromptCommandInput,
@@ -32,6 +37,7 @@ const commands = {
3237
GetAgentMemoryCommand,
3338
InvokeAgentCommand,
3439
InvokeFlowCommand,
40+
InvokeInlineAgentCommand,
3541
OptimizePromptCommand,
3642
RetrieveCommand,
3743
RetrieveAndGenerateCommand,
@@ -91,6 +97,23 @@ export interface BedrockAgentRuntime {
9197
cb: (err: any, data?: InvokeFlowCommandOutput) => void
9298
): void;
9399

100+
/**
101+
* @see {@link InvokeInlineAgentCommand}
102+
*/
103+
invokeInlineAgent(
104+
args: InvokeInlineAgentCommandInput,
105+
options?: __HttpHandlerOptions
106+
): Promise<InvokeInlineAgentCommandOutput>;
107+
invokeInlineAgent(
108+
args: InvokeInlineAgentCommandInput,
109+
cb: (err: any, data?: InvokeInlineAgentCommandOutput) => void
110+
): void;
111+
invokeInlineAgent(
112+
args: InvokeInlineAgentCommandInput,
113+
options: __HttpHandlerOptions,
114+
cb: (err: any, data?: InvokeInlineAgentCommandOutput) => void
115+
): void;
116+
94117
/**
95118
* @see {@link OptimizePromptCommand}
96119
*/

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

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import { DeleteAgentMemoryCommandInput, DeleteAgentMemoryCommandOutput } from ".
6363
import { GetAgentMemoryCommandInput, GetAgentMemoryCommandOutput } from "./commands/GetAgentMemoryCommand";
6464
import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
6565
import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
66+
import { InvokeInlineAgentCommandInput, InvokeInlineAgentCommandOutput } from "./commands/InvokeInlineAgentCommand";
6667
import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "./commands/OptimizePromptCommand";
6768
import {
6869
RetrieveAndGenerateCommandInput,
@@ -88,6 +89,7 @@ export type ServiceInputTypes =
8889
| GetAgentMemoryCommandInput
8990
| InvokeAgentCommandInput
9091
| InvokeFlowCommandInput
92+
| InvokeInlineAgentCommandInput
9193
| OptimizePromptCommandInput
9294
| RetrieveAndGenerateCommandInput
9395
| RetrieveCommandInput;
@@ -100,6 +102,7 @@ export type ServiceOutputTypes =
100102
| GetAgentMemoryCommandOutput
101103
| InvokeAgentCommandOutput
102104
| InvokeFlowCommandOutput
105+
| InvokeInlineAgentCommandOutput
103106
| OptimizePromptCommandOutput
104107
| RetrieveAndGenerateCommandOutput
105108
| RetrieveCommandOutput;

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
252252
* // },
253253
* // },
254254
* // trace: { // TracePart
255-
* // agentId: "STRING_VALUE",
256-
* // agentAliasId: "STRING_VALUE",
257255
* // sessionId: "STRING_VALUE",
258-
* // agentVersion: "STRING_VALUE",
259256
* // trace: { // Trace Union: only one key present
260257
* // guardrailTrace: { // GuardrailTrace
261258
* // action: "INTERVENED" || "NONE",
@@ -373,7 +370,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
373370
* // modelInvocationInput: { // ModelInvocationInput
374371
* // traceId: "STRING_VALUE",
375372
* // text: "STRING_VALUE",
376-
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
373+
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER",
377374
* // overrideLambda: "STRING_VALUE",
378375
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
379376
* // inferenceConfiguration: { // InferenceConfiguration
@@ -504,7 +501,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
504501
* // modelInvocationInput: {
505502
* // traceId: "STRING_VALUE",
506503
* // text: "STRING_VALUE",
507-
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
504+
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER",
508505
* // overrideLambda: "STRING_VALUE",
509506
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
510507
* // inferenceConfiguration: {
@@ -535,7 +532,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
535532
* // modelInvocationInput: {
536533
* // traceId: "STRING_VALUE",
537534
* // text: "STRING_VALUE",
538-
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
535+
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER",
539536
* // overrideLambda: "STRING_VALUE",
540537
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
541538
* // inferenceConfiguration: {
@@ -570,6 +567,9 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
570567
* // failureReason: "STRING_VALUE",
571568
* // },
572569
* // },
570+
* // agentId: "STRING_VALUE",
571+
* // agentAliasId: "STRING_VALUE",
572+
* // agentVersion: "STRING_VALUE",
573573
* // },
574574
* // returnControl: { // ReturnControlPayload
575575
* // invocationInputs: [ // InvocationInputs

0 commit comments

Comments
 (0)