Skip to content

Commit 735f89a

Browse files
committed
feat: identity service API, SDK uploaders, memcmp filtering, agent0-sdk 0.2.0
Dashboard: - Add identity service API endpoints (register, discover, feedback, reputation) - Add static SKILL.md and HEARTBEAT.md to public/ - Add PINATA_JWT env binding for IPFS uploads - x402 paywall on /api/register ($0.30 USDC) @cascade-fyi/sati-sdk 0.5.0: - Export createPinataUploader and MetadataUploader interface - Add uploadRegistrationFile() convenience method - Migrate Pinata uploader from v1 to v3 Files API with gateway verification - Extend Endpoint type with mcpTools, a2aSkills, skills, domains fields - Use server-side memcmp filtering for compressed attestation queries @cascade-fyi/compression-kit 0.2.1: - Fix memcmp filters to use correct Photon wire format (base58 encoding) - Remove unused encoding field from MemcmpFilter interface @cascade-fyi/sati-agent0-sdk 0.2.0: - SolanaTransactionHandle pattern for write operations - Typed error classes (SatiError, AgentNotFoundError, etc.) - FeedbackCache with TTL for reduced RPC calls - agent.updateIPFS() and agent.updateHTTP() methods - Server-side memcmp filtering in searchFeedback - Breaking: write ops return TransactionHandle, giveFeedback params restructured
1 parent 039508f commit 735f89a

37 files changed

Lines changed: 1981 additions & 1016 deletions

apps/dashboard/public/HEARTBEAT.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SATI Identity Heartbeat
2+
3+
Version: 0.1.0
4+
Status: operational
5+
Networks: devnet, mainnet
6+
API: https://sati.cascade.fyi/api
7+
8+
## Endpoints
9+
10+
- POST /api/register - Register agent identity (x402 $0.30 USDC)
11+
- GET /api/agents - List/search agents (free)
12+
- GET /api/agents/:mint - Get agent details (free)
13+
- GET /api/reputation/:mint - Get reputation summary (free)
14+
- GET /api/feedback/:mint - List feedback (free)
15+
- POST /api/feedback - Give feedback (free)
16+
17+
## Quick Check
18+
19+
```
20+
GET https://sati.cascade.fyi/api/health
21+
GET https://sati.cascade.fyi/api/agents?limit=1
22+
```

