# AgentKnowledgeBaseProperty

Struct · External

Contains details about a knowledge base that is associated with an agent.

- Source: Generated at build time
- Type last changed: v2.139.0 · 24 Apr 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const agentKnowledgeBaseProperty: bedrock.CfnAgent.AgentKnowledgeBaseProperty = {
  description: 'description',
  knowledgeBaseId: 'knowledgeBaseId',

  // the properties below are optional
  knowledgeBaseState: 'knowledgeBaseState',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

agent_knowledge_base_property = bedrock.CfnAgent.AgentKnowledgeBaseProperty(
    description="description",
    knowledge_base_id="knowledgeBaseId",

    # the properties below are optional
    knowledge_base_state="knowledgeBaseState"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.*;

AgentKnowledgeBaseProperty agentKnowledgeBaseProperty = AgentKnowledgeBaseProperty.builder()
        .description("description")
        .knowledgeBaseId("knowledgeBaseId")

        // the properties below are optional
        .knowledgeBaseState("knowledgeBaseState")
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;

var agentKnowledgeBaseProperty = new AgentKnowledgeBaseProperty {
    Description = "description",
    KnowledgeBaseId = "knowledgeBaseId",

    // the properties below are optional
    KnowledgeBaseState = "knowledgeBaseState"
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

agentKnowledgeBaseProperty := &AgentKnowledgeBaseProperty{
	Description: jsii.String("description"),
	KnowledgeBaseId: jsii.String("knowledgeBaseId"),

	// the properties below are optional
	KnowledgeBaseState: jsii.String("knowledgeBaseState"),
}
```

## Properties

- `description`: string (required) — The description of the association between the agent and the knowledge base.

- `knowledgeBaseId`: string (required) — The unique identifier of the association between the agent and the knowledge base.

- `knowledgeBaseState`: string — Specifies whether to use the knowledge base or not when sending an [InvokeAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html) request.
