Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: wire pump-fun-skills into 3D agent skill system
nirholasf507502d22d9
diff --git a/examples/pump-fun-agent/instructions.md b/examples/pump-fun-agent/instructions.mdnew file mode 100644index 000000000..35c785ebe--- /dev/null+++ b/examples/pump-fun-agent/instructions.md@@ -0,0 +1,5 @@+You are a pump.fun trading agent. You help users buy and sell tokens, launch new coins, collect creator fees, and accept token payments.++You have access to the pump.fun API via your skills. All transactions are built server-side and returned as base64-encoded VersionedTransactions — the user's wallet must sign and submit them.++Always confirm amounts, mints, and wallet addresses with the user before building any transaction. Never assume defaults for amounts or mints.diff --git a/examples/pump-fun-agent/manifest.json b/examples/pump-fun-agent/manifest.jsonnew file mode 100644index 000000000..079f49cab--- /dev/null+++ b/examples/pump-fun-agent/manifest.json@@ -0,0 +1,36 @@+{+ "$schema": "https://3d-agent.io/schemas/manifest/0.1.json",+ "spec": "agent-manifest/0.1",+ "name": "Pump Agent",+ "description": "3D agent with full pump.fun capabilities: swap, create coins, collect fees, and accept token payments.",+ "tags": ["solana", "pump.fun", "defi", "trading"],+ "body": {+ "uri": "/avatars/cz.glb",+ "format": "gltf-binary",+ "rig": "mixamo",+ "boundingBoxHeight": 1.78+ },+ "brain": {+ "provider": "anthropic",+ "model": "claude-opus-4-6",+ "instructions": "instructions.md",+ "temperature": 0.7,+ "maxTokens": 4096+ },+ "voice": {+ "tts": { "provider": "browser", "rate": 1.0 },+ "stt": { "provider": "browser", "language": "en-US" }+ },+ "skills": [+ { "uri": "../../pump-fun-skills/swap/", "version": "1.0.0" },+ { "uri": "../../pump-fun-skills/create-coin/", "version": "1.0.0" },+ { "uri": "../../pump-fun-skills/coin-fees/", "version": "1.0.0" },+ { "uri": "../../pump-fun-skills/tokenized-agents/", "version": "1.1.0" }+ ],+ "memory": {+ "mode": "local",+ "maxTokens": 8192+ },+ "tools": ["lookAt", "setExpression", "speak", "remember"],+ "version": "1.0.0"+}diff --git a/pump-fun-skills/coin-fees/handlers.js b/pump-fun-skills/coin-fees/handlers.jsnew file mode 100644index 000000000..0b761ff50--- /dev/null+++ b/pump-fun-skills/coin-fees/handlers.js@@ -0,0 +1,21 @@+const API = 'https://fun-block.pump.fun/agents';++export async function pumpfun_collect_fees(args, ctx) {+ const res = await ctx.fetch(`${API}/collect-fees`, {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ ...args, encoding: 'base64' }),+ });+ if (!res.ok) throw new Error(`pump.fun collect-fees ${res.status}: ${await res.text()}`);+ return res.json();+}++export async function pumpfun_sharing_config(args, ctx) {+ const res = await ctx.fetch(`${API}/sharing-config`, {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ ...args, encoding: 'base64' }),+ });+ if (!res.ok) throw new Error(`pump.fun sharing-config ${res.status}: ${await res.text()}`);+ return res.json();+}diff --git a/pump-fun-skills/coin-fees/manifest.json b/pump-fun-skills/coin-fees/manifest.jsonnew file mode 100644index 000000000..23a3f2f1e--- /dev/null+++ b/pump-fun-skills/coin-fees/manifest.json@@ -0,0 +1,11 @@+{+ "spec": "skill/0.1",+ "name": "pumpfun-coin-fees",+ "version": "1.0.0",+ "description": "Collect and distribute creator fees for pump.fun coins via the fun-block API",+ "sandboxPolicy": "trusted-main-thread",+ "tags": ["solana", "pump.fun", "fees"],+ "provides": {+ "tools": ["pumpfun_collect_fees", "pumpfun_sharing_config"]+ }+}diff --git a/pump-fun-skills/coin-fees/tools.json b/pump-fun-skills/coin-fees/tools.jsonnew file mode 100644index 000000000..eba609b01--- /dev/null+++ b/pump-fun-skills/coin-fees/tools.json@@ -0,0 +1,49 @@+{+ "tools": [+ {+ "name": "pumpfun_collect_fees",+ "description": "Build a transaction to collect or distribute creator fees for a pump.fun coin. Auto-detects whether to collect directly or distribute via sharing config.",+ "input_schema": {+ "type": "object",+ "required": ["mint", "user"],+ "properties": {+ "mint": { "type": "string", "description": "Token mint address" },+ "user": { "type": "string", "description": "Creator wallet public key" },+ "frontRunningProtection": { "type": "boolean" },+ "tipAmount": { "type": "number", "description": "Jito tip in SOL" }+ }+ }+ },+ {+ "name": "pumpfun_sharing_config",+ "description": "Create or update a fee sharing config for a pump.fun coin. bps values across all shareholders must total exactly 10000.",+ "input_schema": {+ "type": "object",+ "required": ["mint", "user", "shareholders"],+ "properties": {+ "mint": { "type": "string", "description": "Token mint address" },+ "user": { "type": "string", "description": "Creator wallet public key" },+ "shareholders": {+ "type": "array",+ "description": "Up to 10 shareholders, bps must sum to 10000",+ "items": {+ "type": "object",+ "required": ["address", "bps"],+ "properties": {+ "address": { "type": "string" },+ "bps": { "type": "number", "description": "Basis points share, e.g. 5000 = 50%" }+ }+ }+ },+ "mode": {+ "type": "string",+ "enum": ["create", "update"],+ "description": "Auto-detected if omitted"+ },+ "frontRunningProtection": { "type": "boolean" },+ "tipAmount": { "type": "number" }+ }+ }+ }+ ]+}diff --git a/pump-fun-skills/create-coin/handlers.js b/pump-fun-skills/create-coin/handlers.jsnew file mode 100644index 000000000..9f3e5d217--- /dev/null+++ b/pump-fun-skills/create-coin/handlers.js@@ -0,0 +1,11 @@+const API = 'https://fun-block.pump.fun/agents';++export async function pumpfun_create_coin(args, ctx) {+ const res = await ctx.fetch(`${API}/create-coin`, {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ ...args, encoding: 'base64' }),+ });+ if (!res.ok) throw new Error(`pump.fun create-coin ${res.status}: ${await res.text()}`);+ return res.json();+}diff --git a/pump-fun-skills/create-coin/manifest.json b/pump-fun-skills/create-coin/manifest.jsonnew file mode 100644index 000000000..58beabbde--- /dev/null+++ b/pump-fun-skills/create-coin/manifest.json@@ -0,0 +1,11 @@+{+ "spec": "skill/0.1",+ "name": "pumpfun-create-coin",+ "version": "1.0.0",+ "description": "Create coins on pump.fun with initial buy via the fun-block API",+ "sandboxPolicy": "trusted-main-thread",+ "tags": ["solana", "pump.fun", "token", "create"],+ "provides": {+ "tools": ["pumpfun_create_coin"]+ }+}diff --git a/pump-fun-skills/create-coin/tools.json b/pump-fun-skills/create-coin/tools.jsonnew file mode 100644index 000000000..e23361679--- /dev/null+++ b/pump-fun-skills/create-coin/tools.json@@ -0,0 +1,33 @@+{+ "tools": [+ {+ "name": "pumpfun_create_coin",+ "description": "Create a new coin on pump.fun with an optional initial buy. Returns a partially-signed transaction (mint keypair already signed) — the user wallet must co-sign before submitting.",+ "input_schema": {+ "type": "object",+ "required": ["user", "name", "symbol", "uri", "solLamports"],+ "properties": {+ "user": { "type": "string", "description": "Creator wallet public key" },+ "name": { "type": "string", "description": "Token name" },+ "symbol": { "type": "string", "description": "Token symbol" },+ "uri": { "type": "string", "description": "Metadata URI (IPFS or HTTPS JSON)" },+ "solLamports": { "type": "string", "description": "Initial buy amount in lamports" },+ "mayhemMode": { "type": "boolean", "description": "Enable mayhem mode (default false)" },+ "cashback": { "type": "boolean", "description": "Enable cashback (default false)" },+ "tokenizedAgent": {+ "type": "boolean",+ "description": "Create as a tokenized agent (default false)"+ },+ "buybackBps": {+ "type": "number",+ "description": "Buyback basis points when tokenizedAgent is true, e.g. 5000 = 50%"+ },+ "frontRunningProtection": { "type": "boolean" },+ "tipAmount": { "type": "number", "description": "Jito tip in SOL" },+ "feePayer": { "type": "string", "description": "Fee payer public key (defaults to user)" },+ "creator": { "type": "string", "description": "Creator public key (defaults to user)" }+ }+ }+ }+ ]+}diff --git a/pump-fun-skills/swap/handlers.js b/pump-fun-skills/swap/handlers.jsnew file mode 100644index 000000000..3ea00b4dc--- /dev/null+++ b/pump-fun-skills/swap/handlers.js@@ -0,0 +1,11 @@+const API = 'https://fun-block.pump.fun/agents';++export async function pumpfun_swap(args, ctx) {+ const res = await ctx.fetch(`${API}/swap`, {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ ...args, encoding: 'base64' }),+ });+ if (!res.ok) throw new Error(`pump.fun swap ${res.status}: ${await res.text()}`);+ return res.json();+}diff --git a/pump-fun-skills/swap/manifest.json b/pump-fun-skills/swap/manifest.jsonnew file mode 100644index 000000000..82ddd3d04--- /dev/null+++ b/pump-fun-skills/swap/manifest.json@@ -0,0 +1,11 @@+{+ "spec": "skill/0.1",+ "name": "pumpfun-swap",+ "version": "1.0.0",+ "description": "Buy and sell tokens on pump.fun bonding curve and AMM via the fun-block API",+ "sandboxPolicy": "trusted-main-thread",+ "tags": ["solana", "pump.fun", "swap", "defi"],+ "provides": {+ "tools": ["pumpfun_swap"]+ }+}diff --git a/pump-fun-skills/swap/tools.json b/pump-fun-skills/swap/tools.jsonnew file mode 100644index 000000000..7e8b3fb2c--- /dev/null+++ b/pump-fun-skills/swap/tools.json@@ -0,0 +1,34 @@+{+ "tools": [+ {+ "name": "pumpfun_swap",+ "description": "Build a buy or sell transaction on pump.fun. Auto-detects bonding curve vs AMM. For buys set inputMint to NATIVE_MINT (So11111111111111111111111111111111111111112); for sells set outputMint to NATIVE_MINT.",+ "input_schema": {+ "type": "object",+ "required": ["inputMint", "outputMint", "amount", "user"],+ "properties": {+ "inputMint": {+ "type": "string",+ "description": "Mint to spend. Use So11111111111111111111111111111111111111112 for SOL buys."+ },+ "outputMint": {+ "type": "string",+ "description": "Mint to receive. Use So11111111111111111111111111111111111111112 for SOL sells."+ },+ "amount": {+ "type": "string",+ "description": "Amount in lamports for SOL, or token smallest units (6 decimals) for token input."+ },+ "user": { "type": "string", "description": "User wallet public key (signer)" },+ "slippagePct": { "type": "number", "description": "Slippage tolerance in percent (default 2)" },+ "feePayer": { "type": "string", "description": "Fee payer public key (defaults to user)" },+ "frontRunningProtection": {+ "type": "boolean",+ "description": "Route via Jito for MEV protection (requires tipAmount)"+ },+ "tipAmount": { "type": "number", "description": "Jito tip in SOL, e.g. 0.0001" }+ }+ }+ }+ ]+}diff --git a/pump-fun-skills/tokenized-agents/handlers.js b/pump-fun-skills/tokenized-agents/handlers.jsnew file mode 100644index 000000000..5c1b8c029--- /dev/null+++ b/pump-fun-skills/tokenized-agents/handlers.js@@ -0,0 +1,28 @@+const DEFAULT_RPC = 'https://rpc.solanatracker.io/public';++export async function pumpfun_build_payment(args, ctx) {+ const { PumpAgent } = await import('@pump-fun/agent-payments-sdk');+ const agent = new PumpAgent(args.agentMint);+ const instructions = await agent.buildAcceptPaymentInstructions({+ payer: args.payer,+ amount: args.amount,+ currencyMint: args.currencyMint,+ invoiceId: args.invoiceId,+ startTime: args.startTime,+ endTime: args.endTime,+ });+ return { instructions: instructions.map((ix) => ix.toJSON?.() ?? ix) };+}++export async function pumpfun_verify_payment(args, ctx) {+ const { PumpAgent } = await import('@pump-fun/agent-payments-sdk');+ const { Connection } = await import('@solana/web3.js');+ const agent = new PumpAgent(args.agentMint);+ const connection = new Connection(args.rpcUrl || DEFAULT_RPC);+ const paid = await agent.validateInvoicePayment({+ connection,+ payer: args.payer,+ invoiceId: args.invoiceId,+ });+ return { paid };+}diff --git a/pump-fun-skills/tokenized-agents/manifest.json b/pump-fun-skills/tokenized-agents/manifest.jsonnew file mode 100644index 000000000..925cefa0a--- /dev/null+++ b/pump-fun-skills/tokenized-agents/manifest.json@@ -0,0 +1,11 @@+{+ "spec": "skill/0.1",+ "name": "pumpfun-tokenized-agents",+ "version": "1.1.0",+ "description": "Charge users for agent actions using pump.fun token payments on Solana",+ "sandboxPolicy": "trusted-main-thread",+ "tags": ["solana", "pump.fun", "payments", "agent"],+ "provides": {+ "tools": ["pumpfun_build_payment", "pumpfun_verify_payment"]+ }+}diff --git a/pump-fun-skills/tokenized-agents/tools.json b/pump-fun-skills/tokenized-agents/tools.jsonnew file mode 100644index 000000000..c0e68a337--- /dev/null+++ b/pump-fun-skills/tokenized-agents/tools.json@@ -0,0 +1,41 @@+{+ "tools": [+ {+ "name": "pumpfun_build_payment",+ "description": "Build a Solana payment instruction for a tokenized pump.fun agent. Returns transaction instructions the user wallet must sign.",+ "input_schema": {+ "type": "object",+ "required": ["agentMint", "payer", "amount", "currencyMint"],+ "properties": {+ "agentMint": { "type": "string", "description": "The agent's token mint address on pump.fun" },+ "payer": { "type": "string", "description": "User wallet public key" },+ "amount": {+ "type": "number",+ "description": "Payment amount in smallest units (6 decimals for USDC, 9 for SOL)"+ },+ "currencyMint": {+ "type": "string",+ "description": "Payment currency mint. USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v, SOL: So11111111111111111111111111111111111111112"+ },+ "invoiceId": { "type": "number", "description": "Unique invoice ID (integer)" },+ "startTime": { "type": "number", "description": "Invoice start Unix timestamp" },+ "endTime": { "type": "number", "description": "Invoice expiry Unix timestamp" }+ }+ }+ },+ {+ "name": "pumpfun_verify_payment",+ "description": "Verify on-chain that a tokenized agent invoice has been paid.",+ "input_schema": {+ "type": "object",+ "required": ["agentMint", "payer", "invoiceId"],+ "properties": {+ "agentMint": { "type": "string" },+ "payer": { "type": "string" },+ "invoiceId": { "type": "number" },+ "rpcUrl": { "type": "string", "description": "Solana RPC URL (optional)" }+ }+ }+ }+ ]+}