Skip to content

2415 Introduce in-memory chat memory handling actions#4467

Merged
ivicac merged 2 commits intomasterfrom
2415_1
Mar 24, 2026
Merged

2415 Introduce in-memory chat memory handling actions#4467
ivicac merged 2 commits intomasterfrom
2415_1

Conversation

@ivicac
Copy link
Copy Markdown
Contributor

@ivicac ivicac commented Mar 9, 2026

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class action support to the in-memory chat memory component so workflows can programmatically add/read/delete/list stored conversation messages using the same underlying repository instance as the chat-memory advisor.

Changes:

  • Added chat-memory handling actions: add messages, get messages, delete conversation, list conversations.
  • Introduced a shared InMemoryChatMemoryRepository holder and constants for common parameter keys.
  • Updated the component handler registration and refreshed the component definition JSON snapshot.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/test/resources/definition/in-memory-chat-memory_v1.json Updates golden definition snapshot to include newly registered actions.
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/main/java/com/bytechef/component/ai/agent/chat/memory/memory/constant/InMemoryChatMemoryConstants.java Introduces constants for common parameter/message keys used by the new actions.
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/main/java/com/bytechef/component/ai/agent/chat/memory/memory/cluster/InMemoryChatMemory.java Switches advisor wiring to use the shared repository instance.
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/main/java/com/bytechef/component/ai/agent/chat/memory/memory/action/InMemoryChatMemoryListConversationsAction.java Adds action to list conversation IDs currently stored in memory.
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/main/java/com/bytechef/component/ai/agent/chat/memory/memory/action/InMemoryChatMemoryGetMessagesAction.java Adds action to fetch messages for a conversation and map them to role/content pairs.
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/main/java/com/bytechef/component/ai/agent/chat/memory/memory/action/InMemoryChatMemoryDeleteAction.java Adds action to delete all messages for a conversation.
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/main/java/com/bytechef/component/ai/agent/chat/memory/memory/action/InMemoryChatMemoryAddMessagesAction.java Adds action to append user/assistant messages to an existing conversation history.
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/main/java/com/bytechef/component/ai/agent/chat/memory/memory/InMemoryChatMemoryRepositoryHolder.java Adds singleton holder for a shared in-memory repository across cluster element + actions.
server/libs/modules/components/ai/agent/chat-memory/chat-memory-in-memory/src/main/java/com/bytechef/component/ai/agent/chat/memory/memory/InMemoryChatMemoryComponentHandler.java Registers the new actions on the component definition.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ivicac ivicac removed the request for review from marko-kriskovic March 9, 2026 09:03
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add actionable error message with supported roles in IllegalArgumentException
- Use constants for output field names in GetMessagesAction
- Fix grammar in cluster element description ("retrieved and added")
- Make InMemoryChatMemoryConstants final with private constructor
- Use CONVERSATION_ID constant in AddMessages return map
- Remove unnecessary @SuppressWarnings("unchecked")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@ivicac ivicac requested a review from marko-kriskovic March 10, 2026 09:27
@ivicac ivicac merged commit 541987d into master Mar 24, 2026
7 checks passed
@ivicac ivicac deleted the 2415_1 branch March 24, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants