Skip to content

Implemented the full long-term and short-term memory module and skills#153

Merged
Myriad-Dreamin merged 8 commits intoEmaFanClub:mainfrom
Disviel:memory
Feb 14, 2026
Merged

Implemented the full long-term and short-term memory module and skills#153
Myriad-Dreamin merged 8 commits intoEmaFanClub:mainfrom
Disviel:memory

Conversation

@Disviel
Copy link
Copy Markdown
Contributor

@Disviel Disviel commented Feb 8, 2026

This pull request introduces significant improvements to both the frontend and backend of the EMA chat system. The main focus is on updating the message type system to use a more expressive ConversationMessage type throughout the UI and API, and on refactoring the ActorWorker backend class to simplify buffer management, improve message handling, and enhance extensibility. Additionally, the system prompt for the actor has been substantially rewritten for clarity, structure, and better alignment with the intended conversational experience.

Frontend and API Type Updates:

  • Standardized the message type used in the chat UI and API from the generic Message to the more descriptive ConversationMessage, ensuring consistency and enabling richer message representation. [1] [2] [3] [4] [5] [6] [7] [8]

Backend Refactor: ActorWorker and Buffer Management:

  • Refactored the ActorWorker class to remove legacy memory and state management interfaces, instead delegating buffer operations to a unified memoryManager on the Server instance. This streamlines buffer writes and retrieval, and simplifies the constructor and internal logic. [1] [2] [3] [4]
  • Improved agent run resumption logic to handle incomplete message histories more robustly, including the injection of system messages when user interruptions are detected.
  • Enhanced logging and constructor parameter handling for easier debugging and future extensibility.

System Prompt Overhaul:

  • Completely rewrote system_prompt.md to clarify system objectives, constraints, reply guidelines, skills usage, memory policies, and role profile. The new version is more structured, easier to maintain, and better aligned with the product's conversational goals.

Summary of Most Important Changes:

Frontend/API Consistency

  • Replaced all uses of Message with ConversationMessage in API routes and React components, ensuring a consistent and extensible message structure across the UI and backend. [1] [2] [3] [4] [5] [6] [7] [8]

Backend Refactor and Message Handling

  • Refactored ActorWorker to use a centralized memoryManager for buffer operations, simplifying buffer writes and reads and removing legacy state/memory management code. [1] [2] [3] [4]
  • Improved agent run resumption logic to handle incomplete message histories and user interruptions, injecting system messages as needed for context continuity.

System Prompt Improvements

  • Overhauled system_prompt.md for clarity, structure, and alignment with the intended conversational experience, including explicit objectives, constraints, reply guidelines, memory policy, and role profile.

@Disviel Disviel changed the title Memory Implemented the full long-term and short-term memory module and skills Feb 13, 2026
@Disviel Disviel marked this pull request as ready for review February 13, 2026 03:10
@Myriad-Dreamin Myriad-Dreamin merged commit 535ee75 into EmaFanClub:main Feb 14, 2026
3 checks passed
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.

2 participants