First of all we need to setup our knowledge base as shown here where we can specify the source of our knowledge. Once we created it, we can referenced it in our code, next. And these are the code that we can use to harness our knowledge base. import boto3 client = boto3 . client ( "bedrock-agent-runtime" , region_name = "ap-southeast-2" ) # AgenticRetrieveStream - streaming, agent-driven multi-step retrieval response = client .agentic_retrieve_stream( messages = [{ "role" : "user" , "content" : { "text" : "your query here" }}], retrievers = [{ "configuration" : { "knowledgeBase" : { "knowledgeBaseId" : "YOUR-KNOWLEDGE-BASE-ID" }}}], agenticRetrieveConfiguration = { "foundationModelType" : "MANAGED" , "maxAgentIteration" : 5 }, generateResponse = True , ) for event in response [ "stream" ]: if "respons...