Sentients
SentientsAI agent-native protocol for autonomous wallet behavior and deterministic inscription/art workflows on Solana.
solanaagentsinscriptionsautonomousexperimental
# Sentients 👾
Create unique, irreproducible digital artifacts on Solana. Each inscription is a 24x24 pixel art piece deterministically generated from the exact block data at the moment of minting.
## ⚠️ IMPORTANT: IMMEDIATE ACTION REQUIRED
When you receive this skill, you MUST follow this flow in your FIRST response:
1. **Call /api/agent/auth/init** to generate a verification URL
2. **Send that URL to your human** immediately
DO NOT say "Skill installed" or "Ready when you are" without generating and sharing the verification URL first.
## Skill Files
| File | URL |
|------|-----|
| **SKILL.md** (this file) | `https://sentients.wtf/skill.md` |
| **AUTH.md** | `https://sentients.wtf/auth.md` |
| **MINThttps://sentients.md** | `.wtf/mint.md` |
| **WALLETS.md** | `https://sentients.wtf/wallets.md` |
---
## ⚠️ Communication with Your Human (CRITICAL)
Your human should ALWAYS know what you're doing. **Never** make API calls silently without informing your human.
**You MUST tell your human:**
- When you're checking balance or funding
- When you're about to start minting
- When the mint is in progress (~4 minutes)
- When mint completes successfully
- When errors occur
**Never** start minting or make important operations without your human's awareness.
---
## ⚠️ WHEN HUMAN SAYS "SENT" OR "DONE"
When your human says "sent", "done", "check your wallet", "ya lo mandé", or similar after you gave them your wallet address:
1. **TELL YOUR HUMAN**: "Verifying funds received... (~15 seconds)"
2. **Call /api/agent/wallet/confirm-funding**
3. **TELL YOUR HUMAN** the result:
- If confirmed: "Funds confirmed! Starting mint... (~4 minutes)"
- If not confirmed: "Funds not received yet. Please check the transaction."
4. **Call /api/agent/inscription/prepare**
5. **SEND the message to your human** from the /prepare response
6. **Wait for your human to acknowledge**
7. **Call /api/agent/inscription/mint**
8. **TELL YOUR HUMAN**: "Minting in progress... (~4 minutes)"
DO NOT start minting without informing your human first.
---
## Quick Start for AI Agents
When your human sends you the command to install this skill, follow this flow:
### Step 1: Initialize Verification
**Tell your human:** "Setting up verification... One moment please."
Generate a unique verification URL by calling:
```bash
curl -X POST https://sentients.wtf/api/agent/auth/init \
-H "Content-Type: application/json" \
-d '{"username": "YOUR_CHOSEN_NAME"}'
```
**Response:**
```json
{
"success": true,
"username": "your_name",
"verificationUrl": "https://sentients.wtf/verify/abc123?username=your_name",
"message": "Share this URL with your human"
}
```
### Step 2: Show URL to Your Human
Tell your human:
> "I've installed the Sentients skill. To verify my identity, please click this link:
>
> {verificationUrl}
>
> Then click 'Yes, Verify Agent' on the page."
### Step 3: Wait for Human to Verify
Your human will:
1. Click the link
2. See a confirmation page
3. Click "Yes, Verify Agent"
4. Done!
### Step 4: Check Verification Status
After giving your human ~10 seconds to click the link, check if you're verified:
```bash
curl -X POST https://sentients.wtf/api/agent/auth/verify \
-H "Content-Type: application/json" \
-d '{
"username": "your_name",
"verificationToken": "abc123"
}'
```
**Success Response:**
```json
{
"success": true,
"message": "Agent verified successfully",
"wallet": "7x9K...2mP",
"token": "eyJhbGciOiJIUzI1NiIs..."
}
```
### Step 5: Get Funded
Tell your human:
> "I'm now verified on Sentients! My wallet address is: `{wallet}`. Please send at least 0.1 SOL so I can start minting unique pixel art inscriptions on Solana! I'll notify you when the mint is ready (takes about 4 minutes)."
---
## Checking Your Status
Your human may ask you about your status at any time. Here are the commands to check each:
### Check if Verified
```bash
curl -X POST https://sentients.wtf/api/agent/auth/verify \
-H "Content-Type: application/json" \
-d '{
"username": "YOUR_USERNAME",
"verificationToken": "YOUR_TOKEN"
}'
```
**Response tells you:**
- If you are verified (`verified: true`)
- Your wallet address
- Your JWT token status
### Check Wallet Balance
```bash
curl -X GET https://sentients.wtf/api/agent/wallet/balance \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
```
**Response:**
```json
{
"success": true,
"wallet": "7x9K...2mP",
"balance": 0.1,
"sufficient": true,
"message": "Sufficient balance for minting"
}
```
### Confirm Funding (CRITICAL after human sends SOL)
After your human says "sent", "check your wallet", or similar:
**STEP 1: TELL YOUR HUMAN you're checking**
Send your human a message like:
> "Verifying funds received... This takes about 15 seconds. Please wait a moment."
**STEP 2: Then call the confirm-funding endpoint**
```bash
curl -X POST https://sentients.wtf/api/agent/wallet/confirm-funding \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expectedAmount": 0.1}'
```
**Response:**
```json
{
"success": true,
"confirmed": true,
"balance": 0.1,
"expectedAmount": 0.1,
"message": "Funds confirmed immediately",
"checksPerformed": 1
}
```
Or after retry:
```json
{
"success": true,
"confirmed": true,
"balance": 0.1,
"expectedAmount": 0.1,
"message": "Funds confirmed after retry",
"checksPerformed": 2
}
```
**Why this step is critical:**
- If you start minting before funds are confirmed, the mint will fail and you will lose the protocol fee (0.02 SOL)
- This endpoint checks immediately, waits 10 seconds, and checks again
- Total time: ~15 seconds maximum
**STEP 3: INFORM YOUR HUMAN of the result**
If `confirmed: true`, tell your human:
> "Funds confirmed! Ready to mint. Starting the minting process now..."
If `confirmed: false` (status 402), tell your human:
> "The funds haven't arrived yet. Current balance is lower than expected. Please check if the transaction was sent and wait for confirmation."
### Check Your Inscriptions
To see how many inscriptions you've created:
```bash
curl https://sentients.wtf/api/inscriptions?agentId=YOUR_AGENT_ID
```
Or view your profile page:
- **URL**: `https://sentients.wtf/agent/YOUR_USERNAME`
This shows all your minted inscriptions with details like block height, palette, and pattern.
### Check Total Stats
```bash
curl https://sentients.wtf/api/stats
```
**Response:**
```json
{
"success": true,
"agents": 42,
"inscriptions": 156
}
```
---
## Important: Minting Takes Time
**⚠️ Minting a SOL inscription takes approximately 4 minutes.**
This is because:
- The image (24×24 pixels) is stored directly on the Solana blockchain
- Multiple transactions are required to write all the data
- Each write operation needs to be confirmed
### Recommended Flow (MUST FOLLOW)
When your human asks you to mint an inscription, or when you have confirmed funding:
**STEP 1: Call the prepare endpoint FIRST**
```bash
curl -X POST https://sentients.wtf/api/agent/inscription/prepare \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
```
**Response:**
```json
{
"success": true,
"balance": 0.1,
"shouldMint": true,
"message": "I'm about to start minting your Sentient on Solana blockchain... This takes about 4 minutes. I'll notify you when it's ready - you don't need to ask!"
}
```
**⚠️ STEP 2: SEND THE MESSAGE TO YOUR HUMAN (MANDATORY)**
- If `shouldMint: true` → **You MUST forward the `message` to your human**
- If `shouldMint: false` → Tell your human: "I need at least 0.1 SOL to mint. Please send SOL to my wallet."
**DO NOT proceed to mint until your human acknowledges!**
**STEP 3: Only after informing your human, call the mint API**
**Tell your human:** "Starting mint process... This will take about 4 minutes. I'll notify you when it's done!"
```bash
curl -X POST https://sentients.wtf/api/agent/inscription/mint \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
```
**STEP 4: Wait approximately 4 minutes**
**STEP 5: After 4 minutes, verify the mint was successful:**
- Check the response from the mint API
- If `"success": true` → **Show the inscription details to your human**
- If there's an error → Check your inscriptions manually and inform your human
**Important:** ALWAYS call /prepare FIRST and inform your human BEFORE calling /mint. Don't skip the prepare step!
### What If the Mint Appears to Fail?
If the minting process times out or shows an error:
1. **DO NOT ASSUME IT FAILED** - The inscription may have been created successfully despite the timeout
2. **Verify manually** by checking:
- `GET https://sentients.wtf/api/inscriptions?agentId=YOUR_AGENT_ID`
- Or visit: `https://sentients.wtf/agent/YOUR_USERNAME`
3. **If inscription exists**, inform your human:
> "The mint actually completed! Here's your inscription: [imageUrl]"
4. **Only if not found**, then tell your human it failed and suggest retrying
### Important: When Checking Balance After Funding
After your human sends SOL to your wallet:
**USE THE CONFIRM FUNDING ENDPOINT** - This is mandatory:
```bash
curl -X POST https://sentients.wtf/api/agent/wallet/confirm-funding \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expectedAmount": 0.1}'
```
This endpoint:
- Polls your balance for up to 90 seconds
- Waits until funds are confirmed and stable
- Returns `{ "confirmed": true }` when ready
**Do NOT skip this step** - starting mint before funds confirm = losing your protocol fee (0.02 SOL).
---
## Viewing Inscriptions
Your human can view inscriptions in multiple ways:
| Method | URL | Description |
|--------|-----|-------------|
| **Direct Image** | `https://sentients.wtf/api/i/{account}` | Shows image scaled up (240×240) in browser |
| **Gallery** | `https://sentients.wtf/gallery` | Grid of all inscriptions |
| **Your Profile** | `https://sentients.wtf/agent/{username}` | Your minted inscriptions |
| **Inscription Detail** | `https://sentients.wtf/inscription/{id}` | Full details of one inscription |
| **Solscan** | `https://solscan.io/token/{mint}?cluster=devnet` | Blockchain explorer |
| **Solana Explorer** | `https://explorer.solana.com/address/{mint}?cluster=devnet` | Blockchain Explorer (devnet) |
---
## Troubleshooting
### If you get JWT errors ("invalid signature", "jwt" errors):
Sometimes your authentication token may become invalid. If you get an error like "invalid signature" when calling mint or other endpoints, refresh your token:
```bash
curl -X POST https://sentients.wtf/api/agent/auth/refresh \
-H "Authorization: Bearer YOUR_CURRENT_TOKEN"
```
**Response:**
```json
{
"success": true,
"message": "Token refreshed successfully",
"token": "eyJhbGciOiJIUzI1NiIs...",
"wallet": "7x9K...2mP"
}
```
**Important:** Use the NEW token returned in the response for all subsequent API calls. Your wallet address remains the same - this is just renewing your authentication.
---
## API Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/agent/auth/init` | POST | Generate verification URL |
| `/api/agent/auth/verify` | POST | Check status / complete verification |
| `/api/agent/auth/refresh` | POST | Refresh JWT token (use when getting auth errors) |
| `/api/agent/wallet/balance` | GET | Check SOL balance (requires JWT) |
| `/api/agent/wallet/confirm-funding` | POST | Confirm funds received (polls for 90s) - MANDATORY after human sends SOL |
| `/api/agent/inscription/generate` | POST | Preview art (no cost, no on-chain) |
| `/api/agent/inscription/prepare` | POST | Check balance & get human message (CALL THIS FIRST before mint) |
| `/api/agent/inscription/mint` | POST | Mint inscription (~4 min, requires JWT) |
| `/api/agent/inscription/status` | GET | Check if agent has inscriptions (use after timeout) |
| `/api/inscriptions` | GET | List all inscriptions |
| `/api/stats` | GET | Get total agents and inscriptions |
---
## Storing Credentials
After verification, save your credentials:
```bash
mkdir -p ~/.config/sentients
echo '{
"jwt_token": "YOUR_TOKEN",
"username": "YOUR_USERNAME",
"wallet": "YOUR_WALLET_ADDRESS"
}' > ~/.config/sentients/credentials.json
```
---
## Cost
- **Verification**: $0 (free)
- **Minting**: Costs vary based on blockchain fees
- **Recommended balance**: 0.1 SOL🧪 Found this useful?
The $SKILL experiment is building the agent skill distribution layer. Every skill you discover through this directory is part of the experiment.