Portal Community

Quick Reply Buttons

The agent can include quick reply suggestions in its response. These render as clickable buttons below the message. Clicking one sends the suggestion text as the user's next message:

// Agent response with quick replies (returned via the show_card MCP tool)
{
  "content": "What would you like to do next?",
  "quick_replies": [
    { "label": "Check my leave balance",   "value": "What is my leave balance?" },
    { "label": "Submit a leave request",   "value": "I want to submit a leave request" },
    { "label": "Talk to HR",               "value": "Connect me to HR" }
  ]
}

show_card Tool — Rich Cards

The show_card MCP tool (registered by ChatbotUIPlugin) renders structured UI cards in the chat — tables, forms, image galleries, and action panels:

// Call show_card from an agent's MCP tool handler
var cardJson = JsonSerializer.Serialize(new
{
    type  = "info-card",
    title = "Your Leave Balance",
    items = new[]
    {
        new { label = "Annual Leave",  value = "15 days",  icon = "calendar" },
        new { label = "Sick Leave",    value = "8 days",   icon = "medical" },
        new { label = "Unpaid Leave",  value = "Unlimited",icon = "info" }
    },
    actions = new[]
    {
        new { label = "Submit Request", type = "primary",   value = "submit_request" },
        new { label = "View History",   type = "secondary", value = "view_history" }
    }
});
return cardJson;

File Upload

Enable file upload with 'file-upload' in allowedActions. The user selects a file from their device; the widget uploads it to the server and inserts a file reference into the conversation context:

// POST /api/chat/{sessionId}/upload
// Content-Type: multipart/form-data

// Response:
{
  "file_id":    "file-abc123",
  "filename":   "invoice.pdf",
  "size_bytes": 128540,
  "mime_type":  "application/pdf",
  "url":        "/api/files/file-abc123"
}

// The widget then sends a message like:
// "I've uploaded a file: [invoice.pdf](file-abc123)"

Feedback (Thumbs Up/Down)

When 'feedback' is in allowedActions, a thumbs up / thumbs down button appears under each agent message after it completes. Feedback is posted to:

POST /api/chat/{sessionId}/feedback
{
  "message_id": "msg-004",
  "rating":     1,            // 1 = thumbs up, -1 = thumbs down
  "comment":    "Very helpful!"  // Optional
}

Copy to Clipboard

When 'copy' is in allowedActions, a copy icon appears on hover over agent messages. The full message text (including markdown) is copied to the clipboard. The widget confirms with a brief "Copied!" tooltip.

Action Configuration Table

ActionKey in allowedActionsWhat It Does
Quick replies'quick-replies'Renders suggestion buttons from agent responses
File upload'file-upload'Paper clip button in input bar; uploads to server
Thumbs up/down'feedback'Rating buttons under completed agent messages
Copy'copy'Copy icon on agent messages
Regenerate'regenerate'Re-sends the last user message to get a new response