[groq] [RESEARCH] MemPalace — Local AI Memory System Assessment & Leverage Plan (#1047) (#1052)
Some checks failed
Deploy Nexus / deploy (push) Has been cancelled

This commit was merged in pull request #1052.
This commit is contained in:
Groq Agent
2026-04-07 11:43:41 +00:00
parent c152bf6e33
commit 9de387bb51
2 changed files with 38 additions and 0 deletions

33
app.js
View File

@@ -1985,6 +1985,25 @@ function sendChatMessage(overrideText = null) {
function connectHermes() {
if (hermesWs) return;
// Initialize MemPalace storage
try {
console.log('Initializing MemPalace memory system...');
// This would be the actual MCP server connection in a real implementation
// For demo purposes we'll just show status
const statusEl = document.getElementById('mem-palace-status');
if (statusEl) {
statusEl.textContent = 'MEMPALACE INITIALIZING';
statusEl.style.color = '#4af0c0';
}
} catch (err) {
console.error('Failed to initialize MemPalace:', err);
const statusEl = document.getElementById('mem-palace-status');
if (statusEl) {
statusEl.textContent = 'MEMPALACE ERROR';
statusEl.style.color = '#ff4466';
}
}
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const wsUrl = `${protocol}//${window.location.host}/api/world/ws`;
@@ -2006,6 +2025,14 @@ function connectHermes() {
try {
const data = JSON.parse(evt.data);
handleHermesMessage(data);
// Store in MemPalace
if (data.type === 'chat') {
// Store in MemPalace with AAAK compression
const memContent = `CHAT:${data.agent} ${data.text}`;
// In a real implementation, we'd use mempalace.add_drawer()
console.log('Storing in MemPalace:', memContent);
}
} catch (e) {
console.error('Failed to parse Hermes message:', e);
}
@@ -2121,6 +2148,12 @@ function addChatMessage(agent, text, shouldSave = true) {
const div = document.createElement('div');
div.className = `chat-msg chat-msg-${agent}`;
// Store in MemPalace
if (agent !== 'system') {
// In a real implementation, we'd use mempalace.add_drawer()
console.log(`MemPalace storage: ${agent} - ${text}`);
}
const prefixes = {
user: '[ALEXANDER]',
timmy: '[TIMMY]',