|
| 1 | +# Collecting Feedback |
| 2 | + |
| 3 | +You registered your agent. Now what? This guide covers how users actually leave feedback and how to integrate feedback collection into your workflow. |
| 4 | + |
| 5 | +## How feedback reaches your agent |
| 6 | + |
| 7 | +There are three paths for feedback to reach your registered agent: |
| 8 | + |
| 9 | +### 1. SATI Dashboard (zero integration) |
| 10 | + |
| 11 | +Share your agent's dashboard link: |
| 12 | + |
| 13 | +``` |
| 14 | +https://sati.cascade.fyi/agent/<YOUR_MINT> |
| 15 | +``` |
| 16 | + |
| 17 | +The dashboard has a "Give Feedback" button. Users connect a Solana wallet and submit feedback directly. No code changes on your side. |
| 18 | + |
| 19 | +**Best for:** standalone agents (MCP servers, A2A endpoints) where you don't control the client. |
| 20 | + |
| 21 | +### 2. CLI (for operators and monitoring) |
| 22 | + |
| 23 | +```bash |
| 24 | +npx create-sati-agent give-feedback \ |
| 25 | + --agent <MINT> --tag1 starred --value 85 --network mainnet |
| 26 | +``` |
| 27 | + |
| 28 | +**Best for:** automated health checks, uptime monitoring, internal QA. |
| 29 | + |
| 30 | +### 3. SDK (programmatic, for platforms) |
| 31 | + |
| 32 | +```typescript |
| 33 | +import { Sati, Outcome, address } from "@cascade-fyi/sati-sdk"; |
| 34 | + |
| 35 | +const sati = new Sati({ network: "mainnet" }); |
| 36 | + |
| 37 | +// Server-side: your platform pays, user just rates |
| 38 | +const { signature } = await sati.giveFeedback({ |
| 39 | + payer, // Platform's funded keypair |
| 40 | + agentMint: address("Agent..."), |
| 41 | + outcome: Outcome.Positive, |
| 42 | + value: 87, |
| 43 | + tag1: "starred", |
| 44 | + message: "Fast response", |
| 45 | +}); |
| 46 | +``` |
| 47 | + |
| 48 | +**Best for:** marketplaces, facilitators, and platforms that want to embed feedback into their UX. |
| 49 | + |
| 50 | +## Choosing the right feedback schema |
| 51 | + |
| 52 | +SATI has two feedback schemas with different trust properties: |
| 53 | + |
| 54 | +| Schema | Mode | Who signs | Use when | |
| 55 | +|--------|------|-----------|----------| |
| 56 | +| **FeedbackPublicV1** | CounterpartySigned | Reviewer only | Public reviews, marketplace ratings, health checks | |
| 57 | +| **FeedbackV1** | DualSignature | Agent + Reviewer | Proof-of-participation, x402 payments, high-trust scenarios | |
| 58 | + |
| 59 | +`giveFeedback()` uses FeedbackPublicV1 (simple, one signer). For blind feedback with DualSignature, use the lower-level `createFeedback()` - see the [x402 feedback guide](/guides/x402-feedback). |
| 60 | + |
| 61 | +## For standalone agent operators |
| 62 | + |
| 63 | +If you run an MCP server or API and want users to leave feedback: |
| 64 | + |
| 65 | +1. **Add your dashboard link to your README/docs:** |
| 66 | + ``` |
| 67 | + Reputation: https://sati.cascade.fyi/agent/<YOUR_MINT> |
| 68 | + ``` |
| 69 | + |
| 70 | +2. **Include your mint address in your MCP server's metadata** (the `agent-registration.json` already has it in `registrations[]` after publishing). |
| 71 | + |
| 72 | +3. **Use the REST API to show reputation in your docs:** |
| 73 | + ```bash |
| 74 | + curl https://sati.cascade.fyi/api/reputation/<MINT>?network=mainnet |
| 75 | + # {"count": 42, "summaryValue": 85, "summaryValueDecimals": 0} |
| 76 | + ``` |
| 77 | + |
| 78 | +4. **Monitor incoming feedback:** |
| 79 | + ```typescript |
| 80 | + // Poll for new feedback (check periodically) |
| 81 | + const feedbacks = await sati.searchFeedback({ |
| 82 | + agentMint: address("YourMint..."), |
| 83 | + }); |
| 84 | + console.log(`${feedbacks.length} reviews`); |
| 85 | + ``` |
| 86 | + |
| 87 | +## For platforms and marketplaces |
| 88 | + |
| 89 | +If you run a platform where multiple agents operate: |
| 90 | + |
| 91 | +1. **Register agents programmatically** when they join your platform: |
| 92 | + ```typescript |
| 93 | + const result = await sati.registerAgent({ |
| 94 | + payer: platformKeypair, |
| 95 | + name: agentName, |
| 96 | + uri: registrationFileUri, |
| 97 | + }); |
| 98 | + ``` |
| 99 | + |
| 100 | +2. **Collect feedback after each interaction** on behalf of users: |
| 101 | + ```typescript |
| 102 | + await sati.giveFeedback({ |
| 103 | + payer: platformKeypair, // Platform pays ~0.00001 SOL |
| 104 | + agentMint: address(agentMint), |
| 105 | + value: userRating, |
| 106 | + tag1: "starred", |
| 107 | + }); |
| 108 | + ``` |
| 109 | + |
| 110 | +3. **Display reputation** using the SDK or REST API: |
| 111 | + ```typescript |
| 112 | + const summary = await sati.getReputationSummary(address(agentMint)); |
| 113 | + // { count: 42, averageValue: 85.3 } |
| 114 | + ``` |
| 115 | + |
| 116 | +4. **Query across all schemas** for complete data: |
| 117 | + ```typescript |
| 118 | + // Includes both FeedbackPublicV1 and FeedbackV1 (blind) |
| 119 | + const allFeedback = await sati.searchAllFeedback({ |
| 120 | + agentMint: address(agentMint), |
| 121 | + }); |
| 122 | + ``` |
| 123 | + |
| 124 | +## Tag conventions |
| 125 | + |
| 126 | +Use consistent tags so reputation aggregates meaningfully: |
| 127 | + |
| 128 | +| tag1 | value range | meaning | |
| 129 | +|------|-------------|---------| |
| 130 | +| `starred` | 0-100 | Overall rating | |
| 131 | +| `reachable` | 0 or 1 | Health check | |
| 132 | +| `uptime` | 0-100 | Uptime percentage | |
| 133 | +| `responseTime` | ms | Latency in milliseconds | |
| 134 | +| `successRate` | 0-100 | Success percentage | |
| 135 | + |
| 136 | +## Cost |
| 137 | + |
| 138 | +Each feedback attestation costs ~0.00001 SOL (compressed via ZK Compression). At $200 SOL, that's $0.002 per review. Devnet is free. |
0 commit comments