Writers Room Stream
POST /api/chat/writers-room/stream
Writers’ Room: stream responses from all three agents concurrently.
Fans out the user message to Ishvana, Hawken, and Lagan in parallel.
Each SSE chunk includes an agentUsed field so the frontend can
attribute content to the correct agent. A final {"type": "complete"}
event is sent after all agents finish.
Request Body required
Section titled “Request Body required ”Enhanced chat interaction request model with advanced features.
Request model for advanced chat interactions supporting conversation threading, agent selection, persona/stance control, and targeted RAG document pinning. Uses IshvanaBaseModel for automatic snake_case → camelCase JSON conversion.
Fields: message: User’s chat message content project_id: Project context identifier (default: “my-project”) conversation_id: Existing thread ID to continue conversation (optional) agent_type: Preferred agent specialization (default: “general”) use_rag: Whether to use RAG for context retrieval (default: True) temperature: LLM temperature for creativity (default: 0.7, range: 0.0-2.0) max_tokens: Maximum tokens in AI response (default: 2048) search_results_count: Number of RAG results to retrieve (default: 10) persona: AI persona to adopt (e.g., ‘Lore Scholar’, ‘Creative Editor’) stance: Response stance (e.g., ‘brainstorming’, ‘critical’, ‘analytical’) pinned_document_ids: Specific documents to prioritize in RAG search requested_at: Timestamp when request was created (auto-generated)
Persona Examples: - ‘Lore Scholar’: Deep lore expert, analytical and precise - ‘Creative Editor’: Collaborative writing partner, supportive and creative - ‘World Historian’: Detail-oriented worldbuilding assistant - ‘Technical Writer’: Documentation and structure expert
Stance Examples: - ‘brainstorming’: Exploratory, idea-generating, open-ended - ‘critical’: Analytical, evaluative, constructive feedback - ‘analytical’: Detailed analysis, structured thinking - ‘supportive’: Encouraging, collaborative, affirming
Used By: - POST /api/chat/enhanced endpoint - Enhanced chat UI with persona/stance controls - Threaded conversation management - Targeted RAG document exploration - Dynamic AI voice adjustment
object
User message
Preferred agent type
Use RAG for context
LLM temperature
Maximum tokens
RAG search results
Base64-encoded image attached to a chat message.
object
MIME type (image/png, image/jpeg, image/gif, image/webp)
Base64-encoded image data
Ambient author context attached to a freeform agent request.
Writers’ Room multi-agent mode
Skip user message persistence (used by WR to avoid duplicates)
Enhanced chat request timestamp
Responses
Section titled “ Responses ”Successful Response
Validation Error