Chat Messages
Messages are exchanged with Aurora’s AI agent through WebSocket connections for real-time streaming responses. Use HTTP endpoints for session management and WebSocket for live chat interactions.Message Structure
Messages in Aurora follow a consistent structure for both user and assistant messages.User Messages
Always “user” for messages from the user
Message text content. Can include:
- Natural language instructions
- Questions about infrastructure
- Commands for cloud operations
- File attachment context (auto-appended)
Attached images for multimodal messages (supports image analysis)
Assistant Messages
Always “assistant” for AI responses
Response text with markdown formatting
Multimodal Messages
Aurora supports multimodal messages with images for visual analysis.Sending Images
Images are sent as part of the message content in data URL format:Array of file attachments
Original filename
MIME type (image/png, image/jpeg, application/pdf)
Base64-encoded file data (without data URL prefix for images)
Whether file_data is a server path reference
Server-side file path (for large files like ZIP archives)
Supported File Types
- Images: PNG, JPEG, GIF, WebP (for visual analysis)
- Documents: PDF (text extraction)
- Archives: ZIP (server-side processing)
Image Processing
When messages with images are retrieved:- Data URLs are parsed and split into components
- Images are extracted into
imagesarray - Text content is separated from image data
- Each image includes:
displayData- Full data URL for renderingtype- MIME typedata- Base64-encoded image dataname- Generated filename
Message Context
Aurora maintains conversation context across messages:Context Management
Complete conversation history sent to LLM
- Includes all user and assistant messages
- Contains tool call results
- Used for context-aware responses
Simplified messages for UI display
- User-facing message format
- Excludes internal tool details
- Shown in chat interface
Token Management
Messages are subject to token limits:- Input limit: 20,000 tokens per user message (~80,000 characters)
- Context window: Managed automatically by Aurora
- Token counting: Validated before processing
Message Streaming
Messages are streamed in real-time via WebSocket. See WebSocket Protocol for details on:- Sending chat messages
- Receiving streamed responses
- Handling tool call events
- Managing session state
Auto-Generated Titles
Session titles are auto-generated from the first user message:- Extracts first 50 characters of first user message
- Trims to last complete word
- Appends ”…” if truncated
- Defaults to “New Chat” if no user message exists
Best Practices
Message Composition
- Be specific with cloud resource requirements
- Include region/zone information when relevant
- Provide context for multi-step operations
- Reference previous messages naturally
Attachments
- Optimize images before uploading (< 5MB recommended)
- Use PNG for diagrams, JPEG for photos
- Include descriptive filenames
- Attach relevant context files
Error Handling
- Check token count for large messages
- Validate file formats before uploading
- Handle WebSocket disconnections gracefully
- Retry failed operations with exponential backoff
Message Lifecycle
- Compose - User creates message with text/attachments
- Validate - Token count and format validation
- Send - Transmitted via WebSocket
- Process - Aurora agent analyzes and executes
- Stream - Response streamed back in chunks
- Store - Messages persisted in session
- Display - Rendered in chat UI