generative-ai-cdk-constructs icon indicating copy to clipboard operation
generative-ai-cdk-constructs copied to clipboard

(Bedrock/Agents): helper methods to associate KnowledgeBases to Agents

Open massi-ang opened this issue 1 year ago • 1 comments

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

massi-ang avatar Feb 19 '24 11:02 massi-ang

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 ?

krokoko avatar Feb 28 '24 17:02 krokoko

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

aws-rafams avatar Aug 21 '24 08:08 aws-rafams

Thanks for updating the ticket @aws-rafams !

krokoko avatar Aug 22 '24 22:08 krokoko