import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for managing an AWS Bedrock Agents Agent Collaborator. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getCallerIdentity({}); * const currentGetPartition = aws.getPartition({}); * const currentGetRegion = aws.getRegion({}); * const exampleAgentTrust = Promise.all([current, currentGetPartition, currentGetRegion]).then(([current, currentGetPartition, currentGetRegion]) => aws.iam.getPolicyDocument({ * statements: [{ * conditions: [ * { * test: "StringEquals", * values: [current.accountId], * variable: "aws:SourceAccount", * }, * { * test: "ArnLike", * values: [`arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.region}:${current.accountId}:agent/*`], * variable: "AWS:SourceArn", * }, * ], * principals: [{ * identifiers: ["bedrock.amazonaws.com"], * type: "Service", * }], * actions: ["sts:AssumeRole"], * }], * })); * const exampleAgentPermissions = Promise.all([currentGetPartition, currentGetRegion, current]).then(([currentGetPartition, currentGetRegion, current]) => aws.iam.getPolicyDocument({ * statements: [ * { * actions: ["bedrock:InvokeModel"], * resources: [`arn:${currentGetPartition.partition}:bedrock:${currentGetRegion.region}::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0`], * }, * { * actions: [ * "bedrock:GetAgentAlias", * "bedrock:InvokeAgent", * ], * resources: [ * `arn:${currentAgent.partition}:bedrock:${currentGetRegion.region}:${current.accountId}:agent/*`, * `arn:${currentAgent.partition}:bedrock:${currentGetRegion.region}:${current.accountId}:agent-alias/*`, * ], * }, * ], * })); * const example = new aws.iam.Role("example", { * assumeRolePolicy: exampleAgentTrust.then(exampleAgentTrust => exampleAgentTrust.json), * namePrefix: "AmazonBedrockExecutionRoleForAgents_", * }); * const exampleRolePolicy = new aws.iam.RolePolicy("example", { * policy: exampleAgentPermissions.then(exampleAgentPermissions => exampleAgentPermissions.json), * role: example.id, * }); * const exampleCollaborator = new aws.bedrock.AgentAgent("example_collaborator", { * agentName: "my-agent-collaborator", * agentResourceRoleArn: example.arn, * idleSessionTtlInSeconds: 500, * foundationModel: "anthropic.claude-3-5-sonnet-20241022-v2:0", * instruction: "do what the supervisor tells you to do", * }); * const exampleSupervisor = new aws.bedrock.AgentAgent("example_supervisor", { * agentName: "my-agent-supervisor", * agentResourceRoleArn: example.arn, * agentCollaboration: "SUPERVISOR", * idleSessionTtlInSeconds: 500, * foundationModel: "anthropic.claude-3-5-sonnet-20241022-v2:0", * instruction: "tell the sub agent what to do", * prepareAgent: false, * }); * const exampleAgentAgentAlias = new aws.bedrock.AgentAgentAlias("example", { * agentAliasName: "my-agent-alias", * agentId: exampleCollaborator.agentId, * description: "Test Alias", * }); * const exampleAgentAgentCollaborator = new aws.bedrock.AgentAgentCollaborator("example", { * agentDescriptor: { * aliasArn: exampleAgentAgentAlias.agentAliasArn, * }, * agentId: exampleSupervisor.agentId, * collaborationInstruction: "tell the other agent what to do", * collaboratorName: "my-collab-example", * relayConversationHistory: "TO_COLLABORATOR", * }); * ``` * * ## Import * * Using `pulumi import`, import Bedrock Agents Agent Collaborator using a comma-delimited string combining `agentId`, `agentVersion`, and `collaboratorId`. For example: * * ```sh * $ pulumi import aws:bedrock/agentAgentCollaborator:AgentAgentCollaborator example 9LSJO0BFI8,DRAFT,AG3TN4RQIY * ``` */ export declare class AgentAgentCollaborator extends pulumi.CustomResource { /** * Get an existing AgentAgentCollaborator resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AgentAgentCollaboratorState, opts?: pulumi.CustomResourceOptions): AgentAgentCollaborator; /** * Returns true if the given object is an instance of AgentAgentCollaborator. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AgentAgentCollaborator; readonly agentDescriptor: pulumi.Output; /** * ID if the agent to associate the collaborator. */ readonly agentId: pulumi.Output; /** * Version of the agent to associate the collaborator. Defaults to `DRAFT`. */ readonly agentVersion: pulumi.Output; /** * Instruction to give the collaborator. */ readonly collaborationInstruction: pulumi.Output; /** * ID of the Agent Collaborator. */ readonly collaboratorId: pulumi.Output; /** * Name of this collaborator. * * The following arguments are optional: */ readonly collaboratorName: pulumi.Output; /** * Whether to prepare the agent after creation or modification. Defaults to `true`. */ readonly prepareAgent: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Configure relaying the history to the collaborator. */ readonly relayConversationHistory: pulumi.Output; readonly timeouts: pulumi.Output; /** * Create a AgentAgentCollaborator resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AgentAgentCollaboratorArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AgentAgentCollaborator resources. */ export interface AgentAgentCollaboratorState { agentDescriptor?: pulumi.Input; /** * ID if the agent to associate the collaborator. */ agentId?: pulumi.Input; /** * Version of the agent to associate the collaborator. Defaults to `DRAFT`. */ agentVersion?: pulumi.Input; /** * Instruction to give the collaborator. */ collaborationInstruction?: pulumi.Input; /** * ID of the Agent Collaborator. */ collaboratorId?: pulumi.Input; /** * Name of this collaborator. * * The following arguments are optional: */ collaboratorName?: pulumi.Input; /** * Whether to prepare the agent after creation or modification. Defaults to `true`. */ prepareAgent?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Configure relaying the history to the collaborator. */ relayConversationHistory?: pulumi.Input; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a AgentAgentCollaborator resource. */ export interface AgentAgentCollaboratorArgs { agentDescriptor: pulumi.Input; /** * ID if the agent to associate the collaborator. */ agentId: pulumi.Input; /** * Version of the agent to associate the collaborator. Defaults to `DRAFT`. */ agentVersion?: pulumi.Input; /** * Instruction to give the collaborator. */ collaborationInstruction: pulumi.Input; /** * Name of this collaborator. * * The following arguments are optional: */ collaboratorName: pulumi.Input; /** * Whether to prepare the agent after creation or modification. Defaults to `true`. */ prepareAgent?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Configure relaying the history to the collaborator. */ relayConversationHistory?: pulumi.Input; timeouts?: pulumi.Input; } //# sourceMappingURL=agentAgentCollaborator.d.ts.map