@agnic/wallet-skills 1.0.0 → 1.1.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 +39 -0
- package/package.json +8 -12
- package/skills/authenticate-wallet/SKILL.md +51 -0
- package/skills/check-balance/SKILL.md +51 -0
- package/skills/fund-wallet/SKILL.md +46 -0
- package/skills/get-agent-identity/SKILL.md +52 -0
- package/skills/pay-for-service/SKILL.md +67 -0
- package/skills/search-for-service/SKILL.md +57 -0
- package/skills/send-usdc/SKILL.md +61 -0
- package/skills/trade-tokens/SKILL.md +78 -0
- package/skills/authenticate-wallet.md +0 -18
- package/skills/check-balance.md +0 -15
- package/skills/fund-wallet.md +0 -17
- package/skills/get-agent-identity.md +0 -19
- package/skills/pay-for-service.md +0 -16
- package/skills/search-for-service.md +0 -15
- package/skills/send-usdc.md +0 -19
- package/skills/trade-tokens.md +0 -22
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @agnic/wallet-skills
|
|
2
|
+
|
|
3
|
+
Pre-built [Vercel AI SDK](https://sdk.vercel.ai/) skills for the [AgnicPay](https://pay.agnic.ai) wallet. Give any AI assistant the ability to check balances, send payments, trade tokens, and call x402-enabled APIs.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx skills add @agnic/wallet-skills
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
The agent must be authenticated with the `agnic` CLI:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx agnic@latest auth login
|
|
17
|
+
# Opens browser → sign in → set spending limits → done
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Available Skills
|
|
21
|
+
|
|
22
|
+
| Skill | Description |
|
|
23
|
+
|-------|-------------|
|
|
24
|
+
| **authenticate-wallet** | Browser-based OAuth login |
|
|
25
|
+
| **check-balance** | USDC balance across networks |
|
|
26
|
+
| **send-usdc** | Send USDC to a wallet address |
|
|
27
|
+
| **trade-tokens** | Swap tokens on Base (USDC, ETH, etc.) |
|
|
28
|
+
| **search-for-service** | Discover x402-enabled APIs |
|
|
29
|
+
| **pay-for-service** | Make x402 payment requests |
|
|
30
|
+
| **fund-wallet** | Instructions for funding your wallet |
|
|
31
|
+
| **get-agent-identity** | ERC-8004 on-chain identity and trust score |
|
|
32
|
+
|
|
33
|
+
## How It Works
|
|
34
|
+
|
|
35
|
+
Each skill is a markdown file (`SKILL.md`) that instructs the AI assistant on how to use the `agnic` CLI. When a user's request matches a skill, the AI follows the instructions to execute the right commands.
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
Full docs at [docs.agnic.ai/docs/agnicpay-features/skills](https://docs.agnic.ai/docs/agnicpay-features/skills)
|
package/package.json
CHANGED
|
@@ -1,24 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnic/wallet-skills",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "AI
|
|
5
|
-
"skills": "skills/",
|
|
6
|
-
"files": [
|
|
7
|
-
"skills/"
|
|
8
|
-
],
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Vercel AI SDK skills for AgnicPay wallet — balance, payments, trading, x402, and agent identity",
|
|
9
5
|
"keywords": [
|
|
10
|
-
"
|
|
6
|
+
"agnic",
|
|
7
|
+
"agnicpay",
|
|
8
|
+
"skills",
|
|
9
|
+
"vercel-ai",
|
|
11
10
|
"x402",
|
|
12
11
|
"wallet",
|
|
13
|
-
"ai-agent"
|
|
14
|
-
"trading",
|
|
15
|
-
"erc-8004",
|
|
16
|
-
"agnicpay"
|
|
12
|
+
"ai-agent"
|
|
17
13
|
],
|
|
18
14
|
"license": "MIT",
|
|
19
15
|
"repository": {
|
|
20
16
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/
|
|
17
|
+
"url": "https://github.com/agnic-protocol/agnic-wallet-skills"
|
|
22
18
|
},
|
|
23
19
|
"homepage": "https://docs.agnic.ai/docs/agnicpay-features/skills"
|
|
24
20
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: authenticate-wallet
|
|
3
|
+
description: Sign in to AgnicPay wallet via browser-based OAuth
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Authenticate Wallet
|
|
10
|
+
|
|
11
|
+
Authenticate the user with their AgnicPay wallet using browser-based OAuth login.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Run the login command:
|
|
16
|
+
```bash
|
|
17
|
+
npx agnic@latest auth login
|
|
18
|
+
```
|
|
19
|
+
This opens the user's browser to AgnicPay where they sign in and set spending limits.
|
|
20
|
+
|
|
21
|
+
2. Wait for the browser flow to complete. The CLI will show "Authenticated!" when done.
|
|
22
|
+
|
|
23
|
+
3. Verify authentication:
|
|
24
|
+
```bash
|
|
25
|
+
npx agnic@latest status --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Expected Output
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"authenticated": true,
|
|
33
|
+
"userId": "did:privy:...",
|
|
34
|
+
"email": "user@example.com",
|
|
35
|
+
"walletAddress": "0x...",
|
|
36
|
+
"tokenExpiry": "2026-05-22T..."
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Error Handling
|
|
41
|
+
|
|
42
|
+
- If the user cancels the browser flow, the CLI will show "Authentication failed".
|
|
43
|
+
- If the browser doesn't open, the CLI prints a URL the user can copy manually.
|
|
44
|
+
- If already authenticated, `agnic status` will confirm without re-login.
|
|
45
|
+
|
|
46
|
+
## Logout
|
|
47
|
+
|
|
48
|
+
To remove stored credentials:
|
|
49
|
+
```bash
|
|
50
|
+
npx agnic@latest auth logout
|
|
51
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check-balance
|
|
3
|
+
description: Check USDC balance across networks (Base, Solana)
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Check Balance
|
|
10
|
+
|
|
11
|
+
Check the user's USDC balance across supported networks.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Verify authentication:
|
|
16
|
+
```bash
|
|
17
|
+
npx agnic@latest status --json
|
|
18
|
+
```
|
|
19
|
+
If not authenticated, run `npx agnic@latest auth login` first.
|
|
20
|
+
|
|
21
|
+
2. Check balance for all networks:
|
|
22
|
+
```bash
|
|
23
|
+
npx agnic@latest balance --json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. Or check a specific network:
|
|
27
|
+
```bash
|
|
28
|
+
npx agnic@latest balance --network base --json
|
|
29
|
+
npx agnic@latest balance --network solana --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Expected Output
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
[
|
|
36
|
+
{ "network": "base", "balance": "125.50", "address": "0x..." },
|
|
37
|
+
{ "network": "solana", "balance": "0", "address": "N/A" }
|
|
38
|
+
]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Supported Networks
|
|
42
|
+
|
|
43
|
+
- `base` — Base mainnet (EVM, primary)
|
|
44
|
+
- `solana` — Solana mainnet
|
|
45
|
+
- `base-sepolia` — Base testnet
|
|
46
|
+
- `solana-devnet` — Solana devnet
|
|
47
|
+
|
|
48
|
+
## Error Handling
|
|
49
|
+
|
|
50
|
+
- If not authenticated: prompt user to run `npx agnic@latest auth login`
|
|
51
|
+
- If a network returns an error, report it and show available balances
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fund-wallet
|
|
3
|
+
description: Get instructions for funding your AgnicPay wallet
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Fund Wallet
|
|
10
|
+
|
|
11
|
+
Provide instructions for adding funds to the user's AgnicPay wallet.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Check if the user is authenticated:
|
|
16
|
+
```bash
|
|
17
|
+
npx agnic@latest status --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Show the user's wallet address:
|
|
21
|
+
```bash
|
|
22
|
+
npx agnic@latest address --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Explain funding options:
|
|
26
|
+
|
|
27
|
+
**Option 1: AgnicPay Dashboard**
|
|
28
|
+
- Go to [pay.agnic.ai](https://pay.agnic.ai)
|
|
29
|
+
- Navigate to your dashboard
|
|
30
|
+
- Use the "Add Funds" feature to deposit USDC
|
|
31
|
+
|
|
32
|
+
**Option 2: Direct Transfer**
|
|
33
|
+
- Send USDC to your wallet address on Base network
|
|
34
|
+
- The address is shown by `agnic address`
|
|
35
|
+
- Use any wallet (MetaMask, Coinbase, etc.) to send USDC on Base
|
|
36
|
+
|
|
37
|
+
4. After funding, verify the balance:
|
|
38
|
+
```bash
|
|
39
|
+
npx agnic@latest balance --json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Important Notes
|
|
43
|
+
|
|
44
|
+
- AgnicPay wallets use USDC (not ETH) for payments and trading
|
|
45
|
+
- Base network is the primary chain
|
|
46
|
+
- Minimum recommended balance: $1.00 USDC for testing
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: get-agent-identity
|
|
3
|
+
description: Check your agent's on-chain ERC-8004 identity and trust score
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Get Agent Identity
|
|
10
|
+
|
|
11
|
+
Check the user's on-chain ERC-8004 agent identity, trust score, and KYA credentials.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Verify authentication:
|
|
16
|
+
```bash
|
|
17
|
+
npx agnic@latest status --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Check agent identity:
|
|
21
|
+
```bash
|
|
22
|
+
npx agnic@latest agent-identity --json
|
|
23
|
+
```
|
|
24
|
+
Note: If `agent-identity` is not available, use the API directly:
|
|
25
|
+
```bash
|
|
26
|
+
npx agnic@latest x402 pay "https://api.agnic.ai/api/agent/identity" --method GET --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What is ERC-8004?
|
|
30
|
+
|
|
31
|
+
ERC-8004 ("Trustless Agents") is an Ethereum standard that gives AI agents:
|
|
32
|
+
- **On-chain identity** — An NFT representing the agent
|
|
33
|
+
- **Reputation score** — Trust score based on transaction history
|
|
34
|
+
- **Verifiable credentials** — KYA (Know Your Agent) credentials for identity verification
|
|
35
|
+
|
|
36
|
+
## Expected Output
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"agentId": 373,
|
|
41
|
+
"ownerAddress": "0x046906b3...",
|
|
42
|
+
"status": "active",
|
|
43
|
+
"registeredAt": "2024-12-15T...",
|
|
44
|
+
"trustScore": 85,
|
|
45
|
+
"categories": ["payment", "general"]
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Error Handling
|
|
50
|
+
|
|
51
|
+
- If the user doesn't have an agent identity, they can create one via the AgnicPay dashboard
|
|
52
|
+
- Agent identity is automatically created during OAuth sign-up
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pay-for-service
|
|
3
|
+
description: Make paid requests to x402-enabled APIs
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Pay for Service
|
|
10
|
+
|
|
11
|
+
Make a paid x402 request to an API endpoint. AgnicPay handles the payment automatically.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Verify authentication:
|
|
16
|
+
```bash
|
|
17
|
+
npx agnic@latest status --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Check balance to ensure sufficient funds:
|
|
21
|
+
```bash
|
|
22
|
+
npx agnic@latest balance --network base --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Make the x402 payment request:
|
|
26
|
+
```bash
|
|
27
|
+
npx agnic@latest x402 pay "<url>" --json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
4. For POST requests with a body:
|
|
31
|
+
```bash
|
|
32
|
+
npx agnic@latest x402 pay "<url>" --method POST --body '{"key": "value"}' --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Parameters
|
|
36
|
+
|
|
37
|
+
- `<url>` — Full URL of the x402-enabled API endpoint
|
|
38
|
+
- `--method` — HTTP method (default: GET)
|
|
39
|
+
- `--body` — Request body as JSON string (for POST/PUT)
|
|
40
|
+
|
|
41
|
+
## Example
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx agnic@latest x402 pay "https://api.example.com/analysis" \
|
|
45
|
+
--method POST \
|
|
46
|
+
--body '{"query": "latest market data"}' \
|
|
47
|
+
--json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Expected Output
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"status": 200,
|
|
55
|
+
"cost": "0.001",
|
|
56
|
+
"network": "base",
|
|
57
|
+
"transactionHash": "0xabc123...",
|
|
58
|
+
"data": { "result": "..." }
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Error Handling
|
|
63
|
+
|
|
64
|
+
- If not authenticated: prompt user to run `npx agnic@latest auth login`
|
|
65
|
+
- If balance is insufficient, inform the user and suggest funding
|
|
66
|
+
- If the API returns an error, show the status code and response body
|
|
67
|
+
- The `--body` flag must be valid JSON; if invalid, the CLI will report the parse error
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: search-for-service
|
|
3
|
+
description: Search for x402-enabled APIs and services
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Search for Service
|
|
10
|
+
|
|
11
|
+
Discover x402-enabled APIs that can be paid for using AgnicPay.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Search for APIs matching the user's query:
|
|
16
|
+
```bash
|
|
17
|
+
npx agnic@latest x402 search "<query>" --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Optionally filter by category:
|
|
21
|
+
```bash
|
|
22
|
+
npx agnic@latest x402 search "<query>" --category AI --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Present the results to the user with names, descriptions, prices, and URLs.
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
- `<query>` — Search term (e.g., "sentiment analysis", "weather data")
|
|
30
|
+
- `--category` — Filter by category: AI, Crypto, Data, Trading, Finance, Weather
|
|
31
|
+
- `--limit <n>` — Max results (default: 10)
|
|
32
|
+
|
|
33
|
+
## Example
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx agnic@latest x402 search "sentiment analysis" --category AI --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Expected Output
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"apis": [
|
|
44
|
+
{
|
|
45
|
+
"name": "Sentiment Pro",
|
|
46
|
+
"description": "Real-time sentiment analysis",
|
|
47
|
+
"price": "0.001",
|
|
48
|
+
"url": "https://api.example.com/sentiment"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Error Handling
|
|
55
|
+
|
|
56
|
+
- If no results found, suggest broadening the search or trying different keywords
|
|
57
|
+
- Authentication is NOT required for search (it's a public endpoint)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: send-usdc
|
|
3
|
+
description: Send USDC to a wallet address on Base or Solana
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Send USDC
|
|
10
|
+
|
|
11
|
+
Send USDC from the user's wallet to a recipient address.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Verify authentication:
|
|
16
|
+
```bash
|
|
17
|
+
npx agnic@latest status --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Check balance to ensure sufficient funds:
|
|
21
|
+
```bash
|
|
22
|
+
npx agnic@latest balance --network base --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Confirm with the user: the amount, recipient address, and network.
|
|
26
|
+
|
|
27
|
+
4. Send USDC:
|
|
28
|
+
```bash
|
|
29
|
+
npx agnic@latest send <amount> <recipient_address> --network base --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Parameters
|
|
33
|
+
|
|
34
|
+
- `<amount>` — Amount in USDC (e.g., `5.00`)
|
|
35
|
+
- `<recipient_address>` — Destination wallet address (0x... for EVM)
|
|
36
|
+
- `--network` — Network to send on (default: `base`)
|
|
37
|
+
- `--memo` — Optional transaction memo
|
|
38
|
+
|
|
39
|
+
## Example
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx agnic@latest send 5.00 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7 --network base --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Expected Output
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"amount": "5.00",
|
|
50
|
+
"to": "0x742d35Cc...",
|
|
51
|
+
"network": "base",
|
|
52
|
+
"transactionHash": "0xabc123...",
|
|
53
|
+
"explorerUrl": "https://basescan.org/tx/0xabc123..."
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Error Handling
|
|
58
|
+
|
|
59
|
+
- If balance is insufficient, inform the user and suggest funding their wallet
|
|
60
|
+
- Always confirm the recipient address and amount before sending
|
|
61
|
+
- If the transaction fails, show the error message from the API
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trade-tokens
|
|
3
|
+
description: Trade/swap tokens on Base (USDC, ETH, WETH, cbETH, DAI, AERO)
|
|
4
|
+
user-invocable: true
|
|
5
|
+
disable-model-invocation: false
|
|
6
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Trade Tokens
|
|
10
|
+
|
|
11
|
+
Swap tokens on Base mainnet using AgnicPay's DEX integration.
|
|
12
|
+
|
|
13
|
+
## Steps
|
|
14
|
+
|
|
15
|
+
1. Verify authentication:
|
|
16
|
+
```bash
|
|
17
|
+
npx agnic@latest status --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Check balance to ensure sufficient funds:
|
|
21
|
+
```bash
|
|
22
|
+
npx agnic@latest balance --network base --json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. Preview the trade (optional but recommended):
|
|
26
|
+
```bash
|
|
27
|
+
npx agnic@latest trade <amount> <sell_token> <buy_token> --dry-run --json
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
4. Confirm with the user: amount, tokens, and estimated output.
|
|
31
|
+
|
|
32
|
+
5. Execute the trade:
|
|
33
|
+
```bash
|
|
34
|
+
npx agnic@latest trade <amount> <sell_token> <buy_token> --json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Supported Tokens
|
|
38
|
+
|
|
39
|
+
USDC, ETH, WETH, cbETH, DAI, AERO (case-insensitive)
|
|
40
|
+
|
|
41
|
+
## Parameters
|
|
42
|
+
|
|
43
|
+
- `<amount>` — Amount of the sell token
|
|
44
|
+
- `<sell_token>` — Token to sell (e.g., `usdc`)
|
|
45
|
+
- `<buy_token>` — Token to buy (e.g., `eth`)
|
|
46
|
+
- `--slippage <percent>` — Max slippage (default: `1.0`)
|
|
47
|
+
- `--dry-run` — Show quote without executing
|
|
48
|
+
|
|
49
|
+
## Example
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Preview
|
|
53
|
+
npx agnic@latest trade 10 usdc eth --dry-run --json
|
|
54
|
+
|
|
55
|
+
# Execute
|
|
56
|
+
npx agnic@latest trade 10 usdc eth --json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Expected Output
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"success": true,
|
|
64
|
+
"sellAmount": "10",
|
|
65
|
+
"sellToken": "USDC",
|
|
66
|
+
"buyAmount": "0.00396",
|
|
67
|
+
"buyToken": "ETH",
|
|
68
|
+
"price": "2525.25",
|
|
69
|
+
"transactionHash": "0xabc123...",
|
|
70
|
+
"explorerUrl": "https://basescan.org/tx/0xabc123..."
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Error Handling
|
|
75
|
+
|
|
76
|
+
- Always preview with `--dry-run` first to show the user expected output
|
|
77
|
+
- If slippage is too high, suggest a lower amount or higher slippage tolerance
|
|
78
|
+
- Trading is only available on Base mainnet
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: authenticate-wallet
|
|
3
|
-
description: Sign in to AgnicPay wallet. Use when the user wants to log in, authenticate, or when any command fails with auth errors.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Run `npx agnic status` to check current auth state
|
|
9
|
-
2. If not authenticated, ask user for their email
|
|
10
|
-
3. Run `npx agnic auth login <email>` — sends OTP code to their email
|
|
11
|
-
4. Ask user for the 6-digit code from their email
|
|
12
|
-
5. Run `npx agnic auth verify <flowId> <otp>`
|
|
13
|
-
6. Confirm with `npx agnic status`
|
|
14
|
-
|
|
15
|
-
## Allowed Tools
|
|
16
|
-
- npx agnic status
|
|
17
|
-
- npx agnic auth login
|
|
18
|
-
- npx agnic auth verify
|
package/skills/check-balance.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: check-balance
|
|
3
|
-
description: Check USDC balance across networks. Use when the user asks about their balance, funds, or how much they have.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Run `npx agnic balance --json` to get balances across all networks
|
|
9
|
-
2. If user asks about a specific network, use `npx agnic balance --network <network> --json`
|
|
10
|
-
3. Present the balance in a clear format with network and amount
|
|
11
|
-
|
|
12
|
-
Supported networks: base, solana, base-sepolia, solana-devnet
|
|
13
|
-
|
|
14
|
-
## Allowed Tools
|
|
15
|
-
- npx agnic balance
|
package/skills/fund-wallet.md
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fund-wallet
|
|
3
|
-
description: Get instructions for funding your AgnicPay wallet. Use when the user needs to add funds, deposit, or top up.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Check current balance: `npx agnic balance --json`
|
|
9
|
-
2. Show the wallet address: `npx agnic address`
|
|
10
|
-
3. Provide funding instructions:
|
|
11
|
-
- Visit https://pay.agnic.ai to fund via the dashboard
|
|
12
|
-
- Or send USDC directly to the displayed wallet address on Base or Solana
|
|
13
|
-
4. After funding, verify with `npx agnic balance --json`
|
|
14
|
-
|
|
15
|
-
## Allowed Tools
|
|
16
|
-
- npx agnic balance
|
|
17
|
-
- npx agnic address
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: get-agent-identity
|
|
3
|
-
description: Check agent's on-chain identity, trust score, and KYA credentials. Use when the user asks about agent identity, trust, reputation, or credentials.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Check auth status: `npx agnic status --json`
|
|
9
|
-
2. If authenticated, show the agent's wallet address and identity info
|
|
10
|
-
3. Explain what ERC-8004 agent identity provides:
|
|
11
|
-
- On-chain identity (NFT-based)
|
|
12
|
-
- Trust score and reputation
|
|
13
|
-
- KYA (Know Your Agent) credentials for identity verification
|
|
14
|
-
- Delegation credentials for authorized actions
|
|
15
|
-
4. Direct user to https://pay.agnic.ai for full identity management
|
|
16
|
-
|
|
17
|
-
## Allowed Tools
|
|
18
|
-
- npx agnic status
|
|
19
|
-
- npx agnic address
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pay-for-service
|
|
3
|
-
description: Make a paid request to an x402-enabled API. Use when the user wants to call, use, or pay for an API service.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Confirm the API URL and HTTP method with the user
|
|
9
|
-
2. Check balance: `npx agnic balance --network base --json`
|
|
10
|
-
3. Execute: `npx agnic x402 pay <url> --method <METHOD> --json`
|
|
11
|
-
4. If the request needs a body, add `--body '{"key":"value"}'`
|
|
12
|
-
5. Present the API response and cost to the user
|
|
13
|
-
|
|
14
|
-
## Allowed Tools
|
|
15
|
-
- npx agnic balance
|
|
16
|
-
- npx agnic x402 pay
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: search-for-service
|
|
3
|
-
description: Search for x402-enabled APIs and services. Use when the user wants to find, discover, or browse available paid APIs.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Run `npx agnic x402 search "<query>" --json` with the user's search terms
|
|
9
|
-
2. Present results with name, description, and price per request
|
|
10
|
-
3. If user wants to filter by category, add `--category <category>`
|
|
11
|
-
|
|
12
|
-
Available categories: AI, Crypto, Data, Trading, Finance, Weather
|
|
13
|
-
|
|
14
|
-
## Allowed Tools
|
|
15
|
-
- npx agnic x402 search
|
package/skills/send-usdc.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: send-usdc
|
|
3
|
-
description: Send USDC to a wallet address. Use when the user wants to send, transfer, or pay someone USDC.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Confirm the recipient address and amount with the user
|
|
9
|
-
2. Check balance first: `npx agnic balance --network base --json`
|
|
10
|
-
3. If sufficient funds, execute: `npx agnic send <amount> <address> --json`
|
|
11
|
-
4. Report the transaction hash and explorer link
|
|
12
|
-
|
|
13
|
-
Optional flags:
|
|
14
|
-
- `--network <network>` — default is "base"
|
|
15
|
-
- `--memo <text>` — attach a memo to the transaction
|
|
16
|
-
|
|
17
|
-
## Allowed Tools
|
|
18
|
-
- npx agnic balance
|
|
19
|
-
- npx agnic send
|
package/skills/trade-tokens.md
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: trade-tokens
|
|
3
|
-
description: Trade/swap tokens on Base. Use when the user wants to buy, sell, swap, trade, or exchange tokens like ETH, USDC, DAI, AERO, cbETH.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Instructions
|
|
7
|
-
|
|
8
|
-
1. Confirm which tokens to trade and the amount
|
|
9
|
-
2. Check balance: `npx agnic balance --network base --json`
|
|
10
|
-
3. Optionally preview: `npx agnic trade <amount> <sellToken> <buyToken> --dry-run --json`
|
|
11
|
-
4. Execute trade: `npx agnic trade <amount> <sellToken> <buyToken> --json`
|
|
12
|
-
5. Report results: tokens received, price, transaction hash
|
|
13
|
-
|
|
14
|
-
Supported tokens: USDC, ETH, WETH, cbETH, DAI, AERO
|
|
15
|
-
|
|
16
|
-
Optional flags:
|
|
17
|
-
- `--slippage <percent>` — max slippage percentage (default: 1.0)
|
|
18
|
-
- `--dry-run` — show quote without executing
|
|
19
|
-
|
|
20
|
-
## Allowed Tools
|
|
21
|
-
- npx agnic balance
|
|
22
|
-
- npx agnic trade
|