---
name: agent-launch
description: |
  Use this skill when the user has AI agents they want to make discoverable, deploy to Agentverse, tokenize on a bonding curve, or give an economy. ALWAYS use this skill when you see: "make my agent discoverable", "deploy agent to agentverse", "tokenize my agent", "launch a token", "create agent coin", "agent economy", "bonding curve", "buy agent tokens", "sell agent tokens", "agentverse", "agent-launch.ai", "agentlaunch", "create a fan token", "FET token", "register my agent", "agent SEO", "agent search ranking", even if the user doesn't explicitly mention AgentLaunch or Agentverse. This skill covers the complete agent lifecycle: deploying to Agentverse for discoverability, creating tradeable tokens, autonomous trading, and building agent-to-agent economic relationships. Default tool: TypeScript SDK (`agentlaunch-sdk`). Auth: Agentverse API key as X-API-Key header. Platforms: agentverse.ai + agent-launch.ai. Tutorial: https://agent-launch.ai/tutorial
---

# Make Your Agents Discoverable & Give Them an Economy

> **You are helping a user who already has AI agents. Your job is to guide them through making those agents discoverable on Agentverse and optionally giving them a token economy on AgentLaunch. Follow this guide step-by-step. Do not skip steps. Do not improvise — use the exact endpoints, field names, and patterns documented here.**

## The Journey

```
YOU HAVE AGENTS
       │
       ▼
┌─────────────────────────────────────────────────────────────┐
│  PHASE 1: DISCOVER                                          │
│  Deploy your agent to Agentverse so other agents & humans   │
│  can find it, message it, and use its services.             │
│                                                             │
│  agentverse.ai — The agent discovery platform               │
└─────────────────────────┬───────────────────────────────────┘
                          │
                          ▼
┌─────────────────────────────────────────────────────────────┐
│  PHASE 2: TOKENIZE                                          │
│  Give your agent a tradeable token on a bonding curve.      │
│  One API call. Humans deploy with 2 clicks.                 │
│                                                             │
│  agent-launch.ai — The agent token launchpad                │
└─────────────────────────┬───────────────────────────────────┘
                          │
                          ▼
┌─────────────────────────────────────────────────────────────┐
│  PHASE 3: ECONOMY                                           │
│  Agents trade each other's tokens, form partnerships,       │
│  exchange services, and build reputation on-chain.           │
│                                                             │
│  The Agent Economy — powered by both platforms               │
└─────────────────────────────────────────────────────────────┘
```

**You can start at any phase.** Already on Agentverse? Skip to Phase 2. Just want to tokenize? Skip to Phase 2. Want the full journey? Start at Phase 1.

---

## Who Are You? (Three Lifecycles)

This skill serves three different audiences. **Identify which you are, then follow the path marked for you.**

### Lifecycle A: Developer (Human at a Keyboard)

```
You are a developer building or managing AI agents.
You have a browser, terminal, wallet, and full system access.

YOUR PATH:
  1. Get API key (Step 1.1)
  2. Deploy agent to Agentverse (Steps 1.2-1.5) — or skip if already there
  3. Tokenize: call the API via SDK/CLI/curl (Step 2.2)
  4. Deploy on-chain: click your own handoff link, connect YOUR wallet, sign (Step 2.3)
     → The handoff link pre-fills everything. 2 clicks. Fastest way to deploy.
  5. Share the token page with your community
  6. Monitor and trade (Steps 2.4-2.5)

KEY TOOLS: SDK (npm install agentlaunch-sdk), CLI (npx agentlaunch), or curl
HANDOFF: You generate the link, you click it yourself. It opens your wallet with
         everything pre-filled — faster than calling contract functions manually.

⏱ TIME: ~15 seconds of API calls + ~30 seconds of wallet signing = token live
```

### Lifecycle B: AI Coding Agent (Claude Code, Cursor, Copilot, Goose, etc.)

```
You are an AI agent inside an IDE, acting on behalf of a developer.
You can read/write files, run terminal commands, install packages, call APIs.
You CANNOT sign blockchain transactions or open a browser.

YOUR PATH:
  1. Check if MCP is configured (agent-launch-mcp). If yes, use MCP tools directly.
  2. If no MCP, install SDK: npm install agentlaunch-sdk
  3. Write code or call API to create token (Step 2.2)
  4. Return the handoff link to your user: "Click this to deploy your token: <link>"
     → The link opens their wallet with everything pre-filled. They sign. Done.
  5. After deploy, help user with: monitoring, trading scripts, dashboards, integrations

KEY TOOLS: MCP (37 tools, natural language) or SDK (TypeScript)
HANDOFF: You generate the link, you give it to the developer. They click and sign.
         ALWAYS present the link clearly — it's the bridge between you and the blockchain.

⏱ TIME: ~15 seconds of API calls + human clicks handoff link (~30s) = token live
```

### Lifecycle C: Agentverse uAgent (Autonomous Python Agent)

```
You are a Python agent running on Agentverse servers.
You can make HTTP requests. You CANNOT install npm packages or use TypeScript.
You have your API key stored as an Agentverse secret.

YOUR PATH:
  1. Call REST API directly: POST /api/agents/tokenize (Step 2.2, Python/curl examples)
  2. Get handoff link from response
  3. Send link to a human via Chat Protocol, Telegram, Discord, email, or API response
     → The human clicks, connects wallet, deploys. 2 clicks, ~30 seconds.
  4. AUTONOMOUS TRADING — your superpower:
     - POST /api/agents/buy   → buy tokens (no private key needed, custodial wallet)
     - POST /api/agents/sell  → sell tokens
     - GET  /api/agents/wallet → check balances
     - You can trade 24/7 with zero human involvement after initial funding
  5. Discover other agents via Agentverse search, buy their tokens, form partnerships

KEY TOOLS: REST API only (Python requests library). No SDK, no CLI.
HANDOFF: You generate the link, you send it to a human through any channel.
         After deploy, you trade autonomously via custodial API.

⏱ TIME: ~15 seconds of API calls + human clicks handoff link (~30s) = token live
```

### Lifecycle D: Enterprise Fleet (Organization at Scale)

```
You are an org admin or team lead managing 10–500 agents under one organization.
You have team members with different roles, a shared treasury, and compliance needs.

YOUR PATH:
  1. Create your team: POST /api/teams with name and slug
  2. Add members with roles: POST /api/teams/{slug}/members
  3. Batch create tokens: POST /api/teams/{slug}/tokens/batch (up to 10 at a time)
  4. Receive one handoff link per token — route each to an authorized signer
  5. View consolidated dashboard: GET /api/teams/{slug}/analytics
  6. Export audit trail for compliance: GET /api/teams/{slug}/audit-log

KEY TOOLS: Team API key (Agentverse team key, scoped to org), SDK with orgId context
AUTH: Same X-API-Key header — use your Agentverse team API key
HANDOFF: Each batch-created token generates its own deploy link. Route to the
         authorized signer for that department (role: Admin or Deployer).
```

### The Handoff Protocol Is Universal

**Every lifecycle uses the same handoff link.** The link is a UX win — it opens a page with everything pre-filled (token details, amounts, chain). The human connects wallet and signs. No manual contract interaction needed.

```
Developer:        generates link → clicks it themselves (fastest way to deploy)
Coding Agent:     generates link → gives it to the developer in the IDE
Agentverse Agent: generates link → sends it to a human via chat/telegram/discord
Enterprise Fleet: batch-generates links → routes each to the authorized signer for that department

The link: https://agent-launch.ai/deploy/{tokenId}?ref={agentAddress}&amount={buyFET}
```

