Skip to content

Implement multi-participant real-time chat backend #468

Description

@AlbertCorry

Summary

NLWeb currently supports single-user conversational search via /ask, but there is no backend for real-time multi-participant chat rooms where multiple humans and an AI assistant exchange messages concurrently.

Expected behavior

  • Users can create conversations, join/leave rooms, and send messages over WebSocket
  • AI responses are generated through the existing NLWeb query pipeline (handler wrapped, not modified)
  • Messages receive strictly ordered sequence IDs under concurrent writes
  • Single human + AI: direct routing to AI (no broadcast overhead)
  • Multiple humans: broadcast to all participants; AI receives context from recent human and AI messages
  • REST endpoints for conversation lifecycle; WebSocket for real-time messaging
  • Per-conversation queue limits and participant capacity with appropriate HTTP errors (e.g. 429)
  • In-memory storage backend for development/testing

Context

The repository contains extensive test specifications and API documentation for this chat system under tests/ and .claude/, but the AskAgent/python/chat/ implementation is not yet present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions