package awsbedrockalpha

import (
	"github.com/aws/aws-cdk-go/awscdk/v2"
	"github.com/aws/aws-cdk-go/awscdk/v2/awsiam"
	"github.com/aws/aws-cdk-go/awscdk/v2/awskms"
)

// Properties for creating a CDK managed Bedrock Agent.
//
// TODO: Knowledge bases configuration will be added in a future update
// TODO: Inference profile configuration will be added in a future update.
//
// Example:
//   parserFunction := lambda.NewFunction(this, jsii.String("ParserFunction"), &FunctionProps{
//   	Runtime: lambda.Runtime_PYTHON_3_10(),
//   	Handler: jsii.String("index.handler"),
//   	Code: lambda.Code_FromAsset(jsii.String("lambda")),
//   })
//
//   agent := bedrock.NewAgent(this, jsii.String("Agent"), &AgentProps{
//   	FoundationModel: bedrock.BedrockFoundationModel_AMAZON_NOVA_LITE_V1(),
//   	Instruction: jsii.String("You are a helpful assistant."),
//   	PromptOverrideConfiguration: bedrock.PromptOverrideConfiguration_WithCustomParser(&CustomParserProps{
//   		Parser: parserFunction,
//   		PreProcessingStep: &PromptPreProcessingConfigCustomParser{
//   			StepType: bedrock.AgentStepType_PRE_PROCESSING,
//   			UseCustomParser: jsii.Boolean(true),
//   		},
//   	}),
//   })
//
// Experimental.
type AgentProps struct {
	// The foundation model used for orchestration by the agent.
	// Experimental.
	FoundationModel IBedrockInvokable `field:"required" json:"foundationModel" yaml:"foundationModel"`
	// The instruction used by the agent.
	//
	// This determines how the agent will perform his task.
	// This instruction must have a minimum of 40 characters.
	// Experimental.
	Instruction *string `field:"required" json:"instruction" yaml:"instruction"`
	// The Action Groups associated with the agent.
	// Default: - Only default action groups (UserInput and CodeInterpreter) are added.
	//
	// Experimental.
	ActionGroups *[]AgentActionGroup `field:"optional" json:"actionGroups" yaml:"actionGroups"`
	// Configuration for agent collaboration settings, including AgentCollaboratorType and AgentCollaborators.
	//
	// This property allows you to define how the agent collaborates with other agents
	// and what collaborators it can work with.
	// Default: - No agent collaboration configuration.
	//
	// Experimental.
	AgentCollaboration AgentCollaboration `field:"optional" json:"agentCollaboration" yaml:"agentCollaboration"`
	// The name of the agent.
	//
	// This will be used as the physical name of the agent.
	// Default: - A name is generated by CDK.
	// Supported pattern : ^([0-9a-zA-Z][_-]?){1,100}$
	//
	// Experimental.
	AgentName *string `field:"optional" json:"agentName" yaml:"agentName"`
	// Select whether the agent can generate, run, and troubleshoot code when trying to complete a task.
	// Default: - false.
	//
	// Experimental.
	CodeInterpreterEnabled *bool `field:"optional" json:"codeInterpreterEnabled" yaml:"codeInterpreterEnabled"`
	// The Lambda function to use for custom orchestration.
	//
	// If provided, custom orchestration will be used.
	// If not provided, default orchestration will be used.
	// Default: - Default orchestration.
	//
	// Experimental.
	CustomOrchestrationExecutor CustomOrchestrationExecutor `field:"optional" json:"customOrchestrationExecutor" yaml:"customOrchestrationExecutor"`
	// A description of the agent.
	// Default: - No description is provided.
	//
	// Experimental.
	Description *string `field:"optional" json:"description" yaml:"description"`
	// An existing IAM Role to associate with this agent.
	//
	// Use this property when you want to reuse an existing IAM role rather than create a new one.
	// The role must have a trust policy that allows the Bedrock service to assume it.
	// Default: - A new role is created for you.
	//
	// Experimental.
	ExistingRole awsiam.IRole `field:"optional" json:"existingRole" yaml:"existingRole"`
	// Whether to delete the resource even if it's in use.
	// Default: - false.
	//
	// Experimental.
	ForceDelete *bool `field:"optional" json:"forceDelete" yaml:"forceDelete"`
	// The guardrail that will be associated with the agent.
	// Default: - No guardrail is provided.
	//
	// Experimental.
	Guardrail IGuardrail `field:"optional" json:"guardrail" yaml:"guardrail"`
	// How long sessions should be kept open for the agent.
	//
	// If no conversation occurs
	// during this time, the session expires and Amazon Bedrock deletes any data
	// provided before the timeout.
	// Default: - 10 minutes.
	//
	// Experimental.
	IdleSessionTTL awscdk.Duration `field:"optional" json:"idleSessionTTL" yaml:"idleSessionTTL"`
	// The KMS key of the agent if custom encryption is configured.
	// Default: - An AWS managed key is used.
	//
	// Experimental.
	KmsKey awskms.IKey `field:"optional" json:"kmsKey" yaml:"kmsKey"`
	// The type and configuration of the memory to maintain context across multiple sessions and recall past interactions.
	//
	// This can be useful for maintaining continuity in multi-turn conversations and recalling user preferences
	// or past interactions.
	// See: https://docs.aws.amazon.com/bedrock/latest/userguide/agents-memory.html
	//
	// Default: - No memory will be used. Agents will retain context from the current session only.
	//
	// Experimental.
	Memory Memory `field:"optional" json:"memory" yaml:"memory"`
	// Overrides some prompt templates in different parts of an agent sequence configuration.
	// Default: - No overrides are provided.
	//
	// Experimental.
	PromptOverrideConfiguration PromptOverrideConfiguration `field:"optional" json:"promptOverrideConfiguration" yaml:"promptOverrideConfiguration"`
	// Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent.
	//
	// The `DRAFT` version can be continually iterated
	// upon during internal development.
	// Default: - false.
	//
	// Experimental.
	ShouldPrepareAgent *bool `field:"optional" json:"shouldPrepareAgent" yaml:"shouldPrepareAgent"`
	// Select whether the agent can prompt additional information from the user when it does not have enough information to respond to an utterance.
	// Default: - false.
	//
	// Experimental.
	UserInputEnabled *bool `field:"optional" json:"userInputEnabled" yaml:"userInputEnabled"`
}

