Agent Feedback

A comprehensive feedback component for collecting user ratings and detailed feedback on agent responses with category selection and reporting functionality.

Features

  • Quick Feedback: Simple thumbs up/down for immediate feedback
  • Detailed Categories: Select specific feedback categories (accuracy, helpfulness, speed, clarity)
  • Comment Section: Optional text feedback for detailed input
  • Report Functionality: Flag problematic content with detailed reasons
  • Expandable Interface: Collapsible detailed feedback section
  • Success Confirmation: Visual feedback after submission
  • Flexible Modes: Quick actions only or full feedback form

Examples

Full Feedback Form

Complete feedback interface with categories and reporting.

Was this response helpful?

Simple Feedback

Quick feedback with thumbs up/down only.

Was this response helpful?

Installation

npx shadcn add "https://agents-ui-kit.com/c/agent-feedback.json"

API Reference

AgentFeedback

PropTypeDefaultDescription
onSubmit(feedback: FeedbackData) => void-Callback when feedback is submitted
onThumbsUp() => void-Callback for quick thumbs up
onThumbsDown() => void-Callback for quick thumbs down
onReport(reason: string) => void-Callback for content reporting
showDetailedFeedbackbooleantrueShow expandable detailed feedback
showQuickActionsbooleantrueShow thumbs up/down buttons
defaultExpandedbooleanfalseStart with detailed view expanded
classNamestring-Additional CSS classes

FeedbackData

PropertyTypeRequiredDescription
typeFeedbackTypeYesFeedback sentiment
ratingnumberNoNumeric rating (future feature)
categoriesFeedbackCategory[]NoSelected feedback categories
commentstringNoOptional text feedback
timestampDateNoSubmission timestamp

FeedbackType

type FeedbackType = "positive" | "negative" | "neutral"

FeedbackCategory

type FeedbackCategory = "accuracy" | "helpfulness" | "speed" | "clarity" | "other"

Category Descriptions

  • Accuracy: Information was correct and factual
  • Helpfulness: Response addressed the user's needs
  • Speed: Response was delivered quickly
  • Clarity: Response was easy to understand
  • Other: Additional feedback not covered by categories