AgentsforBedrock / Client / associate_agent_knowledge_base
associate_agent_knowledge_base#
- AgentsforBedrock.Client.associate_agent_knowledge_base(**kwargs)#
- Associates a knowledge base with an agent. If a knowledge base is associated and its - indexStateis set to- Enabled, the agent queries the knowledge base for information to augment its response to the user.- See also: AWS API Documentation - Request Syntax- response = client.associate_agent_knowledge_base( agentId='string', agentVersion='string', description='string', knowledgeBaseId='string', knowledgeBaseState='ENABLED'|'DISABLED' ) - Parameters:
- agentId (string) – - [REQUIRED] - The unique identifier of the agent with which you want to associate the knowledge base. 
- agentVersion (string) – - [REQUIRED] - The version of the agent with which you want to associate the knowledge base. 
- description (string) – - [REQUIRED] - A description of what the agent should use the knowledge base for. 
- knowledgeBaseId (string) – - [REQUIRED] - The unique identifier of the knowledge base to associate with the agent. 
- knowledgeBaseState (string) – Specifies whether to use the knowledge base or not when sending an InvokeAgent request. 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'agentKnowledgeBase': { 'agentId': 'string', 'agentVersion': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'knowledgeBaseId': 'string', 'knowledgeBaseState': 'ENABLED'|'DISABLED', 'updatedAt': datetime(2015, 1, 1) } } - Response Structure- (dict) – - agentKnowledgeBase (dict) – - Contains details about the knowledge base that has been associated with the agent. - agentId (string) – - The unique identifier of the agent with which the knowledge base is associated. 
- agentVersion (string) – - The version of the agent with which the knowledge base is associated. 
- createdAt (datetime) – - The time at which the association between the agent and the knowledge base was created. 
- description (string) – - The description of the association between the agent and the knowledge base. 
- knowledgeBaseId (string) – - 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 request. 
- updatedAt (datetime) – - The time at which the association between the agent and the knowledge base was last updated. 
 
 
 
 - Exceptions- AgentsforBedrock.Client.exceptions.ThrottlingException
- AgentsforBedrock.Client.exceptions.AccessDeniedException
- AgentsforBedrock.Client.exceptions.ValidationException
- AgentsforBedrock.Client.exceptions.InternalServerException
- AgentsforBedrock.Client.exceptions.ResourceNotFoundException
- AgentsforBedrock.Client.exceptions.ConflictException
- AgentsforBedrock.Client.exceptions.ServiceQuotaExceededException