(Bedrock/Agents): helper methods to associate KnowledgeBases to Agents
Describe the feature
Allow for adding a KnowledgeBase to an agent and not only to specify existing KBs at the agent construct instantiation.
Use Case
Allow for more flexibility in the order in which agents and KBs are created
Proposed Solution
Implement a Agent.addKnowldgeBase(KnowledgeBase, {instructions}) and a KnowledgeBase.assToAgent(Agent, {instruxtions}) methods
Other Information
No response
Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
Hi @massi-ang ! Thanks for this request ! I see you mentioned you may be able to implement this FR, do you have bandwidth to work on this one ?
this issue can be closed as both helper methods have already been implemented: https://github.com/awslabs/generative-ai-cdk-constructs/blob/16e15cd81e409bb45788d50d673071f44cd24210/src/cdk-lib/bedrock/knowledge-base.ts#L633-L642
https://github.com/awslabs/generative-ai-cdk-constructs/blob/16e15cd81e409bb45788d50d673071f44cd24210/src/cdk-lib/bedrock/agent.ts#L528-L555
Thanks for updating the ticket @aws-rafams !