Skip to content

Commit

Permalink
feat(client-bedrock-agent-runtime): InvokeInlineAgent API release to …
Browse files Browse the repository at this point in the history
…help invoke runtime agents without any dependency on preconfigured agents.
  • Loading branch information
awstools committed Nov 22, 2024
1 parent 3ef966f commit 372482a
Show file tree
Hide file tree
Showing 9 changed files with 3,557 additions and 121 deletions.
8 changes: 8 additions & 0 deletions clients/client-bedrock-agent-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@ InvokeFlow

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

</details>
<details>
<summary>
InvokeInlineAgent
</summary>

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

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-bedrock-agent-runtime/src/BedrockAgentRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import {
} from "./commands/GetAgentMemoryCommand";
import { InvokeAgentCommand, InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
import { InvokeFlowCommand, InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
import {
InvokeInlineAgentCommand,
InvokeInlineAgentCommandInput,
InvokeInlineAgentCommandOutput,
} from "./commands/InvokeInlineAgentCommand";
import {
OptimizePromptCommand,
OptimizePromptCommandInput,
Expand All @@ -32,6 +37,7 @@ const commands = {
GetAgentMemoryCommand,
InvokeAgentCommand,
InvokeFlowCommand,
InvokeInlineAgentCommand,
OptimizePromptCommand,
RetrieveCommand,
RetrieveAndGenerateCommand,
Expand Down Expand Up @@ -91,6 +97,23 @@ export interface BedrockAgentRuntime {
cb: (err: any, data?: InvokeFlowCommandOutput) => void
): void;

/**
* @see {@link InvokeInlineAgentCommand}
*/
invokeInlineAgent(
args: InvokeInlineAgentCommandInput,
options?: __HttpHandlerOptions
): Promise<InvokeInlineAgentCommandOutput>;
invokeInlineAgent(
args: InvokeInlineAgentCommandInput,
cb: (err: any, data?: InvokeInlineAgentCommandOutput) => void
): void;
invokeInlineAgent(
args: InvokeInlineAgentCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: InvokeInlineAgentCommandOutput) => void
): void;

/**
* @see {@link OptimizePromptCommand}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import { DeleteAgentMemoryCommandInput, DeleteAgentMemoryCommandOutput } from ".
import { GetAgentMemoryCommandInput, GetAgentMemoryCommandOutput } from "./commands/GetAgentMemoryCommand";
import { InvokeAgentCommandInput, InvokeAgentCommandOutput } from "./commands/InvokeAgentCommand";
import { InvokeFlowCommandInput, InvokeFlowCommandOutput } from "./commands/InvokeFlowCommand";
import { InvokeInlineAgentCommandInput, InvokeInlineAgentCommandOutput } from "./commands/InvokeInlineAgentCommand";
import { OptimizePromptCommandInput, OptimizePromptCommandOutput } from "./commands/OptimizePromptCommand";
import {
RetrieveAndGenerateCommandInput,
Expand All @@ -88,6 +89,7 @@ export type ServiceInputTypes =
| GetAgentMemoryCommandInput
| InvokeAgentCommandInput
| InvokeFlowCommandInput
| InvokeInlineAgentCommandInput
| OptimizePromptCommandInput
| RetrieveAndGenerateCommandInput
| RetrieveCommandInput;
Expand All @@ -100,6 +102,7 @@ export type ServiceOutputTypes =
| GetAgentMemoryCommandOutput
| InvokeAgentCommandOutput
| InvokeFlowCommandOutput
| InvokeInlineAgentCommandOutput
| OptimizePromptCommandOutput
| RetrieveAndGenerateCommandOutput
| RetrieveCommandOutput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* // },
* // },
* // trace: { // TracePart
* // agentId: "STRING_VALUE",
* // agentAliasId: "STRING_VALUE",
* // sessionId: "STRING_VALUE",
* // agentVersion: "STRING_VALUE",
* // trace: { // Trace Union: only one key present
* // guardrailTrace: { // GuardrailTrace
* // action: "INTERVENED" || "NONE",
Expand Down Expand Up @@ -373,7 +370,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* // modelInvocationInput: { // ModelInvocationInput
* // traceId: "STRING_VALUE",
* // text: "STRING_VALUE",
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER",
* // overrideLambda: "STRING_VALUE",
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
* // inferenceConfiguration: { // InferenceConfiguration
Expand Down Expand Up @@ -504,7 +501,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* // modelInvocationInput: {
* // traceId: "STRING_VALUE",
* // text: "STRING_VALUE",
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER",
* // overrideLambda: "STRING_VALUE",
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
* // inferenceConfiguration: {
Expand Down Expand Up @@ -535,7 +532,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* // modelInvocationInput: {
* // traceId: "STRING_VALUE",
* // text: "STRING_VALUE",
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING" || "ROUTING_CLASSIFIER",
* // overrideLambda: "STRING_VALUE",
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
* // inferenceConfiguration: {
Expand Down Expand Up @@ -570,6 +567,9 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
* // failureReason: "STRING_VALUE",
* // },
* // },
* // agentId: "STRING_VALUE",
* // agentAliasId: "STRING_VALUE",
* // agentVersion: "STRING_VALUE",
* // },
* // returnControl: { // ReturnControlPayload
* // invocationInputs: [ // InvocationInputs
Expand Down
Loading

0 comments on commit 372482a

Please sign in to comment.