interface CfnHarnessProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.BedrockAgentCore.CfnHarnessProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrockagentcore#CfnHarnessProps |
Java | software.amazon.awscdk.services.bedrockagentcore.CfnHarnessProps |
Python | aws_cdk.aws_bedrockagentcore.CfnHarnessProps |
TypeScript | aws-cdk-lib » aws_bedrockagentcore » CfnHarnessProps |
Properties for defining a CfnHarness.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
declare const awsIam: any;
declare const inputSchema: any;
declare const none: any;
const cfnHarnessProps: bedrockagentcore.CfnHarnessProps = {
executionRoleArn: 'executionRoleArn',
harnessName: 'harnessName',
model: {
bedrockModelConfig: {
modelId: 'modelId',
// the properties below are optional
maxTokens: 123,
temperature: 123,
topP: 123,
},
geminiModelConfig: {
apiKeyArn: 'apiKeyArn',
modelId: 'modelId',
// the properties below are optional
maxTokens: 123,
temperature: 123,
topK: 123,
topP: 123,
},
openAiModelConfig: {
apiKeyArn: 'apiKeyArn',
modelId: 'modelId',
// the properties below are optional
maxTokens: 123,
temperature: 123,
topP: 123,
},
},
// the properties below are optional
allowedTools: ['allowedTools'],
authorizerConfiguration: {
customJwtAuthorizer: {
discoveryUrl: 'discoveryUrl',
// the properties below are optional
allowedAudience: ['allowedAudience'],
allowedClients: ['allowedClients'],
allowedScopes: ['allowedScopes'],
customClaims: [{
authorizingClaimMatchValue: {
claimMatchOperator: 'claimMatchOperator',
claimMatchValue: {
matchValueString: 'matchValueString',
matchValueStringList: ['matchValueStringList'],
},
},
inboundTokenClaimName: 'inboundTokenClaimName',
inboundTokenClaimValueType: 'inboundTokenClaimValueType',
}],
},
},
environment: {
agentCoreRuntimeEnvironment: {
agentRuntimeArn: 'agentRuntimeArn',
agentRuntimeId: 'agentRuntimeId',
agentRuntimeName: 'agentRuntimeName',
filesystemConfigurations: [{
sessionStorage: {
mountPath: 'mountPath',
},
}],
lifecycleConfiguration: {
idleRuntimeSessionTimeout: 123,
maxLifetime: 123,
},
networkConfiguration: {
networkMode: 'networkMode',
// the properties below are optional
networkModeConfig: {
securityGroups: ['securityGroups'],
subnets: ['subnets'],
},
},
},
},
environmentArtifact: {
containerConfiguration: {
containerUri: 'containerUri',
},
},
environmentVariables: {
environmentVariablesKey: 'environmentVariables',
},
maxIterations: 123,
maxTokens: 123,
memory: {
agentCoreMemoryConfiguration: {
arn: 'arn',
// the properties below are optional
actorId: 'actorId',
messagesCount: 123,
retrievalConfig: {
retrievalConfigKey: {
relevanceScore: 123,
strategyId: 'strategyId',
topK: 123,
},
},
},
},
skills: [{
path: 'path',
}],
systemPrompt: [{
text: 'text',
}],
tags: [{
key: 'key',
value: 'value',
}],
timeoutSeconds: 123,
tools: [{
type: 'type',
// the properties below are optional
config: {
agentCoreBrowser: {
browserArn: 'browserArn',
},
agentCoreCodeInterpreter: {
codeInterpreterArn: 'codeInterpreterArn',
},
agentCoreGateway: {
gatewayArn: 'gatewayArn',
// the properties below are optional
outboundAuth: {
awsIam: awsIam,
none: none,
oauth: {
providerArn: 'providerArn',
scopes: ['scopes'],
// the properties below are optional
customParameters: {
customParametersKey: 'customParameters',
},
defaultReturnUrl: 'defaultReturnUrl',
grantType: 'grantType',
},
},
},
inlineFunction: {
description: 'description',
inputSchema: inputSchema,
},
remoteMcp: {
url: 'url',
// the properties below are optional
headers: {
headersKey: 'headers',
},
},
},
name: 'name',
}],
truncation: {
strategy: 'strategy',
// the properties below are optional
config: {
slidingWindow: {
messagesCount: 123,
},
summarization: {
preserveRecentMessages: 123,
summarizationSystemPrompt: 'summarizationSystemPrompt',
summaryRatio: 123,
},
},
},
};
Properties
| Name | Type | Description |
|---|---|---|
| execution | string | The ARN of the IAM role that the harness assumes when running. |
| harness | string | The name of the harness. |
| model | IResolvable | Harness | |
| allowed | string[] | The tools that the agent is allowed to use. |
| authorizer | IResolvable | Authorizer | |
| environment? | IResolvable | Harness | |
| environment | IResolvable | Harness | |
| environment | IResolvable | { [string]: string } | Environment variables to set in the harness runtime environment. |
| max | number | The maximum number of iterations the agent loop can execute per invocation. |
| max | number | The maximum number of tokens the agent can generate per iteration. |
| memory? | IResolvable | Harness | |
| skills? | IResolvable | (IResolvable | Harness)[] | The skills available to the agent. |
| system | IResolvable | (IResolvable | Harness)[] | The system prompt that defines the agent's behavior. |
| tags? | Cfn[] | Tags to apply to the harness resource. |
| timeout | number | The maximum duration in seconds for the agent loop execution per invocation. |
| tools? | IResolvable | (IResolvable | Harness)[] | The tools available to the agent. |
| truncation? | IResolvable | Harness |
executionRoleArn
Type:
string
The ARN of the IAM role that the harness assumes when running.
harnessName
Type:
string
The name of the harness.
model
Type:
IResolvable | Harness
allowedTools?
Type:
string[]
(optional)
The tools that the agent is allowed to use.
authorizerConfiguration?
Type:
IResolvable | Authorizer
(optional)
environment?
Type:
IResolvable | Harness
(optional)
environmentArtifact?
Type:
IResolvable | Harness
(optional)
environmentVariables?
Type:
IResolvable | { [string]: string }
(optional)
Environment variables to set in the harness runtime environment.
maxIterations?
Type:
number
(optional)
The maximum number of iterations the agent loop can execute per invocation.
maxTokens?
Type:
number
(optional)
The maximum number of tokens the agent can generate per iteration.
memory?
Type:
IResolvable | Harness
(optional)
skills?
Type:
IResolvable | (IResolvable | Harness)[]
(optional)
The skills available to the agent.
systemPrompt?
Type:
IResolvable | (IResolvable | Harness)[]
(optional)
The system prompt that defines the agent's behavior.
tags?
Type:
Cfn[]
(optional)
Tags to apply to the harness resource.
timeoutSeconds?
Type:
number
(optional)
The maximum duration in seconds for the agent loop execution per invocation.
tools?
Type:
IResolvable | (IResolvable | Harness)[]
(optional)
The tools available to the agent.
truncation?
Type:
IResolvable | Harness
(optional)

.NET
Go
Java
Python
TypeScript