Skip to content

feat(openclaw): add dynamic per-channel memory banks#290

Merged
nicoloboschi merged 1 commit intovectorize-io:mainfrom
slayoffer:feat/openclaw-dynamic-banks
Feb 4, 2026
Merged

feat(openclaw): add dynamic per-channel memory banks#290
nicoloboschi merged 1 commit intovectorize-io:mainfrom
slayoffer:feat/openclaw-dynamic-banks

Conversation

@slayoffer
Copy link
Contributor

Summary

Add per-channel memory isolation for the OpenClaw plugin. Each communication channel (Slack, Telegram, Discord, etc.) gets its own memory bank, preventing memory leakage between channels.

Problem

All channels share a single openclaw bank, causing:

  • Memory leakage between channels
  • Privacy concerns in multi-tenant deployments
  • Cross-channel context confusion

Solution

  • Derive bank ID from channel context: {messageProvider}-{channelId}
  • Example bank IDs: slack-C08ABC123, telegram-456789
  • Bank mission is set on first use per dynamic bank
  • Configurable via dynamicBankId (default: true) and bankIdPrefix

Configuration

{
  "dynamicBankId": true,
  "bankIdPrefix": "prod"
}

Results in bank IDs like prod-slack-C123

Test plan

  • TypeScript builds successfully
  • Unit tests pass
  • Manual test with multiple channels

🤖 Generated with Claude Code

Copy link
Collaborator

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

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

+1

@slayoffer can you rebase and resolve conflicts?

Add support for per-channel memory isolation in OpenClaw plugin.
Each channel (Slack, Telegram, Discord, etc.) gets its own memory bank,
preventing memory leakage between channels.

Changes:
- Add deriveBankId() to create channel-specific bank IDs
- Bank ID format: {messageProvider}-{channelId} (e.g., slack-C123)
- Add getClientForContext() for context-aware client access
- Update hook handlers to (event, ctx) signature
- Set bank mission on first use per dynamic bank
- Add dynamicBankId and bankIdPrefix config options

Configuration:
- dynamicBankId: true (default) enables per-channel isolation
- bankIdPrefix: optional prefix for namespacing (e.g., "prod")

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@slayoffer slayoffer force-pushed the feat/openclaw-dynamic-banks branch from 1c0739c to 476c27b Compare February 4, 2026 09:51
@slayoffer
Copy link
Contributor Author

+1

@slayoffer can you rebase and resolve conflicts?

@nicoloboschi Hey! Done

Copy link
Collaborator

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

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

LGTM

@nicoloboschi nicoloboschi merged commit 9a776e9 into vectorize-io:main Feb 4, 2026
18 of 26 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