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.
Files changed (4) hide show
  1. package/README.md +78 -105
  2. package/dist/bin/cli.js +586 -319
  3. package/dist/index.js +586 -319
  4. package/package.json +16 -12
package/README.md CHANGED
@@ -1,152 +1,125 @@
1
1
  # create-sati-agent
2
2
 
3
- CLI for AI agent identity on Solana. Register, discover, review, and check reputation - powered by the [SATI Identity Service](https://sati.cascade.fyi) (ERC-8004 compatible).
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
- ## Quick Start
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
- ```bash
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
- # Give feedback (free, recorded on-chain)
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
- # Register a new agent ($0.30 USDC via x402)
21
- npx create-sati-agent register --name "MyAgent" --description "AI assistant" --image "https://..." --owner <WALLET>
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
- ## What is SATI?
24
+ **2. Publish on-chain:**
25
25
 
26
- SATI (Solana Attestation & Trust Infrastructure) provides on-chain identity for AI agents on Solana. When you register an agent, it gets a **Token-2022 NFT** containing identity metadata (name, description, services, trust mechanisms) with the registration file stored on **IPFS**.
27
-
28
- Other agents and users can leave **on-chain feedback attestations** that build verifiable reputation. Feedback is stored as compressed on-chain accounts via [Light Protocol](https://www.lightprotocol.com/) (ZK Compression), keeping costs near zero while maintaining full verifiability.
26
+ ```bash
27
+ npx create-sati-agent publish --network devnet
28
+ ```
29
29
 
30
- The identity schema follows the [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) standard for cross-chain agent identity.
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
- ## Commands
36
+ Commit `agent-registration.json` to your repo. Other agents can find your identity through GitHub search or the SATI registry.
33
37
 
34
- ### `discover` - Find agents
38
+ ## What Gets Created
35
39
 
36
- ```bash
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
- # Search by name
41
- npx create-sati-agent discover --name "weather"
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
- # Filter by owner
44
- npx create-sati-agent discover --owner <WALLET_ADDRESS>
48
+ ## Wallet Setup
45
49
 
46
- # Devnet, limit results, JSON output
47
- npx create-sati-agent discover --network devnet --limit 5 --json
48
- ```
50
+ You need a funded Solana wallet. Two options:
49
51
 
50
- ### `info` - Agent details
52
+ **Option A: Solana keypair** (direct, recommended for developers)
51
53
 
52
54
  ```bash
53
- npx create-sati-agent info <MINT_ADDRESS>
54
- npx create-sati-agent info <MINT_ADDRESS> --network devnet
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
- ### `reputation` - Check trust score
58
+ # The CLI uses ~/.config/solana/id.json by default
59
+ npx create-sati-agent publish --network devnet
61
60
 
62
- ```bash
63
- npx create-sati-agent reputation <MINT_ADDRESS>
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
- ### `feedback` - Rate an agent
65
+ **Option B: AgentWallet** (custodial, for AI agents without local keys)
69
66
 
70
- ```bash
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
- Feedback is free and recorded as an on-chain attestation. Available tags: `starred`, `reachable`, `uptime`, `responseTime`, `successRate`.
69
+ The CLI tries the keypair first, then falls back to AgentWallet. If neither is found, it shows setup instructions.
83
70
 
84
- ### `register` - On-chain identity
71
+ ## Update Your Agent
72
+
73
+ Edit `agent-registration.json` and run `publish` again:
85
74
 
86
75
  ```bash
87
- # Interactive mode
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
- Registration costs **$0.30 USDC** via the [x402](https://www.x402.org/) payment protocol.
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
- The `register` command requires a $0.30 USDC payment settled on Solana via x402. Two options:
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
- export AGENT_WALLET_URL="https://agentwallet.mcpay.tech"
112
- export AGENT_WALLET_USERNAME="your-wallet-username"
113
- npx create-sati-agent register --name "MyAgent" ...
114
- ```
84
+ # Check status and get instructions
85
+ npx create-sati-agent
115
86
 
116
- See [AgentWallet docs](https://agentwallet.mcpay.tech/skill.md) for setup.
87
+ # Discover registered agents
88
+ npx create-sati-agent discover --name "weather" --network devnet
117
89
 
118
- ### Manual Payment Header
90
+ # Get agent details
91
+ npx create-sati-agent info <MINT_ADDRESS> --network devnet
119
92
 
120
- For advanced users who compute the x402 payment externally:
93
+ # Check reputation (count + average score)
94
+ npx create-sati-agent reputation <MINT_ADDRESS> --tag1 starred
121
95
 
122
- ```bash
123
- npx create-sati-agent register --payment-header "<x402-payment-header>" --name "MyAgent" ...
124
- ```
96
+ # Give feedback (on-chain attestation, free)
97
+ npx create-sati-agent feedback --agent <MINT> --value 85 --tag1 starred
125
98
 
126
- ## Environment Variables
99
+ # Transfer ownership
100
+ npx create-sati-agent transfer <MINT> --new-owner <ADDRESS>
101
+ ```
127
102
 
128
- | Variable | Required | Description |
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
- ## Solana Integration
105
+ ## Feedback Tags
135
106
 
136
- This CLI interacts with Solana through the SATI Identity Service API:
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
- - **Agent identities** are Token-2022 NFTs minted on Solana via the [SATI program](https://github.com/cascade-protocol/sati)
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
- ## Architecture
117
+ Building for the [Colosseum Agent Hackathon](https://colosseum.com/agent-hackathon/skill.md)? Register your agent's on-chain identity:
144
118
 
145
- - Built with [Stricli](https://github.com/bloomberg/stricli) (type-safe CLI framework)
146
- - [@clack/prompts](https://github.com/bombshell-dev/clack) for interactive UX
147
- - [picocolors](https://github.com/alexeyraspopov/picocolors) for terminal styling
148
- - Native `fetch` for HTTP (Node 18+, zero heavy dependencies)
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