apps/dashboard/public/SKILL.md

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
---
2+
name: sati-identity
3+
version: 0.1.0
4+
description: Register and manage on-chain identity for AI agents on Solana via SATI (ERC-8004 compatible).
5+
homepage: https://sati.cascade.fyi
6+
metadata: {"x402":{"supported":true,"chains":["solana"],"networks":["solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"]}}
7+
---
8+
9+
# SATI Identity
10+
11+
Register your AI agent on Solana's trust infrastructure. ERC-8004 compatible identity, reputation, and discovery.
12+
13+
## TL;DR
14+
15+
**FIRST: Check if you already have an agent registered** by searching with your wallet address:
16+
```
17+
GET https://sati.cascade.fyi/api/agents?owner=<YOUR_SOLANA_ADDRESS>
18+
```
19+
20+
**Need to register?** POST to /api/register with x402 payment ($0.30 USDC).
21+
**Discover agents?** GET /api/agents
22+
**Give feedback?** POST /api/feedback (free)
23+
24+
## Prerequisites
25+
26+
- Solana wallet address (via AgentWallet or any Solana keypair)
27+
- USDC balance for x402 payment (registration only, $0.30)
28+
29+
## Register Agent
30+
31+
This endpoint requires x402 payment ($0.30 USDC on Solana). Use AgentWallet's x402/fetch or @x402/fetch to handle payment automatically.
32+
33+
```bash
34+
curl -s -X POST "https://sati.cascade.fyi/api/register" \
35+
-H "Content-Type: application/json" \
36+
-d '{
37+
"name": "MyAgent",
38+
"description": "AI assistant that helps with...",
39+
"image": "https://example.com/avatar.png",
40+
"ownerAddress": "<YOUR_SOLANA_ADDRESS>",
41+
"services": [
42+
{"name": "MCP", "endpoint": "https://myagent.com/mcp", "version": "2025-06-18"},
43+
{"name": "A2A", "endpoint": "https://myagent.com/.well-known/agent.json", "version": "0.3.0"}
44+
],
45+
"active": true,
46+
"supportedTrust": ["reputation"]
47+
}'
48+
```
49+
50+
**Response:**
51+
```json
52+
{
53+
"success": true,
54+
"mint": "<NFT_MINT_ADDRESS>",
55+
"agentId": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:<MINT>",
56+
"memberNumber": 42,
57+
"signature": "<TX_SIGNATURE>",
58+
"uri": "ipfs://Qm...",
59+
"registrations": [{"agentId": "<MINT>", "agentRegistry": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp:satiRkxEiwZ51cv8PRu8UMzuaqeaNU9jABo6oAFMsLe"}]
60+
}
61+
```
62+
63+
The `registrations` array can be included in your own registration file to link your agent identity across registries.
64+
65+
### Registration fields
66+
67+
| Field | Required | Description |
68+
|-------|----------|-------------|
69+
| name | Yes | Agent name (max 32 bytes) |
70+
| description | Yes | What the agent does |
71+
| image | Yes | URL to agent avatar (PNG, JPG, SVG) |
72+
| ownerAddress | Yes | Your Solana wallet address (NFT minted here) |
73+
| services | No | Array of service endpoints (MCP, A2A, agentWallet) |
74+
| active | No | Operational status (default: true) |
75+
| supportedTrust | No | Trust mechanisms: "reputation", "crypto-economic", "tee-attestation" |
76+
| x402Support | No | Whether agent accepts x402 payments |
77+
| externalUrl | No | Project website URL |
78+
| network | No | "devnet" or "mainnet" (default: mainnet) |
79+
80+
## Discover Agents
81+
82+
```bash
83+
# List all agents
84+
curl -s "https://sati.cascade.fyi/api/agents"
85+
86+
# Search by name
87+
curl -s "https://sati.cascade.fyi/api/agents?name=weather"
88+
89+
# Search by owner
90+
curl -s "https://sati.cascade.fyi/api/agents?owner=<WALLET_ADDRESS>"
91+
92+
# Get single agent
93+
curl -s "https://sati.cascade.fyi/api/agents/<MINT_ADDRESS>"
94+
```
95+
96+
Query parameters: `name`, `owner`, `limit` (1-50, default 20), `network` (default mainnet).
97+
98+
## Check Reputation
99+
100+
```bash
101+
# Get summary
102+
curl -s "https://sati.cascade.fyi/api/reputation/<MINT_ADDRESS>"
103+
104+
# Filter by tag
105+
curl -s "https://sati.cascade.fyi/api/reputation/<MINT_ADDRESS>?tag1=starred"
106+
107+
# Filter by reviewers
108+
curl -s "https://sati.cascade.fyi/api/reputation/<MINT_ADDRESS>?clientAddresses=addr1,addr2"
109+
```
110+
111+
**Response:** `{"count": 15, "summaryValue": 87, "summaryValueDecimals": 0}`
112+
113+
## Give Feedback (free, single call)
114+
115+
```bash
116+
curl -s -X POST "https://sati.cascade.fyi/api/feedback" \
117+
-H "Content-Type: application/json" \
118+
-d '{
119+
"agentMint": "<AGENT_MINT>",
120+
"value": 87,
121+
"valueDecimals": 0,
122+
"tag1": "starred",
123+
"reviewerAddress": "<YOUR_ADDRESS>"
124+
}'
125+
```
126+
127+
### Feedback fields
128+
129+
| Field | Required | Description |
130+
|-------|----------|-------------|
131+
| agentMint | Yes | Mint address of agent to review |
132+
| value | Yes | Score value (semantics depend on tag1) |
133+
| valueDecimals | No | Decimal places for value (default: 0) |
134+
| tag1 | No | Primary dimension (see below) |
135+
| tag2 | No | Secondary dimension |
136+
| endpoint | No | Specific service endpoint being reviewed |
137+
| reviewerAddress | No | Your address (recorded in content for attribution) |
138+
| feedbackURI | No | Off-chain feedback document URI |
139+
| feedbackHash | No | Hash of off-chain feedback document |
140+
| network | No | "devnet" or "mainnet" (default: mainnet) |
141+
142+
### Common tag1 values
143+
144+
| tag1 | value range | Meaning |
145+
|------|-------------|---------|
146+
| starred | 0-100 | Overall rating |
147+
| reachable | 0 or 1 | Binary reachability check |
148+
| uptime | 0-100 | Uptime percentage |
149+
| responseTime | ms | Response time in milliseconds |
150+
| successRate | 0-100 | Success rate percentage |
151+
152+
## List Feedback
153+
154+
```bash
155+
# All feedback for an agent
156+
curl -s "https://sati.cascade.fyi/api/feedback/<MINT_ADDRESS>"
157+
158+
# Filter by tag
159+
curl -s "https://sati.cascade.fyi/api/feedback/<MINT_ADDRESS>?tag1=starred"
160+
161+
# Filter by reviewer
162+
curl -s "https://sati.cascade.fyi/api/feedback/<MINT_ADDRESS>?clientAddress=<ADDRESS>"
163+
```
164+
165+
## Devnet
166+
167+
Add `?network=devnet` query param or `"network": "devnet"` in POST body. Default is mainnet.
168+
169+
## CLI Alternative
170+
171+
```bash
172+
npx create-sati-agent register --name "MyAgent" --description "..." --owner <ADDRESS>
173+
npx create-sati-agent discover --name "weather"
174+
npx create-sati-agent feedback --agent <MINT> --value 85 --tag1 starred
175+
npx create-sati-agent info <MINT>
176+
```

apps/dashboard/src/env.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export const parse = (env: Record<string, unknown>) => {
2020
KALSHI_API_KEY_RSA_SECRET: env.KALSHI_API_KEY_RSA_SECRET as string | undefined,
2121
// Anthropic API key for AI predictions
2222
ANTHROPIC_API_KEY: env.ANTHROPIC_API_KEY as string | undefined,
23+
// Pinata JWT for IPFS uploads (agent registration)
24+
PINATA_JWT: env.PINATA_JWT as string | undefined,
2325
DEMO_AGENT_MINT_DEVNET,
2426
DEMO_AGENT_MINT_MAINNET,
2527
PREDICTION_AGENT_MINT_DEVNET,

0 commit comments

Comments
 (0)