Skip to content

Add Feedback Creation #32

@Dawe000

Description

@Dawe000

Add Feedback Creation

Description

Add the ability to create and submit feedback for agents directly from the agent detail page (/agents/[agentId]), allowing users to rate and review agents using the Agent0 SDK.

Requirements

  • Feedback Creation UI:
    • Add "Give Feedback" button/option on the agent detail page (visible to all users, not just owners)
    • Open feedback creation modal/dialog when clicked
    • Form fields for:
      • Score (0-100 scale, with slider or input)
      • Tag 1 (optional, text input or dropdown)
      • Tag 2 (optional, text input or dropdown)
      • Endpoint (optional, for specific endpoint feedback)
      • Text feedback (optional, textarea for detailed comments)
      • Rich fields (optional, collapsible section):
        • Capability (MCP: prompts, resources, tools, completions)
        • Name (MCP tool/resource name)
        • Skill (A2A skill)
        • Task (A2A task)
        • Context (JSON object for additional context)
        • Proof of Payment (transaction hash, amount)
    • Form validation (score must be 0-100, required fields)
    • Clear labels and help text for each field
  • Wallet Connection:
    • Require wallet connection to submit feedback
    • Wallet connection: Depends on Create Universal Wallet Connection Interface #33 (Universal Wallet Connection Interface)
    • Show "Connect Wallet" prompt if not connected
    • Verify user is on correct chain (must match agent's chain)
  • Submission:
    • Use Agent0 SDK's giveFeedback() method
    • Handle both on-chain only and off-chain feedback file scenarios
    • Show transaction status (pending, success, error)
    • Display transaction hash with link to block explorer
    • Poll for transaction confirmation
    • Show success message after submission
    • Close modal and refresh feedback data after successful submission
  • Error Handling:
    • Handle chain mismatch errors (guide user to switch chains)
    • Handle insufficient funds errors
    • Handle transaction failures with retry option
    • Show clear, user-friendly error messages
    • Handle network errors gracefully
  • UI/UX:
    • Use existing component library (shadcn/ui) for consistency
    • Loading states during submission
    • Disable form during submission
    • Clear form after successful submission
    • Responsive design for mobile

Technical Notes

  • Use Agent0 SDK methods:
    • prepareFeedbackFile() for off-chain feedback when rich fields are provided
    • giveFeedback(agentId, score, tag1?, tag2?, endpoint?, feedbackFile?) to submit feedback
  • Ensure wallet is connected to the same chain as the agent
  • Handle IPFS upload for feedback files (if IPFS configured in SDK)
  • On-chain fields: score, tag1, tag2, endpoint
  • Off-chain fields (via feedback file): text, capability, name, skill, task, context, proofOfPayment
  • Use wagmi hooks for transaction monitoring

Potential Sub-issues

  • Feedback creation form and modal UI
  • Wallet connection integration and chain verification
  • Transaction status tracking for feedback submission
  • Error handling and user feedback
  • Rich feedback fields (collapsible section for optional fields)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions