spacedriveapp / spacedriveapp/spacebot

Universal Memory Gap: Discord & Telegram conversations not committed to the agent's memory

Open
#363 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.4k
Forks
367
PR merge metrics
No merged PRs in 30d

Description

Labels

bug
architecture
memory-system
high-priority
discord
telegram
Body

🚨 Problem Statement

All messaging adapters (Discord, Telegram, webchat) successfully process messages and agents generate responses, but conversations are NOT committed to the agents memory system.

Impact
  • ❌ Loss of context across platform switches (Telegram β†’ Webchat = no recall)
  • ❌ No cross-session persistence within platforms
  • ❌ Discord conversations invisible to Telegram context
  • ❌ Prevents true multi-platform coordination

πŸ§ͺ Evidence from Both Platforms

Discord Integration
  • βœ… Status: Working (bot online, responds to @mentions, 12 channel bindings configured)
  • ❌ Memory: NO Discord conversations appear in agent memory
  • πŸ” Test: User asks question in Discord #heads β†’ agent responds β†’ User asks same topic in Webchat β†’ agent has zero memory: "I don't have context from Discord"
Telegram Integration
  • βœ… Status: Working (bot responds, single-bot configuration successful)
  • ❌ Memory: NO Telegram conversations appear in agent memory
  • πŸ” Test: User messages bot in Telegram β†’ Nexus responds with personality β†’ Webchat query about Telegram conversation β†’ agent cannot recall: "What Telegram conversation?"
Webchat Integration
  • βœ… Status: Working (primary channel, all messages route correctly)
  • βœ… Memory: Working (our current conversation is resident in memory)
  • Note: Webchat appears to have implicit memory_save() lifecycle hooks

πŸ” Root Cause Analysis

Current Message Flow (Broken)

User Message β†’ Adapter β†’ Agent β†’ Response Sent ↓ ❌ NO memory_save() call

Required Message Flow (Fixed)

User Message β†’ Adapter β†’ Agent β†’ Response Sent ↓ βœ… memory_save() β†’ agent Cortex β†’ Persistent Storage

Adapters lack memory_save() hooks after agent responses complete. The Discord, Telegram, and (likely) other adapters commit to agent cortex processing but do not persist the conversation transcript to long-term memory.


🎯 Platform-Specific Architecture Context

Discord: Multi-Bot Required
  • Architecture: Each agent needs distinct bot identity (agent#3891, pm-ten-offset-yield, etc.)
  • Routing: @mentions route to specific bot users
  • Tokens: Multiple bot tokens required
  • Status: βœ… Multi-bot architecture implemented, working
Telegram: Single-Bot Router
  • Architecture: One bot (@ConvergenceBot) with slash command routing
  • Routing: Commands /nexus, /offset, /orchestrator route to agents
  • Tokens: Single bot token sufficient
  • Status: βœ… Single bot working, default routing functional
Common Gap

Both architectures successfully route messages but neither commits conversations to agent memory.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up β€” it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the Discord and Telegram messaging adapters through agent response handling, then compare their lifecycle with webchat's memory_save() behavior. Verify where conversations enter agent Cortex and persistent storage. Done means Discord and Telegram transcripts are persisted and can be recalled across platforms and sessions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.