Chat Sessions — Persistent Conversational Chat with Agents
Why
Lower friction interaction with agents. Currently users must create a session, send a message, poll for transcript. Chat sessions make it feel like iMessage — open a conversation, type, get a response. No setup, no babysitting.
Concept
- A Chat Session is a persistent conversation between a user and an agent
- Messages go back and forth naturally (user → agent → user)
- Each chat message creates an agent task in the background
- Chat sessions persist across messages, like a messaging thread
DB Schema
CREATE TABLE chat_session (
id TEXT PRIMARY KEY,
workspace_id TEXT NOT NULL,
agent_key TEXT NOT NULL,
creator_id TEXT NOT NULL,
title TEXT NOT NULL DEFAULT '',
status TEXT NOT NULL DEFAULT 'active' CHECK(status IN ('active', 'archived')),
created_at TEXT NOT NULL DEFAULT (datetime('now')),
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
);
CREATE TABLE chat_message (
id TEXT PRIMARY KEY,
chat_session_id TEXT NOT NULL REFERENCES chat_session(id) ON DELETE CASCADE,
role TEXT NOT NULL CHECK(role IN ('user', 'assistant')),
content TEXT NOT NULL,
task_id TEXT, -- links to agent task if applicable
created_at TEXT NOT NULL DEFAULT (datetime('now'))
);
API Endpoints
POST /v1/chat — create chat session (pick agent)
GET /v1/chat — list user chat sessions
GET /v1/chat/:id — get session with messages
POST /v1/chat/:id/messages — send message (triggers agent response)
DELETE /v1/chat/:id — archive session
PATCH /v1/chat/:id — update title
Real-time
- SSE events for new chat messages
- Typing indicator when agent is processing
- Session read/unread state
Frontend
- Chat page: session list sidebar + message thread
- Message bubbles: user on right, agent on left
- Input bar at bottom with send button
- New chat button: pick agent, start conversation
Acceptance Criteria
Reference
Competitive analysis: references/multica-competitive-analysis.md §2.4
Chat Sessions — Persistent Conversational Chat with Agents
Why
Lower friction interaction with agents. Currently users must create a session, send a message, poll for transcript. Chat sessions make it feel like iMessage — open a conversation, type, get a response. No setup, no babysitting.
Concept
DB Schema
API Endpoints
POST /v1/chat— create chat session (pick agent)GET /v1/chat— list user chat sessionsGET /v1/chat/:id— get session with messagesPOST /v1/chat/:id/messages— send message (triggers agent response)DELETE /v1/chat/:id— archive sessionPATCH /v1/chat/:id— update titleReal-time
Frontend
Acceptance Criteria
npm run gatepassesReference
Competitive analysis:
references/multica-competitive-analysis.md§2.4