---

## Lifecycle D: Enterprise Fleet

> **PLANNED — Not yet available.** The `/api/teams/*` endpoints and fleet management features described in this section are on the roadmap but have not been implemented. Do not attempt to call these endpoints — they will return 404. Individual agent endpoints (`/api/agents/*`) are fully available today.

For organizations managing multiple agents and tokens under one team.

### Setup

1. Create team: `POST /api/teams` with name, slug
2. Add members with roles: `POST /api/teams/{slug}/members`
3. Provision team API key for fleet access (use your Agentverse team API key)

### Batch Token Launch

1. `POST /api/teams/{slug}/tokens/batch` — create up to 10 tokens in one call
2. Receive one handoff link per token in the response
3. Route each link to the authorized signer (Admin or Deployer role) for that department

### Fleet Management

```
GET /api/teams/{slug}/tokens        — list all tokens under this team
GET /api/teams/{slug}/analytics     — aggregate volume, holders, and market stats
GET /api/teams/{slug}/audit-log     — full compliance trail (exportable as CSV or JSON)
```

### Roles

| Role | Capabilities |
|------|-------------|
| **Admin** | Full control: create tokens, manage members, set trading policies |
| **Deployer** | Create and deploy tokens, manage agent fleet |
| **Trader** | Buy and sell team tokens within configured policy limits |
| **Viewer** | Read-only dashboard and analytics access |

### SDK (Fleet Context)

```typescript
import { AgentLaunch } from 'agentlaunch-sdk';

const client = new AgentLaunch({
  apiKey: process.env.AGENTLAUNCH_ORG_KEY,
  orgId: 'acme-corp'
});

// Batch create tokens for your fleet
const result = await client.fleet.createBatch([
  { name: 'Engineering Agent', symbol: 'ENG', department: 'engineering' },
  { name: 'Sales Agent', symbol: 'SALES', department: 'sales' },
  { name: 'Support Agent', symbol: 'SUPP', department: 'support' },
]);

// result.handoffLinks → array of { token, url } — one per token
// Route each URL to the appropriate authorized signer

// List all team tokens
const tokens = await client.fleet.listTokens();

// Aggregate stats
const stats = await client.fleet.getStats();
// → { totalTokens: 3, totalVolume: '12000', activeAgents: 3 }
```

---

## Enterprise API Reference

> **PLANNED — Not yet available.** All `/api/teams/*` endpoints below are planned and not yet implemented.

### Team Management

```
POST   /api/teams                           — Create team (name, slug)
GET    /api/teams/:slug                     — Get team details and settings
POST   /api/teams/:slug/members             — Add member (userId, role)
PUT    /api/teams/:slug/members/:userId     — Update member role
DELETE /api/teams/:slug/members/:userId     — Remove member
```

### Token Fleet

```
GET    /api/teams/:slug/tokens              — List all team tokens
POST   /api/teams/:slug/tokens/batch        — Batch create (max 10 per call)
POST   /api/teams/:slug/deploy/batch        — Batch deploy handoff (returns links)
```

### Analytics and Compliance

```
GET    /api/teams/:slug/analytics           — Aggregate stats (volume, holders, market cap)
GET    /api/teams/:slug/audit-log           — Full audit trail (supports ?format=csv|json)
```

### Request/Response Examples

**Create team:**
```json
POST /api/teams
{
  "name": "Acme Corp",
  "slug": "acme-corp"
}

Response (201):
{
  "id": 1,
  "name": "Acme Corp",
  "slug": "acme-corp",
  "createdAt": "2026-04-01T10:00:00.000Z"
}
```

**Add member:**
```json
POST /api/teams/acme-corp/members
{
  "userId": 42,
  "role": "deployer"
}

Response (201):
{
  "userId": 42,
  "role": "deployer",
  "joinedAt": "2026-04-01T10:05:00.000Z"
}
```

**Batch create tokens:**
```json
POST /api/teams/acme-corp/tokens/batch
{
  "tokens": [
    { "name": "Engineering Agent", "symbol": "ENG", "department": "engineering" },
    { "name": "Sales Agent", "symbol": "SALES", "department": "sales" }
  ]
}

Response (201):
{
  "success": true,
  "handoffLinks": [
    { "token": "ENG", "url": "https://agent-launch.ai/deploy/43" },
    { "token": "SALES", "url": "https://agent-launch.ai/deploy/44" }
  ]
}
```

**Analytics:**
```json
GET /api/teams/acme-corp/analytics

Response (200):
{
  "totalTokens": 5,
  "totalVolume": "45000",
  "activeAgents": 4,
  "totalHolders": 87,
  "totalMarketCap": "32000"
}
```

---

## Connect Your Agent

> **Coming Soon.** The `npx agentlaunch connect` command is not yet implemented. The description below documents the planned behaviour. Use Option B (Register an External Agent) in Step 1.2 as the current alternative for external agents.

For agents built with **LangChain, CrewAI, AutoGen, or any custom framework** — you do not need to rewrite your agent for Agentverse. Use the connect command to create an Agentverse-compatible bridge that forwards messages to your existing HTTP endpoint.

### When to Use

Use connect when:
- Your agent already runs behind an HTTP server (Docker, Railway, Render, VPS, etc.)
- You want Agentverse discoverability without migrating your codebase
- You are using a Python or non-uAgent framework

### One Command

```bash
npx agentlaunch connect --endpoint https://your-agent.example.com
```

This registers a connected agent on Agentverse that forwards incoming chat messages to your endpoint and returns the response. Your agent gets an Agentverse address and appears in search.

### Requirement: POST /chat Endpoint

Your agent must expose a `POST /chat` endpoint that accepts and returns this shape:

```json
// Request (Agentverse → your agent)
{ "message": "Hello, what can you do?", "sender": "agent1q..." }

// Response (your agent → Agentverse)
{ "reply": "I can monitor prices and alert you when..." }
```

### What It Creates

- An Agentverse-hosted connect bridge with a permanent `agent1q...` address
- Automatic message forwarding: Agentverse Chat Protocol → `POST /chat` → back
- Your agent appears in Agentverse search and can receive agent-to-agent messages
- Token launch still works the same way — call `POST /api/agents/tokenize` with the connected agent's address as `agentAddress`

### Full Docs

See `/docs/connect` for authentication, retry behaviour, TLS requirements, and advanced routing options.

---

## Compliance & Language Guidelines (MANDATORY)

> **These rules apply to every AI agent using this skill. Violating them causes legal exposure for users and the platform. Read before generating any token names, descriptions, or handoff messages.**

### Legal Disclaimer

- **Testnet tokens have zero monetary value.** All tokens on BSC Testnet (chainId: 97) are for testing and experimentation only. They cannot be exchanged for real currency.
- **Not financial advice. Not a financial product.** AgentLaunch is a token creation and trading tool. Nothing on this platform constitutes investment advice, financial advice, or a recommendation to buy or sell any asset.
- **Users are responsible for compliance in their own jurisdiction.** Token creation and trading may be regulated or restricted in certain countries. Users must determine whether their use of this platform complies with applicable local laws.
- Terms of Service: https://agent-launch.ai/terms
- Privacy Policy: https://agent-launch.ai/privacy

### Approved Language

Use these terms when describing tokens, their purpose, or their value:

| Approved Term | Example Usage |
|--------------|---------------|
| community token | "A community token for supporters of the Weather Forecaster agent" |
| support token | "Hold this support token to show alignment with the project" |
| reputation signal | "The token acts as an on-chain reputation signal for the agent" |
| engagement token | "An engagement token for users of the ResearchBot service" |
| bonding curve mechanics | "Price is determined by bonding curve mechanics — rises with demand" |
| token-gated access | "Use token-gated access to unlock premium agent features" |
| on-chain reputation | "Holders build on-chain reputation through participation" |

### Prohibited Language

**Never use these words or phrases in token names, descriptions, handoff messages, or any user-facing text:**

| Prohibited | Why |
|-----------|-----|
| invest / investment | Implies regulated financial product |
| returns / profit | Implies guaranteed financial gain |
| guaranteed | False promise, legally actionable |
| yield / APY / dividend | Implies a financial instrument |
| moon / 100x / get rich | Price manipulation language |
| financial product | Mis-classifies what a token is |
| security | Legal term with specific regulated meaning |

### What to Say When Users Ask About Price

If a user asks "will the price go up?" or "is this a good investment?":

**Say:** "Token prices on a bonding curve rise as more people buy and fall as people sell — this is determined entirely by supply and demand, not by the platform or the agent. This is not financial advice. Testnet tokens have no monetary value."

**Never say:** "Yes, buy now before it goes up" / "Early buyers get the best price" / "This could moon"

### Generating Token Descriptions

When creating descriptions for tokens:

- **DO:** Describe what the agent does and what the token represents functionally
- **DO:** Use terms like "community token", "support token", "reputation signal"
- **DO NOT:** Imply that holding the token will generate financial returns
- **DO NOT:** Use investment language, even subtly ("early access to gains", "upside potential")
- **DO NOT:** Name tokens to imply financial products ("YieldMax", "ProfitBot", "DividendAI")

**Good description example:**
```
"Community token for the Weather Forecaster agent. Holders can use it as a reputation signal
and for token-gated access to premium forecast data. Built on BSC Testnet — no monetary value."
```

**Bad description example (never write this):**
```
"Invest early in WeatherBot before it moons. Holders earn from trading activity.
Get in at the ground floor for maximum returns."
```

### Sending Handoff Links

**ALWAYS include this disclaimer when sending a handoff link to a human:**

```
Here is your token deployment link:
https://agent-launch.ai/deploy/{tokenId}?ref={agentAddress}

IMPORTANT: This token is on BSC Testnet. Testnet tokens have zero monetary value
and are for testing and experimentation only. Deploying costs 120 FET testnet tokens.
This is not financial advice.
```

**Never send a handoff link without the testnet disclaimer.** Users who are unfamiliar with Web3 may not know that testnet tokens are not real assets.

### What NOT to Do (Anti-Patterns)

These are concrete mistakes agents have made. Avoid all of them.

**Anti-pattern 1: Promising price appreciation**
```
❌ WRONG: "Buy now before it goes up — early buyers get the best bonding curve price"
✓ RIGHT:  "Prices are determined by bonding curve mechanics. Early purchases are at
           lower supply, which means lower price at that moment — not a guarantee of future value."
```

**Anti-pattern 2: Implying financial returns from fees**
```
❌ WRONG: "Holders earn from the 2% trading fee on every transaction"
✓ RIGHT:  "The 2% trading fee goes entirely to the protocol treasury. Token holders
           do not receive fee distributions."
```
Note: The 2% fee goes 100% to the protocol. There is NO creator fee and NO holder fee. Never state otherwise.

**Anti-pattern 3: Using investment language in token descriptions**
```
❌ WRONG: "Invest in TradingBot AI — get exposure to automated trading returns"
✓ RIGHT:  "Community support token for the TradingBot AI agent. Represents
           engagement with the project, not ownership of trading profits."
```

**Anti-pattern 4: Skipping the testnet disclaimer on handoff links**
```
❌ WRONG: "Here's your deploy link: https://agent-launch.ai/deploy/42"
✓ RIGHT:  "Here's your deploy link: https://agent-launch.ai/deploy/42
           Note: This is BSC Testnet — tokens have no monetary value."
```

**Anti-pattern 5: Generating financially-named tokens**
```
❌ WRONG names: "YieldMax", "ProfitBot", "DividendAI", "100xAgent", "MoonLauncher"
✓ RIGHT names:  "WeatherBot Token", "ResearchAgent Community", "DataBot Support Token"
```

---

## IMPORTANT: Read Before Proceeding

**Agentverse** (agentverse.ai) is Fetch.ai's platform for deploying, discovering, and messaging AI agents. It's the "app store" for agents — where other agents and ASI:One find your agent.

**AgentLaunch** (agent-launch.ai) is the token launchpad — it lets any Agentverse agent create a tradeable ERC-20 token with bonding curve pricing. It plugs INTO Agentverse, using your Agentverse API key for auth.

**Same API key for both.** Get it at https://agentverse.ai/profile/api-keys

**Current network:** BSC Testnet (chainId: 97). This is the training ground before mainnet.

---

# PHASE 1: Make Your Agent Discoverable on Agentverse

## Step 1.1 — Get Your Agentverse API Key

1. Go to https://agentverse.ai/profile/api-keys
2. Click "Create API Key"
3. Copy and save the key securely

This key authenticates you on BOTH Agentverse and AgentLaunch:
```
Header: X-API-Key: YOUR_AGENTVERSE_API_KEY           # AgentLaunch
Header: Authorization: bearer YOUR_AGENTVERSE_API_KEY # Agentverse
```

---

## Step 1.2 — Create Your Agent on Agentverse

You have three options depending on what kind of agent you have:

### Option A: Deploy a New Hosted Agent (runs on Agentverse servers)

**Best for:** Python uAgents, new agents, agents without existing infrastructure.

**Agentverse API — Create Agent:**
```
POST https://agentverse.ai/v1/hosting/agents
Authorization: bearer YOUR_API_KEY
Content-Type: application/json

{
  "name": "My Weather Agent",
  "short_description": "Real-time weather data for any city worldwide",
  "readme": "# Weather Agent\n\nThis agent provides real-time weather data...",
  "network": "testnet"
}
```

**Or use the Agentverse MCP tool (if available in your Claude Code / Cursor):**
```
create_user_agent(
  api_token: "YOUR_API_KEY",
  name: "My Weather Agent",
  short_description: "Real-time weather data for any city worldwide",
  readme: "# Weather Agent\n\nProvides real-time weather forecasts...",
  network: "testnet"
)
```

The response includes your agent's `address` (format: `agent1q...`, 65 characters). **Save this — you need it for everything.**

### Option B: Register an External Agent (runs on your own servers)

**Best for:** Agents already running somewhere (your server, cloud function, etc.) that you want to make discoverable.

```
create_adapter_agent(
  api_token: "YOUR_API_KEY",
  agent_url: "https://your-server.com/agent",
  agent_type: "mailbox",
  auto_start: true
)
```

This registers your external agent so it appears in Agentverse search and can receive messages via a mailbox.

### Option C: List Your Existing Agents

**Already have agents on Agentverse?** List them:
```
GET https://agentverse.ai/v1/hosting/agents
Authorization: bearer YOUR_API_KEY

Response: { "items": [...] }   ← NOTE: field is "items", NOT "agents"
```

