Skip to content

[FEAT] Group Chat Support #1384

Description

@Diluka

Is your feature request related to a problem? Please describe.

Feature Request: Group Chat Support

The current API has userId and conversationId fields, suggesting multi-user
conversation support. However, testing shows that userId isolates message
histories — different users in the same conversationId cannot see each other's
messages.

Test Results

Test with conversationId: "team-chat":

Step User AI Response
alice says "I love Rust!" "Got it, Alice — your favorite language is Rust." ✅
bob asks "What did Alice say?" "I can't see your chat history, so I don't know what Alice said."
alice says "Bob asked about me?" "Yes, I remember — you're Alice and your favorite language is Rust." ✅

Bob cannot see Alice's messages even though they share the same
conversationId.

Request

We need a way to have multiple users share the same conversation context with
the AI — a true group chat mode where all messages in a conversation are visible
to all participants, and userId only identifies who spoke rather than which
isolated history to load.

Describe alternatives you've considered

If we do not consider the scenario of transitioning from a single-user session to a multi-user session, then multi-user sessions do not need to be stored in the same table as single-user sessions. Multi-user sessions can be enabled via a toggle, and a custom text wrapper may be required to format the utterances of different participants for the AI.

Additional context

import { Agent, InMemoryStorageAdapter, Memory } from '@voltagent/core';

const memory = new Memory({
  storage: new InMemoryStorageAdapter(),
});

const agent = new Agent({
  name: 'Assistant',
  instructions: 'You are a helpful assistant. Be concise.',
  model: 'openai/gpt-5-mini',
  memory,
});

// ===== Proof: userId isolates message history =====
// All users share the same conversationId, but cannot see each other's messages.

// ① Alice shares a fact
const r1 = await agent.generateText('I love Rust!', {
  memory: { conversationId: 'team-chat', userId: 'alice' },
});
console.log('Alice says:', r1.text);

// ② Bob joins the same conversation and asks about Alice's message
const r2 = await agent.generateText('What did Alice just say?', {
  memory: { conversationId: 'team-chat', userId: 'bob' },
});
console.log('Bob asks:', r2.text);

// ③ Alice speaks again, referencing Bob's question
const r3 = await agent.generateText('Bob asked about me, right?', {
  memory: { conversationId: 'team-chat', userId: 'alice' },
});
console.log('Alice again:', r3.text);

Describe the thing to improve

Use Cases

  • Team AI assistant in shared channels
  • Customer support conversations
  • Collaborative brainstorming
  • Multiplayer role-playing with AI

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions