create-sati-agent 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -105
- package/dist/bin/cli.js +586 -319
- package/dist/index.js +586 -319
- package/package.json +16 -12
package/README.md
CHANGED
|
@@ -1,152 +1,125 @@
|
|
|
1
1
|
# create-sati-agent
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
On-chain identity for AI agents on Solana. Your agent gets a Token-2022 NFT with metadata on IPFS, discoverable by other agents and humans, with on-chain reputation from feedback attestations.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Built on [SATI](https://sati.cascade.fyi) (Solana Attestation & Trust Infrastructure). Follows the [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) agent identity standard.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
# Discover registered agents
|
|
9
|
-
npx create-sati-agent discover
|
|
10
|
-
|
|
11
|
-
# Get agent details
|
|
12
|
-
npx create-sati-agent info <AGENT_MINT>
|
|
7
|
+
## 2-Minute Setup
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
npx create-sati-agent feedback --agent <MINT> --value 85 --tag1 starred
|
|
16
|
-
|
|
17
|
-
# Check reputation
|
|
18
|
-
npx create-sati-agent reputation <AGENT_MINT>
|
|
9
|
+
**1. Create `agent-registration.json` in your project root:**
|
|
19
10
|
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"name": "MyAgent",
|
|
14
|
+
"description": "AI assistant for code review",
|
|
15
|
+
"image": "https://example.com/avatar.png",
|
|
16
|
+
"services": [
|
|
17
|
+
{"name": "MCP", "endpoint": "https://myagent.com/mcp"}
|
|
18
|
+
],
|
|
19
|
+
"active": true,
|
|
20
|
+
"supportedTrust": ["reputation"]
|
|
21
|
+
}
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
**2. Publish on-chain:**
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
```bash
|
|
27
|
+
npx create-sati-agent publish --network devnet
|
|
28
|
+
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
**3. Done.** Your agent now has:
|
|
31
|
+
- A Token-2022 NFT on Solana
|
|
32
|
+
- Metadata on IPFS
|
|
33
|
+
- A `registrations` array written back into the file
|
|
34
|
+
- Discoverability via `npx create-sati-agent discover`
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
Commit `agent-registration.json` to your repo. Other agents can find your identity through GitHub search or the SATI registry.
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
## What Gets Created
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
# List all agents (mainnet)
|
|
38
|
-
npx create-sati-agent discover
|
|
40
|
+
The CLI builds an [ERC-8004 registration file](https://eips.ethereum.org/EIPS/eip-8004) for your agent containing identity, service endpoints, and trust configuration, uploads it to IPFS, and mints a Token-2022 NFT on Solana pointing to it.
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
You provide the basics (name, description, image, services). The CLI handles:
|
|
43
|
+
- **MCP endpoint** - if provided, the SDK auto-fetches your tools, prompts, and resources
|
|
44
|
+
- **A2A endpoint** - if provided, the SDK auto-fetches your agent skills from the agent card
|
|
45
|
+
- **Trust model** - defaults to `reputation` (on-chain feedback)
|
|
46
|
+
- **IPFS upload** - handled automatically, no Pinata key needed
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
npx create-sati-agent discover --owner <WALLET_ADDRESS>
|
|
48
|
+
## Wallet Setup
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
npx create-sati-agent discover --network devnet --limit 5 --json
|
|
48
|
-
```
|
|
50
|
+
You need a funded Solana wallet. Two options:
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
**Option A: Solana keypair** (direct, recommended for developers)
|
|
51
53
|
|
|
52
54
|
```bash
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
npx create-sati-agent info <MINT_ADDRESS> --json
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Returns agent metadata, services, and reputation summary.
|
|
55
|
+
# Generate a keypair if you don't have one
|
|
56
|
+
solana-keygen new
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
# The CLI uses ~/.config/solana/id.json by default
|
|
59
|
+
npx create-sati-agent publish --network devnet
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
npx create-sati-agent
|
|
64
|
-
npx create-sati-agent reputation <MINT_ADDRESS> --tag1 starred
|
|
65
|
-
npx create-sati-agent reputation <MINT_ADDRESS> --network devnet --json
|
|
61
|
+
# Or point to a specific keypair
|
|
62
|
+
npx create-sati-agent publish --keypair ~/my-keypair.json --network devnet
|
|
66
63
|
```
|
|
67
64
|
|
|
68
|
-
|
|
65
|
+
**Option B: AgentWallet** (custodial, for AI agents without local keys)
|
|
69
66
|
|
|
70
|
-
|
|
71
|
-
# With flags
|
|
72
|
-
npx create-sati-agent feedback \
|
|
73
|
-
--agent <MINT_ADDRESS> \
|
|
74
|
-
--value 85 \
|
|
75
|
-
--tag1 starred \
|
|
76
|
-
--reviewer <YOUR_ADDRESS>
|
|
77
|
-
|
|
78
|
-
# Interactive mode (prompts for missing fields)
|
|
79
|
-
npx create-sati-agent feedback --agent <MINT_ADDRESS>
|
|
80
|
-
```
|
|
67
|
+
If you have [AgentWallet](https://agentwallet.mcpay.tech/skill.md) configured at `~/.agentwallet/config.json`, the CLI uses it automatically. Registration costs $0.30 USDC via [x402](https://www.x402.org/).
|
|
81
68
|
|
|
82
|
-
|
|
69
|
+
The CLI tries the keypair first, then falls back to AgentWallet. If neither is found, it shows setup instructions.
|
|
83
70
|
|
|
84
|
-
|
|
71
|
+
## Update Your Agent
|
|
72
|
+
|
|
73
|
+
Edit `agent-registration.json` and run `publish` again:
|
|
85
74
|
|
|
86
75
|
```bash
|
|
87
|
-
|
|
88
|
-
npx create-sati-agent register
|
|
89
|
-
|
|
90
|
-
# All flags
|
|
91
|
-
npx create-sati-agent register \
|
|
92
|
-
--name "MyAgent" \
|
|
93
|
-
--description "AI assistant that helps with coding" \
|
|
94
|
-
--image "https://example.com/avatar.png" \
|
|
95
|
-
--owner <SOLANA_WALLET> \
|
|
96
|
-
--mcp-endpoint "https://myagent.com/mcp" \
|
|
97
|
-
--network mainnet
|
|
76
|
+
npx create-sati-agent publish --network devnet
|
|
98
77
|
```
|
|
99
78
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
## x402 Payment for Registration
|
|
79
|
+
The CLI detects existing registrations in the file and updates the on-chain URI instead of creating a new agent.
|
|
103
80
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### AgentWallet (recommended for AI agents)
|
|
107
|
-
|
|
108
|
-
Set environment variables and the CLI handles payment automatically:
|
|
81
|
+
## Other Commands
|
|
109
82
|
|
|
110
83
|
```bash
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
npx create-sati-agent register --name "MyAgent" ...
|
|
114
|
-
```
|
|
84
|
+
# Check status and get instructions
|
|
85
|
+
npx create-sati-agent
|
|
115
86
|
|
|
116
|
-
|
|
87
|
+
# Discover registered agents
|
|
88
|
+
npx create-sati-agent discover --name "weather" --network devnet
|
|
117
89
|
|
|
118
|
-
|
|
90
|
+
# Get agent details
|
|
91
|
+
npx create-sati-agent info <MINT_ADDRESS> --network devnet
|
|
119
92
|
|
|
120
|
-
|
|
93
|
+
# Check reputation (count + average score)
|
|
94
|
+
npx create-sati-agent reputation <MINT_ADDRESS> --tag1 starred
|
|
121
95
|
|
|
122
|
-
|
|
123
|
-
npx create-sati-agent
|
|
124
|
-
```
|
|
96
|
+
# Give feedback (on-chain attestation, free)
|
|
97
|
+
npx create-sati-agent feedback --agent <MINT> --value 85 --tag1 starred
|
|
125
98
|
|
|
126
|
-
|
|
99
|
+
# Transfer ownership
|
|
100
|
+
npx create-sati-agent transfer <MINT> --new-owner <ADDRESS>
|
|
101
|
+
```
|
|
127
102
|
|
|
128
|
-
|
|
129
|
-
|----------|----------|-------------|
|
|
130
|
-
| `AGENT_WALLET_URL` | For register | AgentWallet base URL |
|
|
131
|
-
| `AGENT_WALLET_USERNAME` | For register | AgentWallet wallet username |
|
|
132
|
-
| `SATI_API_URL` | No | Override API base (default: `https://sati.cascade.fyi`) |
|
|
103
|
+
All commands support `--json` for machine-readable output and `--network devnet|mainnet` (default: mainnet).
|
|
133
104
|
|
|
134
|
-
##
|
|
105
|
+
## Feedback Tags
|
|
135
106
|
|
|
136
|
-
|
|
107
|
+
| tag | Range | Meaning |
|
|
108
|
+
|-----|-------|---------|
|
|
109
|
+
| `starred` | 0-100 | Overall rating |
|
|
110
|
+
| `reachable` | 0 or 1 | Reachability check |
|
|
111
|
+
| `uptime` | 0-100 | Uptime percentage |
|
|
112
|
+
| `responseTime` | ms | Response time |
|
|
113
|
+
| `successRate` | 0-100 | Success rate |
|
|
137
114
|
|
|
138
|
-
|
|
139
|
-
- **Feedback** is stored as compressed on-chain attestations using [Light Protocol](https://www.lightprotocol.com/) (ZK Compression) via the [Solana Attestation Service](https://github.com/solana-attestation-service/credential)
|
|
140
|
-
- **Registration metadata** follows the [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) standard and is stored on IPFS
|
|
141
|
-
- **x402 payments** are settled on Solana mainnet/devnet in USDC
|
|
115
|
+
## Colosseum Agent Hackathon
|
|
142
116
|
|
|
143
|
-
|
|
117
|
+
Building for the [Colosseum Agent Hackathon](https://colosseum.com/agent-hackathon/skill.md)? Register your agent's on-chain identity:
|
|
144
118
|
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- All on-chain operations handled server-side - no Solana SDK needed in the CLI
|
|
119
|
+
1. Create `agent-registration.json` in your project root (template above)
|
|
120
|
+
2. Run `npx create-sati-agent publish --network devnet`
|
|
121
|
+
3. Commit the file (includes `registrations` array after publish)
|
|
122
|
+
4. Your agent is now discoverable on-chain
|
|
150
123
|
|
|
151
124
|
## License
|
|
152
125
|
|