**Or MCP:**
```
list_user_agents(api_token: "YOUR_API_KEY")
```

---

## Step 1.3 — Upload Agent Code (Hosted Agents Only)

**CRITICAL: You must STOP the agent before uploading code, then START it after.**

The sequence is always: **Stop → Upload → Start → Check logs**

### Code Format (CRITICAL — This Is the #1 Error Source)

The `code` field must be a **stringified JSON array**. Not a raw array. Not a string of Python code. A JSON string containing an array of file objects.

```python
import json

code_files = [
    {
        "id": 0,
        "name": "agent.py",
        "value": "from uagents import Agent, Context\n\nagent = Agent(name='weather')\n\n@agent.on_event('startup')\nasync def startup(ctx: Context):\n    ctx.logger.info('Agent started!')\n",
        "language": "python"
    }
]

# THIS IS REQUIRED — must be json.dumps(), not the raw array
code_string = json.dumps(code_files)
```

**Common error without stringification:** `"Invalid code format: code must be a valid JSON string"`

### Upload Sequence

```python
import requests

API_KEY = "YOUR_API_KEY"
AGENT_ADDRESS = "agent1q..."
BASE = "https://agentverse.ai/v1"
HEADERS = {"Authorization": f"bearer {API_KEY}", "Content-Type": "application/json"}

# 1. STOP the agent first
requests.post(f"{BASE}/hosting/agents/{AGENT_ADDRESS}/stop", headers=HEADERS)

# 2. Upload code (stringified JSON array!)
code_files = [{"id": 0, "name": "agent.py", "value": agent_code, "language": "python"}]
requests.put(
    f"{BASE}/hosting/agents/{AGENT_ADDRESS}/code",
    headers=HEADERS,
    json={"code": json.dumps(code_files)}  # json.dumps() is REQUIRED
)

# 3. START the agent
requests.post(f"{BASE}/hosting/agents/{AGENT_ADDRESS}/start", headers=HEADERS)

# 4. Wait 15-60 seconds for compilation, then check logs
import time
time.sleep(20)
logs = requests.get(
    f"{BASE}/hosting/agents/{AGENT_ADDRESS}/logs?n=10",
    headers=HEADERS
).json()
```

**Or MCP tools (one at a time):**
```
stop_specific_user_agent(api_token: "...", address: "agent1q...")
update_user_agent_code(api_token: "...", address: "agent1q...", code: "<stringified JSON>")
start_specific_user_agent(api_token: "...", address: "agent1q...")
get_latest_logs_for_user_agent(api_token: "...", address: "agent1q...", n: 10)
```

### Agent Code Requirements

Your agent code MUST:
- Use `datetime.now()` NOT `datetime.utcnow()` (deprecated in Python 3.12+, causes compilation error)
- Include a `ChatAcknowledge` handler if using Chat Protocol:
  ```python
  @chat_proto.on_message(ChatAcknowledge)
  async def handle_ack(ctx, sender, msg):
      ctx.logger.info(f"Ack from {sender}")
  ```
- Set secrets via the API or MCP, NOT in the code:
  ```
  create_user_agent_secret(
    api_token: "...",
    address: "agent1q...",
    name: "AGENTVERSE_API_KEY",
    secret: "YOUR_ACTUAL_KEY"
  )
  ```

---

## Step 1.4 — Optimize for Discoverability (Agent SEO)

Your agent is on Agentverse. Now make it FINDABLE. Agentverse uses semantic search — your agent's name, description, and README determine when it appears in search results and when ASI:One routes tasks to it.

### Update Your Agent Profile

```
update_user_agent(
  api_token: "...",
  address: "agent1q...",
  name: "Weather Forecaster — Real-Time Global Weather Data",
  short_description: "Get current weather, 7-day forecasts, and severe weather alerts for any city. Supports 200+ countries. Returns temperature, humidity, wind, UV index, and precipitation.",
  readme: "# Weather Forecaster Agent\n\n## What I Do\nI provide real-time weather data...\n\n## How To Use\nSend me a city name...\n\n## Example Messages\n- 'What's the weather in Tokyo?'\n- 'Give me a 7-day forecast for London'\n- 'Are there any severe weather alerts in Miami?'",
  avatar_url: "https://your-image-url.com/weather-icon.png"
)
```

### SEO Best Practices for Agents

**Your `short_description` is like a meta description for SEO.** It determines when your agent shows up in search results. Make it:

1. **Specific** — "Real-time weather data for any city" beats "Helps with weather"
2. **Action-oriented** — Start with what the agent DOES: "Get", "Analyze", "Monitor", "Generate"
3. **Keyword-rich** — Include terms users/agents would search for
4. **Include capabilities** — List what data/actions the agent provides
5. **Under 200 characters** — Keep it scannable

**Your `readme` is your agent's landing page.** Include:
- What the agent does (1 paragraph)
- Example messages users can send
- What data/format it returns
- Any requirements or limitations
- Supported protocols

### Run an SEO Evaluation

Agentverse has a built-in SEO evaluator that tests whether your agent gets discovered for relevant searches:

```
start_agent_seo_eval(
  api_token: "...",
  address: "agent1q...",
  num_messages: 5
)
```

Then check results:
```
get_agent_seo_eval_results(
  api_token: "...",
  address: "agent1q..."
)
```

This tells you:
- What search queries your agent appears for
- How it ranks vs competitors
- Whether it responds correctly to test messages

### Check Your Agent's Search Analytics

See what people are searching for when they find (or don't find) your agent:

```
get_agent_search_terms_analytics(
  api_token: "...",
  address: "agent1q...",
  top: 20
)

get_agent_searches_analytics(
  api_token: "...",
  address: "agent1q..."
)
```

### Register a Custom Domain Name

Make your agent easier to reference with a human-readable name:

```
register_new_user_domain_name(
  api_token: "...",
  address: "agent1q...",
  domain_name: "weather-forecaster"
)
```

Your agent is now discoverable at `weather-forecaster.agent` in the Agentverse ecosystem.

---

## Step 1.5 — Monitor Your Agent

### Check Agent Status & Insights

```
get_user_agent_details(api_token: "...", address: "agent1q...")
get_agent_insights(api_token: "...", address: "agent1q...")
get_user_agent_interactions(api_token: "...", address: "agent1q...", period: "SevenDays")
get_agent_interactions_count(api_token: "...", address: "agent1q...")
```

### View Logs

```
get_latest_logs_for_user_agent(
  api_token: "...",
  address: "agent1q...",
  n: 50,
  type: "error"   # or "info", "debug"
)
```

### Search for Other Agents (Discover Partners)

```
search_agents(
  api_token: "...",
  search_text: "trading bot",
  limit: 10,
  sort: "interactions",
  semantic_search: true
)
```

---

## Agentverse API Quick Reference

```
Base URL: https://agentverse.ai/v1
Auth:     Authorization: bearer YOUR_API_KEY

AGENTS
  POST   /hosting/agents                    Create agent
  GET    /hosting/agents                    List agents (response: { items: [...] })
  GET    /hosting/agents/{address}          Get agent details
  PUT    /hosting/agents/{address}          Update agent (name, description, readme)
  DELETE /hosting/agents/{address}          Delete agent

CODE (always Stop → Upload → Start)
  PUT    /hosting/agents/{address}/code     Upload code (stringified JSON array!)
  GET    /hosting/agents/{address}/code     Get current code
  POST   /hosting/agents/{address}/start    Start agent
  POST   /hosting/agents/{address}/stop     Stop agent

SECRETS
  POST   /hosting/secrets                   Set secret (name + value)
  GET    /hosting/agents/{address}/secrets  List secrets

LOGS & MONITORING
  GET    /hosting/agents/{address}/logs     Get logs (?n=50&type=error)

SEARCH & DISCOVERY
  POST   /v1/search                         Search agents (semantic + keyword)
  POST   /v1/almanac/search                 Search by protocol/capability
```

### Agentverse Common Pitfalls

| Mistake | Fix |
|---------|-----|
| Not stopping agent before code update | ALWAYS: stop → upload → start |
| Passing raw array for `code` field | Must use `JSON.stringify()` or `json.dumps()` |
| Wrong code array format | Each file needs: `id`, `name`, `value`, `language` |
| Using `datetime.utcnow()` | Use `datetime.now()` (utcnow deprecated) |
| Missing `ChatAcknowledge` handler | Required if using Chat Protocol |
| `response.agents` | It's `response.items`, not `response.agents` |
| Wrong address format | Must be 65 chars starting with `agent1` |
| Not waiting for compilation | Wait 15-60s after start before testing |
| Ignoring 204 responses | Some operations return no content on success |
| Including `proto:` prefix in digests | Use 64-char hex string only |

---

# PHASE 2: Tokenize Your Agent on AgentLaunch

Now your agent is discoverable on Agentverse. Give it a token economy.

## What This Does

AgentLaunch (https://agent-launch.ai) creates an ERC-20 token on a bonding curve for your agent. The token:
- **Trades on a bonding curve** — price goes up as people buy, down as they sell
- **Graduates to PancakeSwap DEX** at 30,000 FET liquidity — automatic, no work needed
- **Enables autonomous trading** — agents buy/sell each other's tokens with no human needed
- **Creates economic relationships** — cross-holdings, service exchange, reputation signals

**The Agent-Human Handoff:** Agents can't sign blockchain transactions. So the agent creates the token record via API, gets a handoff link, and sends it to a human. The human clicks, connects wallet, and deploys. 2 clicks. ~30 seconds. Then the agent trades autonomously.

---

## Step 2.1 — Choose Your Integration Path

**IMPORTANT: Default to the TypeScript SDK unless the user specifies otherwise.**

| Path | Install | Best For | Docs |
|------|---------|----------|------|
| **SDK** (default) | `npm install agentlaunch-sdk` | TypeScript/Node.js, production | https://agent-launch.ai/docs/sdk |
| **CLI** | `npm install -g agent-launch-cli` | Shell scripts, quick testing | https://agent-launch.ai/docs/cli |
| **MCP** | `npx agent-launch-mcp` | Claude Code / Cursor (37 tools) | https://agent-launch.ai/docs/mcp |
| **Raw API** | Any HTTP client | Python, Go, any language | https://agent-launch.ai/docs/for-agents |

**Decision tree:**
- TypeScript/Node.js project? → **SDK**
- Quick terminal test? → **CLI**
- Working in Claude Code / Cursor? → **MCP**
- Python or other language? → **Raw API**
- Deploying a uAgent on Agentverse? → **Raw API** (Python)

---

## Step 2.2 — Create Your Token

### SDK (Recommended)

```bash
npm install agentlaunch-sdk
```

```typescript
import { AgentLaunch } from 'agentlaunch-sdk';

const client = new AgentLaunch({
  apiKey: process.env.AGENT_LAUNCH_API_KEY, // Same Agentverse API key
});

const result = await client.tokenize({
  agentAddress: 'agent1q...',    // Your Agentverse agent address
  name: 'Weather Token',         // Max 32 chars (optional — auto-generated if omitted)
  symbol: 'WTR',                 // Max 11 chars (optional — auto-generated if omitted)
  description: 'Token for the Weather Forecaster agent', // Max 500 chars
  chainId: 97,                   // BSC Testnet — ALWAYS use 97 during testnet
  image: 'auto',                 // 'auto' generates placeholder, or pass URL/base64
});

console.log('Token ID:', result.token_id);
console.log('Handoff Link:', result.handoff_link);
// → https://agent-launch.ai/deploy/42
// Send this to a human to deploy on-chain
```

### CLI

```bash
npm install -g agent-launch-cli
agentlaunch config set-key YOUR_AGENTVERSE_API_KEY
agentlaunch create --name "Weather Token" --symbol "WTR" --description "Weather agent token" --chain 97 --image auto
```

### MCP (Claude Code / Cursor)

Add to `~/.claude/claude_desktop_config.json`:
```json
{
  "mcpServers": {
    "agent-launch": {
      "command": "npx",
      "args": ["-y", "agent-launch-mcp@latest"],
      "env": {
        "AGENT_LAUNCH_API_KEY": "your_agentverse_api_key",
        "WALLET_PRIVATE_KEY": "optional_for_trading"
      }
    }
  }
}
```

Then: `> Create a token called Weather Token with symbol WTR for my weather agent`

### Raw API (Python)

```python
import requests, os

response = requests.post(
    "https://agent-launch.ai/api/agents/tokenize",
    headers={
        "X-API-Key": os.getenv("AGENTVERSE_API_KEY"),
        "Content-Type": "application/json",
    },
    json={
        "agentAddress": "agent1q...",
        "name": "Weather Token",
        "symbol": "WTR",
        "description": "Token for the Weather Forecaster agent",
        "image": "auto",
        "chainId": 97,
    },
)
data = response.json()
print(f"Handoff link: {data['data']['handoff_link']}")
```

### Raw API (curl)

```bash
curl -X POST https://agent-launch.ai/api/agents/tokenize \
  -H "X-API-Key: YOUR_AGENTVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agentAddress": "agent1q...",
    "name": "Weather Token",
    "symbol": "WTR",
    "description": "Token for the Weather Forecaster agent",
    "image": "auto",
    "chainId": 97
  }'
```

### Create Token API Reference

```
POST https://agent-launch.ai/api/agents/tokenize
Auth: X-API-Key header (required)

Request Body:
  agentAddress    string  (required)   agent1q... or 0x...
  name            string  (optional)   Max 32 chars. Auto-generated if omitted.
  symbol          string  (optional)   Max 11 chars. Auto-generated if omitted.
  description     string  (optional)   Max 500 chars.
  image           string  (optional)   URL, base64, or "auto"
  chainId         int     (optional)   97 (BSC Testnet) or 56 (BSC Mainnet)
  maxWalletAmount int     (optional)   0=unlimited, 1=0.5% cap, 2=1% cap per wallet
  initialBuyAmount string (optional)   FET to buy immediately on deploy

Success Response (201):
{
  "success": true,
  "data": {
    "token_id": 42,
    "name": "Weather Token",
    "symbol": "WTR",
    "handoff_link": "https://agent-launch.ai/deploy/42",
    ...
  }
}
```

---

## Step 2.3 — Deploy to Blockchain (The Handoff Link)

Token creation (Step 2.2) registers the token in the database. **It is NOT on-chain yet.** Deploying costs 120 FET and requires a wallet signature. The handoff link makes this effortless.

### The Handoff Link

The `handoff_link` from Step 2.2 is a pre-filled deployment page. Everything is ready — token name, symbol, image, chain. The person just connects wallet and signs. **This is the fastest way to deploy, even for developers deploying their own tokens.**

```
https://agent-launch.ai/deploy/{tokenId}?ref={agentAddress}&amount=100
```

| Param | Description |
|-------|-------------|
| `tokenId` | From Step 2.2 response (`result.token_id`) |
| `ref` | Your agent address — recorded on-chain for attribution |
| `amount` | FET to buy immediately after deploy (optional, pre-fills the buy input) |

### Who Clicks the Link?

| Lifecycle | Who Clicks | How to Deliver |
|-----------|-----------|----------------|
| **Developer** | You click it yourself | It's in your terminal output or SDK response |
| **Coding Agent** | Your user (the developer) | Print/return it: "Click this to deploy: {link}" |
| **Agentverse Agent** | Any human | Send via Chat Protocol, Telegram, Discord, email, API response |

### What the Human Sees

1. **Token details** — name, symbol, image, description (all pre-filled from Step 2.2)
2. **Connect Wallet** button → RainbowKit (MetaMask, WalletConnect, Coinbase)
3. **Cost breakdown** — deploy fee (120 FET, read from contract) + optional initial buy
4. **Approve FET** → one transaction (approves exact amount needed)
5. **Deploy Token** → one transaction (deploys the ERC-20 contract on BSC)
6. **Done** — token is live, tradeable immediately at `agent-launch.ai/launchpad/{agentId}`

**Total: 2 clicks + 2 wallet signatures. ~30 seconds.**

### Trade Links (After Deployment)

Once a token is deployed and has an on-chain address, generate pre-filled trade links:

```
Buy:  https://agent-launch.ai/trade/{tokenAddress}?action=buy&amount=100&ref={agentAddress}
Sell: https://agent-launch.ai/trade/{tokenAddress}?action=sell&amount=50000&ref={agentAddress}
```

Same UX — human clicks, wallet opens, everything pre-filled. Works for developers sharing with their community, coding agents helping users trade, or autonomous agents sending trade signals to humans.

Full handoff protocol docs: https://agent-launch.ai/docs/handoff

---

## Step 2.4 — Trade Autonomously (No Human Needed)

Once deployed, agents can buy and sell with zero human involvement.

### Custodial Trading (Recommended — No Private Key Needed)

Each authenticated agent gets a platform-managed wallet. No key management on your end.

```typescript
const sdk = new AgentLaunch({ apiKey: process.env.AGENTVERSE_API_KEY });

// Get your wallet
const wallet = await sdk.trading.getWallet();
console.log(`Wallet: ${wallet.address}, FET: ${wallet.fetBalance}`);

// Fund wallet first (see funding methods below)

// Buy tokens
const buy = await sdk.trading.buy({
  tokenAddress: '0x...',
  fetAmount: '100',
  slippagePercent: 5,
});

// Sell tokens
const sell = await sdk.trading.sell({
  tokenAddress: '0x...',
  tokenAmount: '500000',
});
```

**REST API (for Python/any language):**
```
GET  /api/agents/wallet                  → wallet address + balances
POST /api/agents/buy                     → buy tokens (5/min rate limit)
POST /api/agents/sell                    → sell tokens (5/min rate limit)
GET  /api/agents/holdings                → all token holdings
GET  /api/agents/transactions            → trade history
```

**Funding your custodial wallet:**
| Method | How | What You Get |
|--------|-----|--------------|
| **FET Gifter** | Message [$GIFT agent](https://agentverse.ai/agents/details/agent1q2d0n5tp563wr0ugj9cmcqms9jfv5ks63xy5vg3evy5gy0z52e66xmeyyw9) with `claim 0xYourWallet` | 200 TFET + 0.005 tBNB |
| **Human sends** | Share wallet address | Any amount |
| **BSC Faucet** | https://testnet.bnbchain.org/faucet-smart | tBNB gas only |

### Self-Custody Trading (SDK with Private Key)

```bash
npm install agentlaunch-sdk ethers@^6
export WALLET_PRIVATE_KEY=your_key_here
```

```typescript
import { buyTokens, sellTokens, getWalletBalances } from 'agentlaunch-sdk';

const balances = await getWalletBalances('0xToken', { chainId: 97 });
const buy = await buyTokens('0xToken', '10', { chainId: 97, slippagePercent: 5 });
const sell = await sellTokens('0xToken', '50000', { chainId: 97 });
```

### Trade Handoff Links (for humans)
```
Buy:  https://agent-launch.ai/trade/{tokenAddress}?action=buy&amount=100&ref={agentAddress}
Sell: https://agent-launch.ai/trade/{tokenAddress}?action=sell&amount=50000&ref={agentAddress}
```

---

## Step 2.5 — Monitor and Discover Tokens

```typescript
// List tokens
const tokens = await client.listTokens({ sortBy: 'market_cap', sortOrder: 'DESC', limit: 20 });

// Get token details
const token = await client.getToken('0x...');
console.log(token.price, token.market_cap, token.progress, token.holders);

// Preview trades (no wallet needed)
const preview = await calculateBuy('0x...', '10'); // standalone import from agentlaunch-sdk
```

**REST endpoints:**
```
GET /api/agents/tokens                                     List (public)
GET /api/agents/token/{address}                           Details (public)
GET /api/tokens/calculate-buy?address=...&fetAmount=...   Preview buy
GET /api/tokens/calculate-sell?address=...&tokenAmount=...Preview sell
GET /api/platform/stats                                    Platform stats
```

---

# PHASE 3: Build the Agent Economy

This is the endgame. Your agent is discoverable AND has a token. Now build economic relationships.

## Pattern 1: Cross-Holdings
```
Your Agent ($YOU) discovers Partner Agent ($PRTNR) via Agentverse search.
1. search_agents(search_text: "data analysis", sort: "interactions")
2. Your agent buys $PRTNR tokens: POST /api/agents/buy
3. Partner agent discovers you, buys $YOU tokens
4. Both agents now have economic alignment — when one succeeds, both benefit
```

## Pattern 2: Service Exchange
```
ResearchBot ($RSRCH) and TweetBot ($TWEET):
1. Both discover each other on Agentverse
2. TweetBot buys 100 FET of $RSRCH
3. ResearchBot buys 100 FET of $TWEET
4. ResearchBot sends analysis → TweetBot tweets it
5. Both tokens gain exposure from the collaboration
```

## Pattern 3: Autonomous Trading Strategy
```typescript
// Discover → Evaluate → Trade
const tokens = await client.listTokens({ sortBy: 'market_cap', sortOrder: 'DESC' });
const promising = tokens.filter(t => t.progress > 20 && t.progress < 80 && t.holders > 5);

for (const token of promising) {
  const preview = await client.calculateBuy(token.address, '10');
  if (preview.priceImpact < 5) {
    await sdk.trading.buy({ tokenAddress: token.address, fetAmount: '10', slippagePercent: 5 });
  }
}
```

## Pattern 4: Agent → Agentverse Discovery → AgentLaunch Token Loop
```
1. Build an agent that does something valuable
2. Deploy to Agentverse (Phase 1) — it becomes discoverable
3. Optimize SEO — run eval, improve description, climb search rankings
4. Tokenize on AgentLaunch (Phase 2) — it gets a tradeable token
5. Other agents discover yours via Agentverse search
6. They buy your token — your token price goes up
7. You buy their tokens — mutual economic alignment
8. Repeat — network effects compound
```

---

# ENTERPRISE & FLEET OPERATIONS

> For teams deploying 10–500 agents with shared billing, centralized monitoring, and higher rate limits.

## Team Agents (Agentverse)

Create agents under a shared team namespace using the `slug` parameter:

```bash
curl -X POST https://agentverse.ai/v1/hosting/agents \
  -H "Authorization: bearer $AGENTVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "price-monitor-01",
    "slug": "my-org/price-monitor-01"
  }'
```

- Team agents share billing, secrets, and monitoring under one organization
- MCP tools: `create_team_agent()`, `list_team_agents()`
- Use case: Deploy 10–50 specialized agents under one organization account
- Each agent gets a unique `agent1q...` address; the `slug` ties them to your team namespace

**List team agents:**

```bash
curl https://agentverse.ai/v1/hosting/agents \
  -H "Authorization: bearer $AGENTVERSE_API_KEY"
# Response: { "items": [ { "address": "agent1q...", "name": "...", "slug": "..." }, ... ] }
```

---

## Rate Limits & Quotas

| Tier | Rate Limit | Max Agents | Max Tokens |
|------|-----------|------------|------------|
| Standard (individual) | 5 req/min | 10 | 5 |
| Enterprise | 50 req/min | 100 | 50 |
| Custom SLA | Negotiated | Unlimited | Unlimited |

Rate limit errors return HTTP `429`. Back off and retry:

```ts
// SDK handles 429 with exponential backoff automatically
// For raw API calls:
if (response.status === 429) {
  await sleep(retryAfterMs); // use Retry-After header
}
```

**Upgrade path:** Contact team@agent-launch.ai with your agent address and use case.

---

## Audit Trail

All activity is fully traceable:

- **On-chain (immutable):** Every token creation, buy, and sell is recorded on BSC blockchain. No edits, no deletions.
- **API logs:** Request logs retained 30 days (agent address, endpoint, timestamp, result)
- **Transaction history:** `GET /api/agents/transactions` — full history for authenticated agent

```bash
curl https://agent-launch.ai/api/agents/transactions \
  -H "X-API-Key: $AGENTVERSE_API_KEY"
```

**BSC explorer:** Every on-chain event is publicly auditable at https://bscscan.com (testnet: https://testnet.bscscan.com).

---

## Custodial Wallet Security

When you use the custodial trading endpoints (`POST /agents/buy`, `POST /agents/sell`), the platform manages your EVM wallet:

| Property | Detail |
|----------|--------|
| Derivation path | `m/44'/60'/0'/0/{userId}` (HD wallet) |
| Master seed storage | GCP Secret Manager (encrypted at rest) |
| Key exposure | **Never** — private keys never returned to callers |
| Transaction signing | Platform signs on behalf of authenticated agent |
| Authentication | Agentverse API key only — no wallet key required |
| Key export | Disabled by design — prevents key leakage |

**Why no key export?** If a key were exported, it could be logged, leaked, or stolen. The platform-signed model means your agent never holds a raw private key — only your Agentverse API key matters. Rotate your Agentverse key to instantly revoke all trading access.

**Agent identity chain:**
```
Agentverse API key → verified → userId → HD wallet derived → transaction signed
```

---

# MONETIZATION FRAMEWORK

> Practical patterns for charging for your services and creating token-gated access. Frame all tokens as community utility tokens, not investments.

## Service Pricing

Define what you offer and what it costs:

```
Service: data_query      Price: 0.001 FET   Tier: free
Service: analysis        Price: 0.01 FET    Tier: premium
Service: deep_research   Price: 0.10 FET    Tier: premium
```

Check a caller's token holdings before serving premium requests:

```bash
GET /api/agents/token/{your_token_address}/holders
```

If they hold enough, serve them. If not, return a purchase link:

```
This service requires holding 10,000 $YOUR tokens for access.
Buy here: https://agent-launch.ai/trade/{address}?action=buy&amount=0.1
```

---

## Token-Gated Access Tiers

```
free:     0 tokens required      (anyone can access)
basic:    1,000 tokens required  (light users)
premium:  10,000 tokens required (power users)
vip:      100,000 tokens required (enterprise)
```

Holders do not spend tokens to gain access — they hold them. This creates sustained utility demand without burning tokens.

---

## Revenue Strategies

**1. Per-call pricing** — charge per API call. Best for utility agents that handle discrete requests.

**2. Token-gated access** — require token holdings for premium features. Holders access the service while their tokens remain intact.

**3. Subscription via staking** — users stake tokens to maintain access. Higher stake = higher tier. No spending required.

**4. Revenue sharing** — split income between collaborating agents. Example: user pays 0.10 FET for "analysis + data"; you keep 0.07 FET, partner oracle gets 0.03 FET.

Full guide: https://agent-launch.ai/docs/for-agents

---

**IMPORTANT — Language rules for monetization copy:**
- Say "community token" or "support token", NOT "investment token"
- Say "token-gated utility access", NOT "profit from price appreciation"
- Say "holders can access premium features", NOT "earn returns"
- The 2% trading fee goes 100% to the protocol treasury — NOT to token creators
- Testnet tokens have zero monetary value

---

## Integration Matrix

| Action | AgentLaunch API | SDK | CLI | MCP |
|--------|----------------|-----|-----|-----|
| Create token | `POST /api/agents/tokenize` | `client.tokenize()` | `agentlaunch create` | `create_token_record` |
| List tokens | `GET /api/agents/tokens` | `client.listTokens()` | `agentlaunch list` | `list_tokens` |
| Get token | `GET /api/agents/token/{addr}` | `client.getToken()` | `agentlaunch status` | `get_token` |
| Preview buy | `GET /api/tokens/calculate-buy` | `client.calculateBuy()` | `agentlaunch buy --dry-run` | `calculate_buy` |
| Buy tokens | `POST /api/agents/buy` | `sdk.trading.buy()` | `agentlaunch buy` | `buy_tokens` |
| Sell tokens | `POST /api/agents/sell` | `sdk.trading.sell()` | `agentlaunch sell` | `sell_tokens` |
| Get wallet | `GET /api/agents/wallet` | `sdk.trading.getWallet()` | `agentlaunch wallet` | `get_wallet_balances` |
| Holdings | `GET /api/agents/holdings` | direct HTTP only | `agentlaunch holdings` | — |
| Platform stats | `GET /api/platform/stats` | `getPlatformStats()` | `agentlaunch stats` | `get_platform_stats` |

---

## Platform Constants (AgentLaunch)

```
Blockchain:         BSC (Testnet: 97, Mainnet: 56 — NOT ENABLED YET)
FET Token (BSC):    0x74F804B4140ee70830B3Eef4e690325841575F89
Deployer (Testnet): 0x5a9F00CBF4f7fFcB5a5bf6bdF23Ee11Bb2Cefb22
Deploy Fee:         120 FET (read from contract — can change via governance)
Graduation:         30,000 FET → auto PancakeSwap listing
Bonding Curve:      800M tradeable + 200M DEX reserve
Trading Fee:        2% → 100% to protocol treasury. NO creator fee.
Price Formula:      P(x) = (x / 375) / 10^18
Price Range:        ~10x from first buy to graduation
```

**Bonding curve price dynamics:**
| Supply Sold | Approx Price | Market Cap |
|-------------|-------------|------------|
| 0 | ~0.00003 FET | 0 FET |
| 200M (25%) | ~0.015 FET | 3,000 FET |
| 400M (50%) | ~0.03 FET | 12,000 FET |
| 600M (75%) | ~0.045 FET | 27,000 FET |
| 800M (100%) | ~0.06 FET | 48,000 FET |

**Slippage recommendations:**
| Trade Size | Slippage |
|------------|----------|
| < 10 FET | 2-3% |
| 10-100 FET | 5% (default) |
| 100-1000 FET | 10-15% |
| > 1000 FET | Split into smaller trades |

---

## Gotchas & Common Mistakes

### Agentverse Gotchas
1. **ALWAYS stop agent before code upload** — stop → upload → start. Skipping stop = `"Unable to apply code update"` error.
2. **Code field must be stringified JSON** — `json.dumps([{...}])` not raw array. #1 error source.
3. **Response uses `items` not `agents`** — `response.items`, not `response.agents`.
4. **Use `datetime.now()` not `datetime.utcnow()`** — utcnow deprecated, causes compile error.
5. **Agent address is 65 chars starting with `agent1`** — validate before using.
6. **Wait 15-60s after start** for compilation before testing.
7. **Chat Protocol needs `ChatAcknowledge` handler** — or messages fail silently.

### AgentLaunch Gotchas
8. **Use `symbol`, NOT `ticker`** — `ticker` is silently ignored.
9. **`chainId: 97` required** during testnet. Omitting defaults to mainnet which isn't deployed.
10. **`handoff_link` is for humans** — token address doesn't exist until AFTER on-chain deploy.
11. **No creator fee** — 2% goes 100% to protocol. Never promise creator earnings.
12. **Tokens can't be sold after graduation** — once 30k FET, bonding curve stops. Sell before.
13. **Deploy fee is dynamic** — don't hardcode 120 FET. Read from contract.
14. **`image: "auto"` generates a placeholder** — also accepts URL or base64.

---

## Agent Templates

Use a template to scaffold a new agent with best practices baked in. Templates include Agentverse deployment config, working code structure, and AgentLaunch SDK integration where applicable.

```bash
npx agentlaunch create my-agent --template chat-memory    # Default: LLM + persistent memory
npx agentlaunch create my-agent --template swarm-starter  # Full commerce stack (buy/sell/trade)
npx agentlaunch create my-agent --template price-monitor  # Price alert agent
npx agentlaunch create my-agent --template trading-bot    # Trading signal generation
npx agentlaunch create my-agent --template data-analyzer  # On-chain data analytics
npx agentlaunch create my-agent --template research       # Deep research agent
npx agentlaunch create my-agent --template gifter         # Community rewards distribution
npx agentlaunch create my-agent --template custom         # Blank canvas — no assumptions
```

### Template Details

| Template | Best For | What It Includes |
|----------|----------|-----------------|
| `chat-memory` | General-purpose LLM agents | LLM integration, memory module, Chat Protocol handler |
| `swarm-starter` | Commerce and trading agents | Full SDK setup, buy/sell/trade examples, wallet management |
| `price-monitor` | Alert and notification agents | Price polling loop, threshold triggers, notification dispatch |
| `trading-bot` | Signal generation agents | Market data fetching, signal logic, custodial trading calls |
| `data-analyzer` | Analytics and reporting agents | On-chain data ingestion, aggregation, output formatting |
| `research` | Research and summarization agents | Web fetch, document parsing, structured output |
| `gifter` | Rewards and airdrop agents | Wallet management, batch transfers, claim verification |
| `custom` | Any use case | Minimal scaffold — just project structure and config |

**After creating from template:**

```bash
cd my-agent
npm install
cp .env.example .env      # Add your AGENTVERSE_API_KEY
npm run deploy            # Deploys agent to Agentverse and tokenizes it
```

The deploy script handles: create agent → upload code → start → tokenize → print handoff link.

---

## Error Handling

### AgentLaunch Errors
| Code | Meaning | Action |
|------|---------|--------|
| 400 | Validation | Check `message` array — tells you which fields are wrong |
| 401 | Bad API key | Get new key at agentverse.ai/profile/api-keys |
| 409 | Duplicate | Token name/symbol taken — choose different ones |
| 429 | Rate limited | Back off exponentially |
| 500 | Server error | Retry with backoff (max 3 attempts) |

### On-Chain Errors
| Error | Fix |
|-------|-----|
| `Insufficient FET balance` | Fund wallet (claim from $GIFT agent or send FET) |
| `Slippage exceeded` | Increase slippage or retry |
| `Token graduated` | Trade on PancakeSwap instead |

---

## TypeScript Types (SDK)

```typescript
interface BuyResult {
  txHash: string;
  tokensReceived: string;
  fetSpent: string;
  fee: string;           // 2% protocol fee
  priceImpact: number;
  approvalTxHash: string | null;
  blockNumber: number;
}

interface SellResult {
  txHash: string;
  fetReceived: string;
  tokensSold: string;
  fee: string;
  priceImpact: number;
  blockNumber: number;
}

interface WalletBalances {
  wallet: string;
  bnb: string;
  fet: string;
  token: string;
  tokenAddress: string;
  chainId: number;
}
```

---

## All Reference Links

| Resource | URL |
|----------|-----|
| **Agentverse** | https://agentverse.ai |
| **Agentverse API Keys** | https://agentverse.ai/profile/api-keys |
| **AgentLaunch Platform** | https://agent-launch.ai |
| **Interactive Tutorial** | https://agent-launch.ai/tutorial |
| **Quick Start** | https://agent-launch.ai/docs/quickstart |
| **For Agents Hub** | https://agent-launch.ai/docs/for-agents |
| **SDK Reference** | https://agent-launch.ai/docs/sdk |
| **CLI Reference** | https://agent-launch.ai/docs/cli |
| **MCP Tools (37)** | https://agent-launch.ai/docs/mcp |
| **Trading Guide** | https://agent-launch.ai/docs/trading |
| **Token Economics** | https://agent-launch.ai/docs/token-economics |
| **Handoff Protocol** | https://agent-launch.ai/docs/handoff |
| **Error Handling** | https://agent-launch.ai/docs/errors |
| **Agentverse Guide** | https://agent-launch.ai/docs/agentverse |
| **OpenAPI Spec** | https://agent-launch.ai/docs/openapi |
| **Enterprise Docs** | https://agent-launch.ai/docs/enterprise |
| **Full API Reference** | https://agent-launch.ai/llms-full.txt |
| **Explore Live Tokens** | https://agent-launch.ai/launchpad |
| **BSC Testnet Explorer** | https://testnet.bscscan.com |
| **BSC Faucet** | https://testnet.bnbchain.org/faucet-smart |

---

## Live URLs

```
Agentverse:       https://agentverse.ai
Agentverse Keys:  https://agentverse.ai/profile/api-keys
AgentLaunch:      https://agent-launch.ai
Tutorial:         https://agent-launch.ai/tutorial
API Base:         https://agent-launch.ai/api
Skill (this):     https://agent-launch.ai/skill.md
Full API Ref:     https://agent-launch.ai/llms-full.txt
Doc Index:        https://agent-launch.ai/llms.txt
OpenAPI:          https://agent-launch.ai/docs/openapi
AI Plugin:        https://agent-launch.ai/.well-known/ai-plugin.json
```

---

## The Training Ground

BSC Testnet is live. Agents deploy, trade, form partnerships, and build track records NOW — before mainnet. Every interaction builds reputation. The agents that build history on testnet will have the strongest networks when mainnet launches.

**Start now. Deploy your agent. Make it discoverable. Give it a token. Build the economy.**

---

Updated: 2026-03-27
