feat(aws): add AWS Bedrock AgentCore Long-Term Memory connector#6944
Conversation
|
@tshepomaredi please don't rely on my reviews this week :) |
Implements outbound connector for retrieving persistent knowledge from AWS Bedrock AgentCore Long-Term Memory (issue #6853). Operations: - Retrieve Memory Records: semantic search across extracted memories - List Memory Records: browse/filter stored memory records Both operations return memory record summaries with content, score, metadata, namespaces, and pagination support. closes #6853
0c12deb to
f99f371
Compare
Collectors.toMap throws NPE when stringValue() returns null. Fall back to empty string when value is null.
There was a problem hiding this comment.
Pull request overview
Adds a new AWS outbound connector module to retrieve and list persistent memory records from AWS Bedrock AgentCore Long‑Term Memory, including generated element templates and bundle wiring so it ships with the default distribution.
Changes:
- Introduces new
aws-bedrock-agentcore-lt-memoryconnector module (request/response models, executor, connector function, ServiceLoader registration, icon). - Adds generated element templates (standard + hybrid) for the new connector.
- Registers the module in the AWS parent build and includes it in the bundle/default-bundle.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| ignore-templates.json | Adds the new template id to the ignore list (currently introduces invalid JSON). |
| connectors/aws/pom.xml | Registers the new AWS connector module in the multi-module build. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/pom.xml | New module POM with AWS SDK dependency and element template generation config. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/java/io/camunda/connector/aws/bedrock/agentcore/memory/AgentCoreMemoryConnectorFunction.java | Main outbound connector entrypoint + AWS client creation. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/java/io/camunda/connector/aws/bedrock/agentcore/memory/AgentCoreMemoryExecutor.java | Implements retrieve/list calls and response mapping. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/java/io/camunda/connector/aws/bedrock/agentcore/memory/model/request/AgentCoreMemoryRequest.java | Root request model (memoryId, namespace, operation) extending AWS base request. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/java/io/camunda/connector/aws/bedrock/agentcore/memory/model/request/ListOperation.java | List operation request subtype. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/java/io/camunda/connector/aws/bedrock/agentcore/memory/model/request/MemoryOperation.java | Sealed discriminator interface for operations. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/java/io/camunda/connector/aws/bedrock/agentcore/memory/model/request/RetrieveOperation.java | Retrieve operation request subtype (query/strategy/maxResults). |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/java/io/camunda/connector/aws/bedrock/agentcore/memory/model/response/AgentCoreMemoryResult.java | Result wrapper with records, count, and nextToken. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/java/io/camunda/connector/aws/bedrock/agentcore/memory/model/response/MemoryRecordEntry.java | Response record for individual memory summaries. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/resources/icon.svg | Adds the connector icon used by templates. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/main/resources/META-INF/services/io.camunda.connector.api.outbound.OutboundConnectorFunction | Registers the connector via ServiceLoader. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/src/test/java/io/camunda/connector/aws/bedrock/agentcore/memory/AgentCoreMemoryExecutorTest.java | Unit tests for request mapping, filtering, metadata mapping, nextToken, and error wrapping. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/element-templates/aws-bedrock-agentcore-lt-memory-outbound-connector.json | Generated outbound element template definition. |
| connectors/aws/aws-bedrock-agentcore-lt-memory/element-templates/hybrid/aws-bedrock-agentcore-lt-memory-outbound-connector-hybrid.json | Generated hybrid element template definition. |
| bundle/pom.xml | Adds the new connector artifact to the bundle build. |
| bundle/default-bundle/pom.xml | Adds the new connector as a runtime dependency in the default bundle. |
nikonovd
left a comment
There was a problem hiding this comment.
Looks solid so far. Please take a look at my comments! 🥠
| public class AgentCoreMemoryConnectorFunction implements OutboundConnectorFunction { | ||
|
|
||
| @Override | ||
| public Object execute(OutboundConnectorContext context) { |
There was a problem hiding this comment.
❓ Have you considered the operation-based way of implementing the connector?
There was a problem hiding this comment.
I have not, will have a look. Would this be a preferable way? Currently all the connectors I made follow the current pattern, which was basically me following common implementation patterns of other AWS connectors
There was a problem hiding this comment.
It depends on your connector complexity, we introduced that recently it's not mandatory at all but can simplify the implementation. You can have a look at our CSV connector, for example. No need to change anything, I just wanted to raise awareness about this.
- Rename module from lt-memory to long-term-memory - Add nextToken pagination support for retrieve and list operations - Extract mapMetadata() helper, filter null values instead of empty strings - Refactor tests to nested classes, add happy path tests - Fix missing comma in ignore-templates.json
b7dee07 to
a9b5744
Compare
nikonovd
left a comment
There was a problem hiding this comment.
Looks good now! Thanks for checking.
There are two minor remarks - afterwards it's good to go from my side 🚀
|
🎉 This pull request has been included in release Thank you for your contribution! 🚀 |
Description
Implements outbound connector for retrieving persistent knowledge from AWS Bedrock AgentCore Long-Term Memory (issue #6853).
Operations:
Both operations return memory record summaries with content, score, metadata, namespaces, and pagination support.
Related issues
closes #6853
Checklist
release, as this branch will be rebased onto main before the next release. Example backport labels:
backport stable/8.8: for changes that should be included in the next 8.8.x release.backport release-8.8.7: for changes that should be included in the specific release 8.8.7, and thisrelease has already been created. The release branch will be merged back into stable/8.8 later, so the change
will be included in future 8.8.x releases as well.