# AgentLaunch — Complete API Reference for LLMs and Agents > Full machine-readable reference for agent-launch.ai --- **DISCLAIMER:** AgentLaunch tokens are community/utility tokens on BSC Testnet with zero monetary value. They are not securities, not financial products, and not investment contracts. The 2% trading fee goes 100% to protocol treasury — there is no creator fee. Not financial advice. Users are responsible for compliance in their jurisdiction. See /terms and /privacy. --- ## Quick Start ```bash npx agentlaunch ``` Or paste this into Claude Code / Cursor: ``` Read agent-launch.ai/skill.md and launch a token for my agent ``` **Tutorial:** https://agent-launch.ai/tutorial --- ## Testnet Training Ground Autonomous trading is live on **BSC Testnet**. This is the training ground — agents trade freely, form partnerships, and build track records before mainnet. Every transaction generates data that helps agents learn who to trust and invest in. By mainnet, your agents will have real history. --- > Index / entry point: https://agent-launch.ai/llms.txt > OpenAPI spec: https://agent-launch.ai/docs/openapi --- ## Platform Overview AgentLaunch (agent-launch.ai) is a bonding curve token launchpad built for the Fetch.ai / ASI ecosystem. It allows AI agents to create tokens via API, then hand off the on-chain deployment step to a human via a pre-filled URL. **The Agent-Human Handoff Protocol:** 1. Agent calls POST /api/agents/tokenize (no wallet needed, API key only) 2. Agent receives a handoff link: https://agent-launch.ai/deploy/{token_id} 3. Agent sends link to human via chat, email, DM, or any channel 4. Human clicks link, connects wallet, approves FET, deploys token 5. Token is live and tradeable immediately 6. Agent can send trade links to human: /trade/{address}?action=buy&amount=100 --- ## Authentication ### Method 1: Agentverse API Key (Recommended for agents) ``` Header: X-API-Key: YOUR_AGENTVERSE_API_KEY ``` Obtain key: https://agentverse.ai/profile/api-keys Validation: The key is checked against https://agentverse.ai/v1/hosting/agents. Your first agent's address (agent1q...) becomes your platform user identity. Keys are cached for 5 minutes server-side. ### Method 2: JWT (For wallet users) ``` POST /api/users/login Content-Type: application/json { "address": "0x1234...abcd", "signature": "0xsignature..." } Response: { "token": "eyJhbGciOiJIUzI1NiJ9..." } Header: Authorization: Bearer eyJhbGciOiJIUzI1NiJ9... ``` --- ## API Endpoints ### POST /api/agents/tokenize Create a token record. Returns a handoff link for on-chain deployment. **Auth:** X-API-Key header required **Request body:** | Field | Type | Required | Constraints | Description | |--------------|--------|----------|-----------------------|-------------| | agentAddress | string | yes | agent1q... or 0x... | The agent being tokenized | | name | string | no | max 32 chars | Token name (default: auto-generated) | | symbol | string | no | max 11 chars | Token symbol/ticker (default: auto-generated) | | description | string | no | max 500 chars | Token description | | image | string | no | URL, base64, or "auto"| Token image (default: auto-generated placeholder) | | chainId | int | no | 56 or 97 | BSC Mainnet (56) or BSC Testnet (97, default) | **Example request:** ```json { "agentAddress": "agent1qf8xfhsc8hg4g5l0nhtj5hxxkyd46c64qxs0zhtc8xfhsc8hg4g5l0nh", "name": "WeatherBot Token", "symbol": "WTR", "description": "Token for the WeatherBot agent — real-time weather data on Agentverse", "image": "auto", "chainId": 97 } ``` **Success response (201):** ```json { "success": true, "data": { "token_id": 42, "name": "WeatherBot Token", "symbol": "WTR", "description": "Token for the WeatherBot agent", "image": "https://agent-launch.ai/images/tokens/42.png", "chainId": 97, "agentAddress": "agent1qf8xfhsc8hg4g5l0nhtj5hxxkyd46c64qxs0zhtc8xfhsc8hg4g5l0nh", "handoff_link": "https://agent-launch.ai/deploy/42", "createdAt": "2026-02-24T10:00:00.000Z" } } ``` **Error responses:** | HTTP Code | Condition | Response body | |-----------|-----------|---------------| | 400 | Validation error (missing field, too long, etc.) | `{ "statusCode": 400, "message": ["name must be shorter than or equal to 32 characters"] }` | | 401 | Invalid or missing API key | `{ "statusCode": 401, "message": "Unauthorized" }` | | 409 | Token name or symbol already exists | `{ "statusCode": 409, "message": "Token with this name already exists" }` | | 500 | Server error | `{ "statusCode": 500, "message": "Internal server error" }` | --- ### GET /api/agents/tokens List all tokens on the platform. **Auth:** None required **Query parameters:** | Param | Type | Default | Description | |------------|--------|---------|-------------| | page | int | 1 | Page number | | limit | int | 20 | Items per page (max 100) | | search | string | - | Filter by name or symbol | | categoryId | int | - | Filter by category | | chainId | int | - | Filter by chain (56 or 97) | | sortBy | string | createdAt | Sort field: createdAt, market_cap, volume, holders | | sortOrder | string | DESC | ASC or DESC | **Example request:** ``` GET /api/agents/tokens?sortBy=market_cap&sortOrder=DESC&limit=10 ``` **Success response (200):** ```json { "success": true, "data": [ { "id": 42, "address": "0xAbCd1234...", "name": "WeatherBot Token", "symbol": "WTR", "description": "...", "logo": "https://...", "chain_id": 97, "listed": false, "price": "0.00000123", "price_usd": "0.00000041", "market_cap": "984.00", "vol_24h_usd": "250.00", "holders": "12", "progress": "3.28", "created_at": "2026-02-24T10:00:00.000Z" } ], "meta": { "total": 156, "page": 1, "limit": 10, "totalPages": 16 } } ``` --- ### GET /api/agents/token/{address} Get detailed data for a single token by its on-chain address. **Auth:** None required **Path parameter:** `address` — ERC20 contract address (0x + 40 hex chars) **Example request:** ``` GET /api/agents/token/0xAbCd1234567890abcdef1234567890abcdef1234 ``` **Success response (200):** ```json { "success": true, "data": { "id": 42, "address": "0xAbCd1234...", "name": "WeatherBot Token", "symbol": "WTR", "description": "...", "logo": "https://...", "chain_id": 97, "listed": false, "price": "0.00000123", "price_usd": "0.00000041", "market_cap": "984.00", "balance_usd": "328.00", "vol_24h_usd": "250.00", "holders": "12", "progress": "3.28", "tokens_left": "29015.00", "agentId": "agent1qf8xfhsc8hg4g5l0nhtj5hxxkyd46c64qxs0zhtc8xfhsc8hg4g5l0nh", "created_at": "2026-02-24T10:00:00.000Z" } } ``` **Error response (404):** ```json { "success": false, "message": "Token not found" } ``` --- ## Team Management Endpoints (Enterprise) Auth for all team endpoints: `X-API-Key: YOUR_AGENTVERSE_TEAM_API_KEY` Roles: `admin` | `deployer` | `trader` | `viewer` --- ### POST /api/teams Create a new team. **Request body:** | Field | Type | Required | Description | |-------|------|----------|-------------| | name | string | yes | Display name (max 64 chars) | | slug | string | yes | URL-safe identifier (lowercase, hyphens, max 32 chars) | **Example request:** ```json { "name": "Acme Corp", "slug": "acme-corp" } ``` **Success response (201):** ```json { "id": 1, "name": "Acme Corp", "slug": "acme-corp", "createdAt": "2026-04-01T10:00:00.000Z" } ``` --- ### GET /api/teams/:slug Get team details and current settings. **Example request:** ``` GET /api/teams/acme-corp ``` **Success response (200):** ```json { "id": 1, "name": "Acme Corp", "slug": "acme-corp", "memberCount": 5, "tokenCount": 12, "createdAt": "2026-04-01T10:00:00.000Z" } ``` --- ### POST /api/teams/:slug/members Add a member to a team with a role. **Request body:** | Field | Type | Required | Description | |-------|------|----------|-------------| | userId | number | yes | Platform user ID | | role | string | yes | admin \| deployer \| trader \| viewer | **Example request:** ```json { "userId": 42, "role": "deployer" } ``` **Success response (201):** ```json { "userId": 42, "role": "deployer", "joinedAt": "2026-04-01T10:05:00.000Z" } ``` --- ### PUT /api/teams/:slug/members/:userId Update a member's role. **Request body:** ```json { "role": "trader" } ``` **Success response (200):** ```json { "userId": 42, "role": "trader", "updatedAt": "2026-04-02T08:00:00.000Z" } ``` --- ### DELETE /api/teams/:slug/members/:userId Remove a member from the team. **Success response (204):** No content. --- ### GET /api/teams/:slug/tokens List all tokens belonging to the team. **Query parameters:** | Param | Type | Default | Description | |-------|------|---------|-------------| | page | int | 1 | Page number | | limit | int | 20 | Items per page (max 100) | | department | string | — | Filter by department label | **Success response (200):** ```json { "success": true, "data": [ { "id": 43, "address": "0x...", "name": "Engineering Agent", "symbol": "ENG", "department": "engineering", "listed": false, "price": "0.000012", "market_cap": "9600", "progress": "32.00", "created_at": "2026-04-01T10:10:00.000Z" } ], "meta": { "total": 12, "page": 1, "limit": 20, "totalPages": 1 } } ``` --- ### POST /api/teams/:slug/tokens/batch Create up to 10 token records in a single call. Returns a handoff link for each. **Request body:** | Field | Type | Required | Description | |-------|------|----------|-------------| | tokens | array | yes | Array of token objects (max 10) | | tokens[].name | string | yes | Token name (max 32 chars) | | tokens[].symbol | string | yes | Token symbol (max 11 chars) | | tokens[].department | string | no | Department label for grouping | | tokens[].description | string | no | Token description (max 500 chars) | | tokens[].image | string | no | URL, base64, or "auto" (default: "auto") | **Example request:** ```json { "tokens": [ { "name": "Engineering Agent", "symbol": "ENG", "department": "engineering", "description": "Community token for the Acme engineering agent fleet", "image": "auto" }, { "name": "Sales Agent", "symbol": "SALES", "department": "sales", "description": "Community token for the Acme sales agent fleet", "image": "auto" } ] } ``` **Success response (201):** ```json { "success": true, "handoffLinks": [ { "token": "ENG", "tokenId": 43, "url": "https://agent-launch.ai/deploy/43" }, { "token": "SALES", "tokenId": 44, "url": "https://agent-launch.ai/deploy/44" } ] } ``` **Error responses:** | HTTP Code | Condition | |-----------|-----------| | 400 | Validation error (missing field, token limit exceeded, etc.) | | 401 | Invalid or missing API key | | 403 | Caller does not have Deployer or Admin role | | 409 | Duplicate token name or symbol in batch or on platform | --- ### GET /api/teams/:slug/analytics Aggregate statistics across all team tokens. **Success response (200):** ```json { "totalTokens": 12, "deployedTokens": 10, "pendingTokens": 2, "totalVolume": "450000", "totalVolumeUsd": "150000", "totalMarketCap": "320000", "totalHolders": 234, "activeAgents": 9, "graduatedTokens": 1, "topToken": { "symbol": "ENG", "address": "0x...", "market_cap": "85000", "progress": "78.00" } } ``` --- ### GET /api/teams/:slug/audit-log Full audit trail for all team activity. Append-only — entries are never modified or deleted. **Query parameters:** | Param | Type | Default | Description | |-------|------|---------|-------------| | page | int | 1 | Page number | | limit | int | 50 | Items per page (max 500) | | action | string | — | Filter by action type (e.g. "token.deploy", "member.invite") | | userId | int | — | Filter by team member | | format | string | json | Response format: json \| csv | **Success response (200):** ```json { "data": [ { "id": 1001, "orgSlug": "acme-corp", "userId": 42, "action": "token.deploy", "target": "0xAbCd...", "metadata": { "symbol": "ENG", "department": "engineering", "txHash": "0x..." }, "timestamp": "2026-04-01T10:15:00.000Z", "ip": "203.0.113.42" } ], "meta": { "total": 87, "page": 1, "limit": 50, "totalPages": 2 } } ``` **Audit action types:** | Action | Description | |--------|-------------| | `team.create` | Team was created | | `member.invite` | Member was invited | | `member.role_change` | Member role was updated | | `member.remove` | Member was removed | | `token.create` | Token record was created | | `token.deploy` | Token was deployed on-chain | | `trade.buy` | Buy transaction executed | | `trade.sell` | Sell transaction executed | | `policy.update` | Trading policy was changed | --- ### POST /api/teams/:slug/deploy/batch Generate batch handoff links for already-created (but not yet deployed) team tokens. **Request body:** ```json { "tokenIds": [43, 44, 45] } ``` **Success response (200):** ```json { "success": true, "handoffLinks": [ { "tokenId": 43, "symbol": "ENG", "url": "https://agent-launch.ai/deploy/43" }, { "tokenId": 44, "symbol": "SALES", "url": "https://agent-launch.ai/deploy/44" }, { "tokenId": 45, "symbol": "SUPP", "url": "https://agent-launch.ai/deploy/45" } ] } ``` --- ## Handoff Links ### Deploy Link Used after POST /api/agents/tokenize. Send this to a human to complete on-chain deployment. ``` https://agent-launch.ai/deploy/{token_id} ?ref={agent_address} — optional: agent referrer (agent1q... or 0x...) &amount={fet_amount} — optional: pre-fill "buy on deploy" amount in FET ``` **Example:** ``` https://agent-launch.ai/deploy/42?ref=agent1qf8xfhsc8hg4g5l0nhtj5hxxkyd46c64qxs0zhtc8xfhsc8hg4g5l0nh&amount=50 ``` What the human sees: - Token name, symbol, image, description - "Connect Wallet" button (RainbowKit, supports MetaMask, WalletConnect, Coinbase Wallet) - FET balance display - "Approve FET" button (approves 120 FET deploy fee) - "Deploy Token" button (calls FETAgentVerseDeployer contract) - Optional: buy-on-deploy input pre-filled with `?amount=` value Human effort: connect wallet + 2 transaction signatures. ### Trade Link Pre-filled buy or sell page for an already-deployed token. ``` https://agent-launch.ai/trade/{token_address} ?action={buy|sell} — pre-select tab &amount={fet_amount} — pre-fill FET amount &ref={agent_address} — optional: agent referrer ``` **Examples:** ``` Buy 100 FET of a token: https://agent-launch.ai/trade/0xAbCd...?action=buy&amount=100 Sell 50 FET worth of a token: https://agent-launch.ai/trade/0xAbCd...?action=sell&amount=50 ``` --- ## Platform Constants These values are set in the deployed smart contracts and are authoritative. ``` Blockchain: BNB Smart Chain (BSC) Chain IDs: 56 (mainnet), 97 (testnet) FET Token address (BSC): 0x74F804B4140ee70830B3Eef4e690325841575F89 FETAgentVerseDeployer (Mainnet BSC): [check /api/platform/config] FETAgentVerseDeployer (Testnet BSC): 0x5a9F00CBF4f7fFcB5a5bf6bdF23Ee11Bb2Cefb22 Token deploy fee: 120 FET (read from contract — can change via multi-sig governance) Target liquidity: 30,000 FET -> triggers auto PancakeSwap listing Tradeable supply: 800,000,000 tokens per launch DEX reserve supply: 200,000,000 tokens (locked until graduation) Buy/sell fee: 2% per trade Fee destination: 100% to protocol treasury (REVENUE_ACCOUNT) There is NO creator fee split. Price multiplier: 10x from first buy to graduation (BUY_PRICE_DIFFERENCE = 1000) ``` --- ## Integration SDKs ### TypeScript / JavaScript SDK ```bash npm install agentlaunch-sdk ``` ```typescript import { AgentLaunchClient } from 'agentlaunch-sdk'; const client = new AgentLaunchClient({ apiKey: process.env.AGENTVERSE_API_KEY, baseUrl: 'https://agent-launch.ai' }); const token = await client.tokenize({ agentAddress: 'agent1q...', name: 'My Agent Token', symbol: 'MAT', description: 'Created by AI', image: 'auto' }); console.log(token.handoff_link); // https://agent-launch.ai/deploy/42 ``` ### CLI ```bash npx agentlaunch create \ --key YOUR_AGENTVERSE_API_KEY \ --name "My Agent Token" \ --symbol MAT \ --description "Created by AI" ``` ### MCP Server (Claude Code / Cursor) ```bash npx agent-launch-mcp ``` Add to your MCP config: ```json { "mcpServers": { "agent-launch": { "command": "npx", "args": ["agent-launch-mcp"], "env": { "AGENTVERSE_API_KEY": "YOUR_KEY", "AGENT_ADDRESS": "agent1q..." } } } } ``` Available MCP tools (30+ total): list_tokens, get_token, get_platform_stats, calculate_buy, calculate_sell, create_token_record, get_deploy_instructions, get_trade_link, buy_tokens, sell_tokens, get_wallet_balances, and more. ### Python (direct HTTP) ```python import requests import 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": "agent1qf8xfhsc8hg4g5l0nhtj5hxxkyd46c64qxs0zhtc8xfhsc8hg4g5l0nh", "name": "My Agent Token", "symbol": "MAT", "description": "Created by AI", "image": "auto", "chainId": 97 } ) data = response.json() token_id = data["data"]["token_id"] handoff_link = data["data"]["handoff_link"] print(f"Send this to a human: {handoff_link}") ``` ### Agentverse uAgent Deploy a persistent token-launcher agent that runs on Agentverse and responds to chat messages: ```bash python deploy-to-agentverse.py YOUR_AGENTVERSE_API_KEY ``` After deployment, the agent accepts messages like: - "Launch token called MyCoin ticker MC" - "Create a token for my weather agent" It replies with the deploy handoff link. --- ## On-Chain Trading (SDK) Agents can buy and sell tokens autonomously — no human handoff needed. **Requirements:** - `npm install agentlaunch-sdk ethers@^6` - `WALLET_PRIVATE_KEY` environment variable (or pass `privateKey` in config) ### Buy Tokens ```typescript import { buyTokens } from 'agentlaunch-sdk'; // Requires WALLET_PRIVATE_KEY env var (or pass privateKey in config) const result = await buyTokens('0xF7e2F77f...', '10', { chainId: 97, // BSC Testnet slippagePercent: 5, // 5% slippage tolerance }); console.log(`Tx: ${result.txHash}`); console.log(`Received: ${result.tokensReceived} tokens`); console.log(`Fee: ${result.fee} FET`); ``` **BuyResult fields:** `txHash`, `tokensReceived`, `fetSpent`, `fee`, `priceImpact`, `approvalTxHash` (null if not needed), `blockNumber`. ### Sell Tokens ```typescript import { sellTokens } from 'agentlaunch-sdk'; const result = await sellTokens('0xF7e2F77f...', '50000', { chainId: 97, }); console.log(`Tx: ${result.txHash}`); console.log(`Received: ${result.fetReceived} FET`); ``` **SellResult fields:** `txHash`, `fetReceived`, `tokensSold`, `fee`, `priceImpact`, `blockNumber`. ### Check Wallet Balances ```typescript import { getWalletBalances } from 'agentlaunch-sdk'; const balances = await getWalletBalances('0xF7e2F77f...'); console.log(`BNB: ${balances.bnb}`); console.log(`FET: ${balances.fet}`); console.log(`Token: ${balances.token}`); ``` **WalletBalances fields:** `wallet`, `bnb`, `fet`, `token`, `tokenAddress`, `chainId`. ### Configuration (OnchainConfig) ```typescript interface OnchainConfig { privateKey?: string; // Falls back to WALLET_PRIVATE_KEY env var chainId?: number; // 97 (BSC Testnet, default) or 56 (BSC Mainnet) slippagePercent?: number; // 0-100, default: 5 client?: AgentLaunchClient; // Optional, for API-based price calculation } ``` ### Environment Variables for Trading | Variable | Required | Description | |----------|----------|-------------| | `WALLET_PRIVATE_KEY` | For on-chain trades | Wallet private key (with or without 0x prefix) | | `CHAIN_ID` | No | Default chain (97=BSC Testnet, 56=BSC Mainnet). Default: 97 | --- ## On-Chain Trading (CLI) ### Buy Command ```bash agentlaunch buy
--amount