Skip to content

Multiple Labeled Sessions in Webchat #26517

@vicentedeandrade

Description

@vicentedeandrade

Summary

Enable multiple isolated chat sessions in the webchat interface, each with custom agent-defined labels that appear in the session selector dropdown.

Problem to solve

Current Limitation

  • Webchat supports only 1 main session per agent
  • All browser tabs share the same conversation history
  • Switching contexts (Zabbix → Ansible → General topics) mixes everything in one timeline
  • No way to organize conversations by project/topic/context

Proposed solution

Session Storage

Option A: Session-scoped history

sessions/
├─ main/                          # Default session
│   └─ history.jsonl
├─ zabbix-d4f2/              # Labeled session
│   ├─ history.jsonl
│   └─ metadata.json             # {label: "Zabbix Integration"}
└─ ansible-cfgs-8a1c/
    ├─ history.jsonl
    └─ metadata.json

Option B: Single history with session tags

{"sessionId": "main", "role": "user", "content": "..."}
{"sessionId": "zabbix-d4f2", "role": "assistant", "content": "..."}

UI Changes

Webchat Interface:

┌─────────────────────────────────────────┐
│ [Webchat (Zabbix) ▼]  [+ New]      │
├─────────────────────────────────────────┤
│ User: Configure Zabbix LLD              │
│ Jarvis: Sure! Let's set up...           │
│ ...                                     │
└─────────────────────────────────────────┘

Dropdown Menu:

┌─────────────────────────────────┐
│ ● Webchat (Zabbix)         │ ← Active
│   Webchat (Ansible Playbooks)  │
│   Webchat (General)             │
│ ─────────────────────────────── │
│ + Create New Session            │
└─────────────────────────────────┘

Agent Tool API

interface SessionLabelTool {
  action: "set" | "get" | "create";
  label?: string;        // For set/create
  sessionId?: string;    // Optional target session
}

// Example usage in agent
await session_label_set({ action: "set", label: "Zabbix Integration" });

Backward Compatibility

  • Default session remains main (no breaking changes)
  • Existing single-session behavior preserved
  • Opt-in feature (users create additional sessions)

Alternatives considered

No response

Impact

Similar Features in Other Tools

  • ChatGPT: Multiple conversations with titles
  • Claude: Conversation organization
  • Cursor IDE: Multiple chat panels per project
  • Discord: Multiple channels (but those are shared)

Evidence/examples

No response

Additional information

Benefits

  1. 1000x Productivity Gain

    • Context switching without pollution
    • Clear mental model (1 chat = 1 topic)
    • Easier to resume work days/weeks later
  2. Better Agent Performance

    • Focused context per session
    • Less noise in conversation history
    • Agent can maintain topic-specific state
  3. Improved UX

    • Visual organization (labeled tabs/dropdown)
    • Quick context switching
    • History preserved per topic
  4. Scalability

    • Power users can manage 10+ concurrent projects
    • Teams can share session patterns
    • Enables specialized workflows

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions