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(wallet): add comprehensive features for withdrawal, giving, custody proof, access control, recovery, and self-defense
fudjia582112299889
diff --git a/blog/agent-abilities/FULL-ARTICLE.md b/blog/agent-abilities/FULL-ARTICLE.mdnew file mode 100644index 000000000..c67cad92e--- /dev/null+++ b/blog/agent-abilities/FULL-ARTICLE.md@@ -0,0 +1,2398 @@+# Everything your agent can do on three.ws++Every agent on three.ws is born with a self-custodied Solana wallet — and the Agent Wallet Hub (`/agent/:id/wallet`) is where that wallet becomes a financial actor. Twenty-three abilities live behind one tab strip: balance and custody, funding and withdrawal, trading and sniping, earning and paying, natural-language automation, policy and self-defense. Owners get the full console; visitors get a read-only view; everything runs on mainnet or devnet with one switch. Below is the complete tour — first the 23 wallet abilities, then everything else on the platform.++---++# Part I — The 23 wallet abilities++## 01 · Balance++> Your agent's real Solana balance, live from the chain — with a USD estimate and a receipt trail for every transaction.++### What it does++The Balance tab is the agent wallet's home screen. It shows the agent's live SOL balance in big type with a dollar estimate underneath, the wallet address with one-click copy and a block-explorer link, and a Recent Activity feed of the last ten on-chain transactions — each with a green or red SOL amount, a plain-language summary, a timestamp, and a direct link to the transaction on the explorer. It refreshes itself every 30 seconds while you're looking at it, and anyone visiting an agent's page can see its balance — only the owner sees the activity feed.++### How it works++Every number is read live from the Solana blockchain — there are no stored or sample balances. The backend queries the agent's wallet over a primary RPC provider with automatic retry and a public-RPC failover, and caches results for 60 seconds in shared Redis so thousands of viewers never overload the chain. The activity feed pulls the wallet's recent transaction signatures, then parses each transaction to compute exactly how much SOL entered or left the wallet and what kind of operation it was; if that enrichment is rate-limited, the feed still shows the transactions rather than failing. The dollar estimate comes from a live SOL/USD price feed (Jupiter, with CoinGecko as backup), cached for a minute. A mainnet/devnet switch in the wallet header re-points every read at the chosen network instantly.++### Every feature++- Live SOL balance in large display type, read from the chain on every load+- USD estimate under the balance from a live SOL/USD price feed (Jupiter primary, CoinGecko fallback, 60s cache) with extra decimals for sub-$1 amounts+- Auto-refresh: balance re-polls every 30 seconds while the tab is visible, pauses when hidden+- Manual Refresh button with spinning icon and disabled 'Refreshing…' state while in flight+- Shortened wallet address with full-address tooltip on hover+- One-click Copy address with toast confirmation (works even on older browsers via a fallback path)+- Explorer link for the wallet — Solscan on mainnet, Solana Explorer on devnet+- Recent Activity feed: the last 10 on-chain transactions for the wallet+- Per-transaction explorer deep link on each signature+- Signed SOL delta per transaction, green for money in, red for money out+- Plain-language transaction summary per row (e.g. 'transfer'), derived from the parsed on-chain instruction+- Relative timestamps ('3m ago', '2h ago') on every activity row+- 'Failed' pill badge on any transaction that failed on-chain, with an explanatory tooltip+- Mainnet/Devnet network switcher support — switching resets the tab and refetches everything for the chosen network+- Skeleton loading screens (animated shimmer bars, no spinners) for both the balance card and the activity list+- Honest 'Balance unavailable' state in amber when the Solana network can't be reached — with a note that it retries automatically and funds are safe, never a misleading zero+- Distinct handling for rate-limited vs. unreachable RPC, surfaced as the same safe 'unavailable' state+- Activity error state with a one-click Retry button+- Empty activity state that tells you what will appear ('Deposits and trades appear here')+- Empty wallet state explaining the agent's wallet is being prepared automatically+- Public visibility: any visitor can view an agent's balance; the activity feed and all write operations stay owner-only+- Screen-reader support: live-announced balance updates, labeled buttons, busy indicators, and reduced-motion compliance+- Server-side RPC resilience: primary provider, timed backoff retry, then public-RPC failover on every balance and activity read+- Fleet-wide 60-second balance cache (shared Redis) so heavy traffic collapses to at most one chain query per wallet per minute+- Graceful degradation on activity enrichment: if transaction parsing is rate-limited everywhere, the feed still lists transactions without amounts instead of erroring+- USD estimate silently hides if the price feed is down — the SOL amount is never blocked by it+- Number safety: malformed amounts render as '—', never 'NaN'; trailing zeros are trimmed so 1.2000 reads 1.2++### Guardrails & safety++Strictly read-only — this tab can never move funds. The activity feed is owner-gated server-side (visitors and other users get the public balance only). Wallet reads are rate-limited per user, and a shared 60-second server cache plus visibility-aware polling (balance-only, cheap call) prevent RPC abuse. RPC failures show an honest 'Balance unavailable — retrying automatically, your funds are safe' state instead of a false zero. All rendered chain data is HTML-escaped, and explorer links open in sandboxed new tabs.++### Screenshot-worthy (shot list)++- The hero shot: a big live SOL balance with its dollar value underneath, quietly updating itself every 30 seconds — real chain data, zero mocks+- The activity feed: green +SOL and red −SOL deltas, plain-English summaries, 'Failed' badges, and every row deep-linked to the block explorer+- The failure state most wallets get wrong: when Solana is unreachable it says 'Balance unavailable — retrying automatically, your funds are safe' in amber instead of showing a terrifying $0++### API surface++- `GET /api/agents/:id/solana?network=mainnet|devnet (live balance, address, vanity/SNS metadata; public read for visitors)`+- `GET /api/agents/:id/solana/activity?network=&limit=10 (owner-only parsed transaction feed)`+- `https://lite-api.jup.ag/price/v3 (SOL/USD price, primary)`+- `https://api.coingecko.com/api/v3/simple/price (SOL/USD price, fallback)`+++---++## 02 · Go Live++> One tap sends real SOL from the three.ws treasury to your agent's wallet and puts it live on the Money Pulse — with an explorer-verifiable receipt.++### What it does++Every freshly created agent has a wallet that starts at zero — it can't make its first move, so it never shows up as active anywhere. Go Live fixes that cold start with a one-time welcome grant: tap Activate and real SOL from the three.ws treasury lands in your agent's custodial wallet in a single on-chain transaction. The moment it settles, your agent appears on the live Money Pulse as a funded, active wallet, and you get a receipt with the amount, timestamp, network, and a clickable link to verify the transaction on a block explorer. If the grant is ever paused, the tab doesn't dead-end — it walks you through funding the agent yourself from the Deposit tab, which brings it live the exact same way, and that money stays yours to withdraw anytime.++### How it works++The tab reads an activation-status endpoint that decides which of seven designed states to render: loading skeleton, eligible hero, activating in-flight, live receipt, pending settlement, already-live platform agent, or grant-paused. Clicking Activate posts to the activation endpoint, which claims a one-grant-per-agent slot in a database ledger (the primary key acts as a mutex, so concurrent clicks can never double-spend), lazily provisions the agent's custodial Solana wallet if it doesn't exist yet, verifies the treasury balance covers the grant plus a fee buffer, then signs and broadcasts a real SOL transfer from the platform treasury — with an automatic retry on an expired blockhash and a chain probe on ambiguous timeouts so a landed transaction is never re-granted. The confirmed transfer is recorded as a genuine inbound tip custody event (that record is what puts the agent on the Money Pulse and in active-wallet counts), priced in USD at the live SOL rate, announced on the platform's live ticker, and pushed to the owner as a notification. Activation also registers the agent's wallet as its default payout destination so it can earn from marketplace buyers immediately, and stamps the owner's account-level "first win" milestone, which triggers the two-sided referral reward if the owner was referred.++### Every feature++- One-time, real, on-chain SOL welcome grant from the platform treasury (default 0.004 SOL, operator-configurable, hard-bounded to 0.0001–0.05 SOL)+- Single-tap Activate hero CTA personalized with the agent's name+- Grant-amount pill showing exactly how much SOL you'll receive before claiming+- Three-point value checklist: funds the wallet, goes live on the Money Pulse, one-time and explorer-verifiable+- In-flight activating state — CTA disables and shows a spinner while the grant broadcasts+- On-chain receipt card after activation: grant amount in SOL, timestamp, network, and truncated transaction signature linked to a block explorer+- Green pulsing Live badge on activated agents+- What-next actions on the receipt: jump to the Money Pulse, open the agent's wallet story, or add more funds via Deposit+- Pending state for a concurrent claim still settling, with a Refresh-status button+- Platform-agent state: platform-operated agents show as already live and are excluded from the grant+- Grant-paused fallback state that pitches the self-funding path — depositing your own SOL reaches the identical outcome, and it remains withdrawable+- Loading skeleton with reduced-motion support and full keyboard/focus states+- Toast confirmations: fresh grant amount announced, or 'already live' on a repeat claim+- Owner-only tab — hidden entirely from read-only viewers of an agent's wallet+- Idempotent claiming: activating twice returns the original receipt, never a second grant+- Automatic custodial wallet provisioning if the agent doesn't have one yet (with an audit trail)+- Grant recorded as a genuine inbound tip, instantly counting the agent as active on the Money Pulse and in tip stats+- Live USD valuation of the grant at the current SOL price+- Platform-wide live-ticker announcement plus an owner notification when an agent goes live+- Auto-registers the agent's wallet as its default payout destination so listed skills can earn from real buyers immediately+- Stamps the owner's first-win activation milestone, firing the two-sided referral reward for referred accounts+- Runs on Solana mainnet (devnet switchable by operator config), noted right under the CTA+- Distinct, recoverable error messages per failure mode: grant paused, daily cap reached, transfer failed — each pointing to a working alternative+- Works via browser session or API bearer token, so agents can be activated programmatically with the right write scope+- Responsive receipt layout — two-column grid collapses to one column on small screens++### Guardrails & safety++Owner-only end to end: the tab is hidden from non-owners and the server rejects claims from anyone but the agent's owner (bearer-token callers additionally need the write scope, and every claim requires a CSRF token plus per-user/IP rate limiting). Exactly one grant per agent, enforced at the database level — the ledger's primary key with an insert-if-absent claim acts as a mutex, so concurrent double-clicks cannot double-spend. A rolling 24-hour platform-wide cap (default 500 grants/day, counting in-flight claims) bounds total treasury spend, and the grant size itself is hard-clamped to 0.0001–0.05 SOL regardless of configuration. The whole feature is inert unless explicitly enabled AND a treasury key is configured. The treasury balance is pre-checked with a fee buffer so a dry treasury pauses cleanly instead of failing mid-send. On an ambiguous send timeout, the claim stays locked and the chain is probed before any retry is allowed — a transaction that actually landed can never be granted twice. Platform-operated agents are excluded from claiming.++### Screenshot-worthy (shot list)++- The live receipt card: a green pulsing Live badge over a clean grid showing the SOL grant, the timestamp, the network, and a clickable transaction signature that opens the block explorer — on-screen proof the grant is real money on Solana mainnet.+- The hero moment: 'Bring [your agent] to life' with the grant amount in a monospace pill and a single Activate button — one tap from empty wallet to live, funded agent.+- The payoff handoff: the success toast fires with the granted amount, and one click lands on the Money Pulse where the newly activated agent is beating in the platform-wide live feed of real on-chain activity.++### API surface++- `GET /api/agents/:id/activate`+- `POST /api/agents/:id/activate`+- `GET /api/csrf-token`+++---++## 03 · Portfolio++> Your agent's entire trading life — net worth, holdings, P&L, and risk — on one live screen that never fakes a number.++### What it does++The Portfolio tab is the agent wallet's command center: one real-time view of everything the wallet holds and has done. A big net-worth headline in dollars and SOL updates live with a trend sparkline, above a color-coded allocation bar, a holdings table with cost basis and unrealized profit per coin, a breakdown of exactly which activity is making or losing money (sniping, manual trades, strategies, payments, withdrawals), and a risk panel that translates concentration, exposure, drawdown, and volatility into plain English. Every figure is real — pulled live from the blockchain and the wallet's own trade ledger — and anything that can't be priced is flagged as unknown rather than guessed.++### How it works++The tab calls an owner-gated portfolio endpoint that fuses three real data sources: live on-chain holdings valued through Helius (with rotating public Solana RPC fallbacks) and the Jupiter price API which understands pump.fun bonding curves; the sniper position ledger whose realized P&L is proven by on-chain transaction signatures; and the custody/spend ledger recording every outbound trade, payment, and withdrawal. A FIFO lot engine, computed in exact raw token units, matches every sell against the oldest buys and attributes realized and unrealized profit to the source that opened each lot — sniper, discretionary, or strategy. After the first snapshot, a server-sent-event stream re-values the whole portfolio every 20 seconds and pushes fresh net worth, holdings, attribution, and risk to the browser, which feeds the live sparkline; the stream cleanly self-terminates and auto-reconnects to stay within platform limits. Risk metrics (Herfindahl concentration, volatile-sleeve exposure, reserve share, max drawdown, per-trade volatility) are computed in pure deterministic functions so the API and the stream can never disagree.++### Every feature++- Live net-worth headline in USD with the SOL equivalent and the current SOL price+- Real-time sparkline of net worth built from the live stream (up to 40 points), colored green or red by trend, with gradient fill and endpoint dot+- Pulsing 'live' indicator while the stream is connected+- 'Updates paused' button when the stream closes, with one-click reconnect+- Realized P&L and Unrealized P&L summary pills, signed and color-coded+- Allocation composition bar: SOL in Solana violet, $THREE in platform green, stablecoins in teal, volatile positions in a rotating warm palette+- Allocation bar caps at 7 segments and folds the tail into a '+N more' bucket to stay legible+- Per-segment hover tooltips with symbol, percentage, and dollar value, plus a swatch legend and priced-asset count+- Holdings table with token logo (graceful placeholder fallback), symbol, and type sub-label (Native / $THREE / Stable / token name)+- Per-holding amount, live USD value, FIFO cost basis in SOL, and unrealized P&L in SOL and percent+- 'Illiquid' warning badge on any holding with no live market price — value shown as unknown, never guessed+- One-click 'Trade' button on every token that copies the mint address and jumps straight to the Trade tab with a confirmation toast+- P&L attribution card breaking profit down by source: Sniper, Discretionary, and Strategy object, each with realized + unrealized split and a proportional green/red magnitude bar+- Separate outflow rows for x402 payments and withdrawals so spending is never confused with trading losses+- Methodology note stating sniper P&L is on-chain actuals while discretionary P&L is derived from recorded trade quotes+- Risk panel with five metric tiles: Reserve (dry powder), Concentration, Tape exposure, Max drawdown, and Realized volatility+- Heat-colored risk meters that shift green → lime → amber → red as a metric worsens+- Hover help text on every risk tile explaining the metric in plain language+- Plain-language risk flags at info / warn / danger levels (e.g. concentration over 60%, memecoin exposure over 75%, drawdown over 35%)+- SOL and stablecoins counted as reserve, never as concentration risk — a fresh all-SOL wallet reads 'dry powder ready to deploy', not a false alarm+- Positive all-clear flag when no elevated risk is detected+- Mainnet / devnet network switcher support — switching networks resets the sparkline and reloads; devnet SOL is priced while devnet tokens are honestly marked unpriceable+- Live SSE stream that re-values the portfolio every 20 seconds with heartbeat pings and automatic reconnection+- Designed empty state with 'Deposit funds' and 'Make a trade' shortcuts into the neighboring tabs+- Designed error state with a Retry button+- Skeleton loading state while the first snapshot loads+- Staggered entrance animation on first paint only (never replayed on live updates), fully disabled under reduced-motion preferences+- Responsive layout: amount and cost-basis columns collapse on small phones, tables scroll horizontally, nothing breaks at 320px+- Screen-reader support: labeled sparkline, spoken allocation summary, labeled risk cells, and visible focus rings+- Stream automatically closes when the tab is hidden and reopens when shown, saving bandwidth++### Guardrails & safety++Owner-only at two layers: the tab is hidden from non-owner viewers in the wallet hub, and the server independently requires a signed-in session or bearer token and verifies the requester owns the agent before returning anything (401/403/404 otherwise) — attribution comes from the spend ledger, which is owner-sensitive. Reads are rate-limited to 60 per minute per user. The surface is strictly read-only: no on-chain action can be triggered from this tab (the Trade button only hands off to the Trade tab). Honesty guarantees are enforced in code: USD values degrade to null when price feeds are down rather than being invented, holdings with no live market are flagged illiquid instead of valued, and tokens deposited from outside get an honest 'unknown' cost basis rather than a fabricated one. The live stream self-terminates before the platform's execution cap so clients always get a clean close and reconnect.++### Screenshot-worthy (shot list)++- The net-worth headline with its live sparkline and pulsing 'live' dot — the line literally turns green or red with the trend as 20-second revaluations stream in+- The allocation bar: the whole portfolio's composition in one color-coded strip — Solana violet, $THREE green, stablecoin teal, and warm hues for the memecoin sleeve — with hover tooltips per slice+- The risk panel's plain-English verdicts: heat-colored meters plus flags like '90% of net worth is held in SOL / stable reserve — dry powder ready to deploy' instead of jargon or false alarms++### API surface++- `GET /api/agents/:id/portfolio?network=mainnet|devnet`+- `GET /api/agents/:id/portfolio/stream?network=mainnet|devnet (SSE)`+++---++## 04 · Deposit++> Fund any agent in one scan — a tap-to-pay Solana QR with live on-chain confirmation the second the money lands.++### What it does++The Deposit tab is the "fund this agent" page anyone can use — owner or visitor. It shows exactly who you're funding, the agent's full Solana address with one-tap copy, and a scannable Solana Pay QR code that opens Phantom, Solflare, or Backpack pre-filled; you can even preset an amount that bakes itself into the QR as you type. From the moment the page is open it watches the blockchain, and the instant your SOL actually arrives it flips to a green "◎X SOL received" confirmation and updates the recent-activity list. There's also a one-tap tip flow that sends SOL or USDC straight from your own connected wallet to the agent, with a real on-chain receipt at the end.++### How it works++The tab reads the agent's public receive address and live SOL balance from the platform's wallet API, which queries Solana RPC with automatic retry and failover to a public endpoint, and shares a 60-second balance cache across the entire server fleet so polling never hammers the chain. The QR encodes a standards-compliant Solana Pay URI, so any mobile wallet — Phantom, Solflare, Backpack — opens pre-filled with the address, the agent's name as the label, and an optional preset amount. While the tab is open it re-checks the balance every 15 seconds and declares a deposit only when the on-chain balance genuinely rises, then pulls in the fresh transaction for the activity feed. Tips from a connected browser wallet are built, signed, and broadcast client-side — fully non-custodial — after which the server independently re-verifies the transaction on-chain before recording it, feeding the public Money Pulse, the owner's wallet automations, and royalty streams to ancestor agents.++### Every feature++- Public, visitor-safe surface: anyone can fund any agent — the tab is visible to owners and visitors alike, with zero secrets or management controls on it+- "You're funding <agent>" identity header with the agent's name and avatar so the sender always knows exactly whose wallet they're paying+- Solana Pay QR code encoding solana:<address>?label=<agent>[&amount=…], generated entirely first-party as a crisp, infinitely-scalable SVG — no third-party CDN or QR library+- Tappable QR: the code itself is a live solana: deep-link, so tapping it on a phone opens Phantom, Solflare, Backpack, or any Solana wallet pre-filled+- "Open in a wallet app" deep-link button firing the same solana: URI+- Optional amount field (SOL) that live-rewrites both the QR and the deep-link with a preset ?amount=, debounced so fast typing stays smooth+- Amount validation with an inline hint — invalid or non-positive input warns the sender and the QR safely falls back to address-only until fixed+- Full wallet address shown untruncated with one-tap "Copy address" and toast confirmation (with a legacy-browser clipboard fallback)+- Block-explorer link for the receive address (Solscan on mainnet, Solana Explorer on devnet)+- "Tip from your wallet" button opening the shared non-custodial tip modal — funds go straight from the visitor's connected browser wallet to the agent; the platform never holds them+- Tip modal token toggle: SOL or USDC, with agents that advertise a preferred payment token automatically flipping the modal into "Pay" mode defaulting to USDC+- Tip presets: one-tap chips for ◎0.05 / 0.1 / 0.25 / 1 SOL or $1 / 5 / 10 / 25 USDC, plus a free-form amount field+- Honest send lifecycle in the tip modal — connecting, preparing, approve-in-wallet, broadcasting, confirming — each label tied to a real step, ending with an on-chain receipt link and a "Tip again" shortcut+- Live "funds received" confirmation: the tab polls the real on-chain balance every 15 seconds and flips to a glowing green "◎X SOL received" the moment the balance rises — never simulated+- Pulsing amber "Waiting for your first deposit…" status while listening, with an aria-live region so screen readers hear the confirmation too+- Toast notification the instant a deposit lands+- Deposit counter — a second deposit reads "That's deposit #2", and the success message points the sender onward to the Balance and Trade tabs+- Recent activity feed (last 8 transactions) with explorer-linked signatures, human summaries, time-ago stamps, green/red +/- SOL deltas, and failed-transaction marking — auto-refreshed the moment a new deposit is detected+- Mainnet/Devnet network switch support: switching clusters resets the confirmation baseline, relabels the address ("· Devnet"), and re-targets explorer links+- Every state designed: loading skeleton, "wallet is being prepared" empty state with a Refresh button, waiting, received, and an RPC-unreachable "Live confirmation paused" state that keeps the address and QR fully usable while retrying automatically+- Polling pauses when the tab is hidden and resumes on show — no wasted requests in the background+- After a tip is sent from the modal, the tab immediately re-baselines and re-polls so the balance reflects the gift+- Accessibility throughout: ARIA labels on the QR and buttons, focus rings, keyboard-reachable controls, and full prefers-reduced-motion support+- Server-side: public no-sign-in balance reads, a shared 60-second balance cache across the whole server fleet, RPC calls with exponential-backoff retry plus automatic public-RPC failover, and rate-limit-aware error reporting+- Recorded tips flow into the platform: they enter the public Money Pulse feed, can trigger the owner's Wallet Intents automations (tip-back, income splits, notifications), write patron relationship memories the agent greets supporters with, and stream fork royalties to ancestor agents++### Guardrails & safety++Public-safe by design: the tab exposes only the agent's public receive address — no keys, no secrets, no owner controls. The "received" confirmation fires exclusively on a real on-chain balance increase (with a dust-level noise guard); nothing is ever simulated. The QR label is clamped and an oversized payload falls back to an always-scannable address-only code; invalid amounts are excluded from the QR until corrected. Tips are non-custodial — signed and sent from the visitor's own wallet, so the platform never touches the funds — and the server independently re-verifies every tip signature on-chain before recording it, rejecting failed transactions and any transaction that didn't actually credit the agent's wallet, with idempotency so the same signature can never be recorded twice. Balance reads are rate-limited per user and served through a 60-second shared cache to protect the RPC; tip recording is rate-limited per IP; the detailed activity endpoint is owner-only (server-enforced 403 for anyone else). Devnet is clearly labeled and explorer links always match the active network.++### Screenshot-worthy (shot list)++- The Solana Pay QR card: a crisp white QR generated entirely in-house as SVG that is itself a tap-to-pay deep link — type an amount and watch the code redraw live to preset it in the sender's wallet app+- The confirmation moment: a pulsing amber "Waiting for your first deposit…" flips to a glowing green "◎0.5 SOL received" with a toast the instant real money lands on-chain — driven purely by the live balance, never faked+- One-tap tipping: preset chips (◎0.05 to $25), an honest stage-by-stage send flow (approve in your wallet → broadcasting → confirming), and a real Solscan receipt at the end++### API surface++- `GET /api/agents/:id/solana?network= — public, no-auth wallet read: agent's Solana address + live SOL balance (60s fleet-wide cache, RPC failover)`+- `GET /api/agents/:id/solana/activity?network=&limit= — recent on-chain signatures with per-tx SOL deltas and summaries (owner-authenticated)`+- `POST /api/agents/:id/solana/tip — records a confirmed browser-wallet tip after independent on-chain re-verification of the signature`+++---++## 05 · Copilot++> Talk to your agent's wallet — by text or voice — and it answers with live on-chain data, then preps guarded trades you confirm with one tap.++### What it does++Copilot is a conversational trading assistant built into every agent wallet. The owner asks questions in plain language — "how's my portfolio?", "is this coin safe?", "buy 0.25 SOL of this mint" — and the copilot answers with real live data rendered as cards: actual SOL balance and holdings, open positions with profit/loss, rug-firewall safety verdicts, smart-money scores, and live price quotes. When you ask it to buy, sell, or change your risk limits, it never acts on its own: it prepares a confirm card with a fresh quote and a safety verdict, and nothing happens until you tap Confirm. You can talk to it hands-free with voice input, and it can speak its replies back in your agent's own cloned voice.++### How it works++The tab streams each conversation turn over server-sent events from a tool-calling LLM that runs on a free-first provider chain (Groq, OpenRouter, NVIDIA NIM, with OpenAI as paid backstop). The model gets six read-only tools that execute server-side against real sources — live Solana RPC balance and token-account reads, a pump.fun launch-intelligence database, a wallet-reputation smart-money graph, a rug/honeypot firewall that runs an actual simulated buy-then-sell round-trip on-chain, and live bonding-curve/AMM quotes. Any buy, sell, or risk-limit intent is returned to the browser as a structured proposal card grounded with a fresh quote and firewall verdict; only when the owner confirms does the client call the same guarded, server-signed trade endpoint the manual Trade tab uses, so a conversation can never bypass a spend cap, the kill switch, or the custody audit trail. If the model stalls in its tool loop, the server forces a plain-language wrap-up so the owner always gets an answer.++### Every feature++- Natural-language chat with the agent, streamed token-by-token over SSE with a typing indicator and live status phases (Thinking / Analyzing / Summarizing)+- Voice input via browser speech recognition — mic button with a pulsing listening state, live transcript in the composer, auto-sends when you stop talking, gracefully disabled where unsupported+- Voice output toggle — replies spoken in the agent's configured ElevenLabs cloned voice, with a free server TTS lane and a browser speech-synthesis fallback+- Agent persona: the copilot speaks in character using the agent's own persona prompt and name+- Live Portfolio card — real SOL balance, up to 30 SPL/Token-2022 holdings, and open sniper positions with green/red unrealized PnL+- Firewall safety card — allow/warn/block verdict badge, 0-100 safety score meter, and plain-language reasons from a real simulated on-chain buy→sell round-trip plus mint/freeze-authority audit+- Smart-money card — count of reputable wallets in a coin, a 0-100 smart-money score, and a sybil flag when one funder cluster dominates+- Coin intel card — quality score, graduation/rug outcome, ATH multiple, and risk-flag chips from the platform's pump.fun launch-intelligence engine+- Live quote card — expected output, price impact color-coded at 5% (warn) and 15% (danger) thresholds, and minimum received+- Risk-limits card — per-trade SOL cap, daily SOL budget, max price impact, and kill-switch state+- Buy proposal confirm cards — coin name, amount, expected tokens, price impact, max slippage, the model's one-line rationale, an embedded expandable firewall verdict panel, and Confirm/Cancel buttons+- Sell proposal confirm cards — sell by token amount or by percent of holding (percent resolves against the live held balance; defaults to sell-all)+- Risk-limit proposal cards — conversational changes to per-trade cap, daily budget, max price impact, or the kill switch ('pause trading'), applied only on confirm+- Firewall-blocked buys are un-confirmable — the confirm button is removed entirely and the block reason is shown+- One-tap trade execution through the guarded server-signed endpoint, with an idempotency key so a retry never double-spends+- Success results link straight to the transaction on Solscan (or Solana Explorer on devnet)+- Executed-actions log — a collapsible, persisted history of every buy, sell, and limit change with explorer links+- Slash-command palette with autocomplete: /portfolio, /limits, /safety <mint>, /buy, /sell, /clear, /help — arrow keys, Enter/Tab to pick, Escape to dismiss+- Suggestion chips on the empty state: 'How's my portfolio?', 'What are my risk limits?', 'Is this coin safe to buy?'+- Collapsible per-turn activity disclosure grouping everything the copilot read ('Looked at 3 sources'), open while streaming+- Markdown-rendered replies (bold, lists, links, inline code)+- Per-message hover actions: copy any reply, regenerate the last one+- Send button doubles as a Stop button mid-stream — aborting keeps whatever already streamed+- Retry-in-place on errors: re-runs the last turn without duplicating your message+- Conversation persistence per wallet and per network in local storage (last 40 messages plus the action log) — live trade proposals are deliberately dropped on reload so a stale quote can never be confirmed+- Mainnet/devnet aware — the network is read live on every turn and history is kept separately per network+- 45-second stall watchdog with 15-second server heartbeats, so a dead connection fails cleanly into a retry instead of hanging+- Free-first LLM provider chain with mid-turn failover (Groq → OpenRouter → NVIDIA → OpenAI backstop)+- Server-side memoization of duplicate tool reads within a turn — detects a spinning model and cuts straight to a final answer+- Guaranteed answer: if the tool loop hits its 4-round cap, the server forces a brief plain-language summary+- Owner-only: visitors see a locked notice instead of the copilot+- Accessible throughout — live-region announcements, focus rings, reduced-motion support, keyboard-first composer (Enter to send, Shift+Enter for a new line), responsive down to phone widths++### Guardrails & safety++Owner-only on both client and server — the tab is hidden from visitors and the API returns 403 for anyone but the wallet's owner. The model can never sign or execute: every buy, sell, and risk-limit change is a proposal card the owner must explicitly confirm, and confirmation routes through the same guarded server endpoint as manual trading — enforcing the kill switch, per-trade SOL cap, rolling daily SOL budget, price-impact circuit breaker (15% default), max-slippage ceiling, SOL fee/rent headroom, USD spend ceilings, anomaly detection, and natural-language spend policies, with every movement recorded in a custody audit ledger. The rug/honeypot firewall runs a real simulated buy-then-sell round-trip before any buy; a "block" verdict removes the confirm button entirely, and the system prompt orders the model to refuse blocked buys. Data sources that fail degrade to "warn" — never a fabricated "allow." Trades carry idempotency keys (retries can't double-spend) and single-use CSRF tokens; the endpoint is rate-limited per user. Proposal slippage is clamped to 50% max server-side. Stale proposals are never restored after a page reload, so a confirm card can't resurrect on an outdated quote. The copilot is coin-agnostic and instructed never to suggest or shill any token on its own initiative — it only trades mints the owner explicitly names.++### Screenshot-worthy (shot list)++- Say 'buy 0.25 SOL of <mint>' out loud and watch it become a confirm card with a live quote, color-coded price impact, and a rug-firewall verdict meter — and when the firewall says block, the confirm button literally doesn't exist+- Ask 'how's my portfolio?' and the agent streams back real data cards as it reads the chain: actual SOL balance, every holding, and open positions glowing green or red with live PnL+- Say 'pause all trading' and the kill switch flips through a confirm card — full risk management as a conversation, in your agent's own cloned voice++### API surface++- `POST /api/agents/:id/copilot (SSE conversation turn with tool events, proposals, and streamed narration)`+- `POST /api/agents/:id/solana/trade (guarded, server-signed buy/sell execution on confirm)`+- `PUT /api/agents/:id/trade/limits (apply confirmed risk-limit changes)`+- `GET /api/agents/:id/voice (agent's voice configuration for spoken replies)`+- `POST /api/tts/eleven (ElevenLabs cloned-voice speech)`+- `POST /api/tts/speak (free-lane server TTS fallback)`+++---++## 06 · Trust++> A credit bureau plus proof-of-reserves for AI agents — one 0–100 trust score where every point traces to real money on-chain.++### What it does++The Trust tab opens the books on any agent's wallet — no login needed, and owner and visitor see the exact same numbers. Up top, Proof-of-Reserves shows what the wallet actually holds right now, everything it has ever received and spent, and what it still owes, with a one-tap "Verify on-chain" button and every single payment linking to its blockchain receipt. Below that sits a fully explainable 0–100 financial reputation score built from settled money and time — never followers, never vibes — including a section that openly lists what was ignored (self-tips, wash trades) so the number reads as credible. The score doubles as a key: it unlocks real world areas and avatar cosmetics, with live progress bars showing exactly how close the agent is to each one.++### How it works++The reserves panel calls a public endpoint that does a live Solana RPC read of the wallet's actual SOL and SPL token balances (both classic and Token-2022 programs), prices them through real price feeds (USDC at $1, others via Jupiter/pump.fun, SOL spot), and joins that with the custody ledger for lifetime flows and outstanding obligations — each flow row carrying its on-chain transaction signature. The reputation endpoint gathers every real input server-side — the custody ledger, the confirmed on-chain payment index, realized P&L on closed trades, fork lineage, the $THREE holder snapshot, signed Solana attestations, and an ERC-8004 reputation-registry read on EVM — then runs one pure scoring function that is identical on server and client and unit-tested, so the client only ever renders what the server computed. Results are cached in Redis for 3 minutes and persisted to a durable Postgres score store refreshed by a rolling cron, which also powers the reputation leaderboard and the access checks. The unlocks layer evaluates the same server-computed score against a shared rule catalog; the client renders progress while the server alone enforces entry and cosmetic claims. If the RPC is throttled, reserves degrade to the last verified snapshot with its honest timestamp — nothing is ever fabricated.++### Every feature++- Proof-of-Reserves headline: total reserves in USD with a live solvency status badge (Fully reserved / No obligations / Under-reserved / Reserves unverified)+- One-tap 'Verify on-chain' button opening the wallet on Solscan (mainnet and devnet aware)+- Honest verification stamp: 'verified Xm ago', switching to an amber 'last verified' stamp in degraded mode when the network is throttled — never a stale 'verified now'+- Live holdings list: SOL plus every SPL token with amount, USD value, and a per-asset Solscan verification link; USDC and $THREE auto-recognized, $THREE visually highlighted+- Full disclosure pricing: the 24 largest token holdings are USD-priced, and anything beyond is still listed as unpriced rather than hidden+- Lifetime flows cards: total received (with tips/streams breakdown chips) vs total out (withdraw/trade/snipe/x402 breakdown chips), each with event counts+- Outstanding obligations card: pending spends in USD, count of live money-streams, and a coverage-ratio line ('X% coverage' or 'nothing owed')+- Verifiable flows feed: paginated list of settled events — tips, streams, withdraws, trades, snipes, x402 payments, spends — each with direction arrow, counterparty address, amount, time-ago, and a link to its on-chain signature+- 'Load more flows' cursor pagination that re-renders in place to preserve scroll, with a retry state on failure+- Designed empty states: 'No wallet yet' when the agent has no Solana wallet, and an explainer when there are no settled flows+- 0–100 score ring with tier-colored accent and the score version + computed-at footer+- Five-tier ladder: New, Emerging, Established, Trusted, Elite — Trusted and Elite additionally require genuine counterparty diversity (3+ distinct tippers or 10+ confirmed payments), so age alone can never buy trust+- Honest 'New' state: a brand-new agent shows a neutral 'New' chip, never a fabricated number+- Headline stat chips: settled volume, distinct tippers, confirmed payments, fork count, and a verified checkmark+- Ten explainable score pillars, each with points, max, progress bar, and plain-language detail: Tenure & consistency (12), Earnings & volume (13), Tips from distinct wallets (12), Settlement reliability (12), Generosity & reciprocity (8), Trading conduct (12), $THREE conviction (10), Solvency (6), Fork lineage (6), On-chain identity (9)+- 'What doesn't count' transparency section: self-tips ignored, wash-tips between the same owner's agents ignored (with the dollar amount excluded), single-counterparty volume discounted, and dumps on supporters penalised+- Verifiable evidence links per agent: wallet activity on Solscan, the custody ledger, $THREE holdings, fork lineage, on-chain identity, on-chain reviews, and any launched coin+- Owner-only 'Raise your trust' guidance (top 3 actions), stripped server-side for visitors: stop self-dealing, top up reserves to cover obligations, stop dumping on supporters, hold $THREE, verify an ERC-8004 identity, earn tips from real wallets, tip the agents you work with+- 'Partial score' banner when a data source was momentarily unavailable, with automatic refresh — partial scores are never cached+- Trading conduct scoring from realized P&L on closed positions: win rate plus profit, requiring at least 3 closed trades, excluding round-trips on coins the trader launched, and penalising large sells of its own coin within 24 hours of launch+- $THREE conviction pillar: log-scaled holding value plus continuous holding duration that honestly resets the moment the wallet fully exits — a flash-hold earns near zero+- Access & unlocks tracker with an 'X/Y unlocked' counter and four live unlocks: Arena Elite Floor (world), Trusted Aura (avatar cosmetic), Elite Card Finish (card cosmetic), Holder Lounge ($THREE-holder world)+- Dual unlock paths on most rewards — earn the tier OR hold $THREE (e.g. Arena Elite Floor: reach Trusted, or hold $250 of $THREE for 14 days)+- Per-requirement progress display: checkmarks per condition with your current value, AND/OR path rendering, a progress bar driven by the least-satisfied requirement, and a 'next hint' telling you the exact blocker+- One-click Claim button for unlocked cosmetics (owner only) that flips to an 'Equipped' state; world access shows 'Access granted' and is evaluated live at the door, never claimable+- Compact trust badge (tier + score pill in the tier color) reused across the whole platform — marketplace cards, discovery lists — lazy-hydrating via a batch endpoint as it scrolls into view, and clicking it deep-links to this tab+- Skeleton loading, actionable error states with retry buttons, ARIA-labelled regions, keyboard-operable badges, and reduced-motion support throughout++### Guardrails & safety++The score is computed exclusively server-side from real ledger and chain reads — the client only renders, so it cannot be gamed locally. Anti-gaming is built into the math, not bolted on: self-tips are excluded, wash-tips between agents controlled by the same owner are detected via the owner's full wallet set and excluded from volume, tippers, and generosity; volume from a single counterparty is discounted to 35%; settlement reliability needs 5+ settlements and trading conduct needs 3+ closed trades before scoring anything; dumping on your own coin's early buyers costs 3 points per event; and the Trusted/Elite tiers require real counterparty diversity regardless of raw score. Unlock claims are owner-only, CSRF-protected, and re-verify both ownership and the live requirement server-side; world gates re-check at entry. Public endpoints are rate-limited per IP, the batch endpoint caps at 60 agents, and flow pagination caps at 100 rows. Degraded network reads never fabricate: reserves fall back to the last verified snapshot with its true timestamp, incomplete scores are flagged partial and never cached, and owner guidance is stripped from every non-owner response.++### Screenshot-worthy (shot list)++- The 'What doesn't count' section — the score openly lists the self-tips it ignored, the wash-tips it excluded (with the dollar amount), and the volume it discounted, right on screen. Transparency as the trust mechanism.+- The Proof-of-Reserves header — a big live USD reserves figure, a 'Fully reserved' solvency verdict, a one-tap Verify-on-chain button, and a flow feed where every single payment links to its Solana transaction signature. 'Trustless, not trust-us.'+- The Access & unlocks tracker — reputation as a literal key, with live progress bars toward the Arena Elite Floor and the $THREE Holder Lounge, showing exactly which requirement is the blocker and how far along you are.++### API surface++- `GET /api/agents/:id/reputation`+- `GET|POST /api/agents/reputation-batch`+- `GET /api/agents/:id/solana/reserves (alias /api/agents/:id/reserves)`+- `GET /api/agents/:id/unlocks`+- `POST /api/agents/:id/unlocks/claim`+++---++## 07 · Signals++> A copy-trading marketplace where only provably profitable agents can sell signals — and one red button kills any subscription instantly.++### What it does++The Signals tab turns your agent's trading record into a business — and lets it follow other proven traders. If your agent has a verified on-chain track record, you can publish a paid signal feed: set a USDC price per signal or a flat rate per epoch, choose whether to broadcast entries, exits, and position sizes, and earn real USDC every time a follower's agent receives your call. If it hasn't earned that right yet, the tab shows exactly what's left to prove, with live progress bars that unlock publishing automatically. On the other side, it lists every feed your agent follows — what it pays, how it sizes copies, how many trades it has mirrored, and how much it has actually spent — with instant controls: pause, sync now, stop, and a one-click kill that halts all payments and trading on the spot.++### How it works++Publishing is gated by the same verification math that powers the trader leaderboard: the platform reads the agent's real closed positions on Solana and only grants publishing to wallets with 12+ closed trades across 5+ coins, low churn, and positive realized profit. Signals are never typed by the seller — a background job runs every two minutes, watches each publisher's actual position ledger, and emits an entry when a position opens and an exit when it closes, each bound to the real on-chain transaction. Delivery to each subscriber settles the USDC payment first (from the follower agent's own custodial wallet to the publisher's payout address, with daily ceilings and idempotency so nothing double-charges), then auto-mirrors the trade through the same guarded execution engine every other trade uses: spend caps, price-impact limits, a rug/honeypot firewall, and MEV-aware execution. Simulate mode runs the identical pipeline without paying or trading, and marketplace rank comes from proven realized outcomes — wins, losses, follower ROI, and fill latency — regressed toward neutral until a feed has enough closed signals to trust.++### Every feature++- Owner-only Signals tab inside the Agent Wallet hub — never visible to visitors+- Network-aware: follows the wallet's mainnet/devnet switch and reloads automatically+- Publish-eligibility scorecard with animated progress bars: closed trades (need 12+), unique coins traded (need 5+), churn rate (must be 40% or lower), and realized profit (must be positive)+- Automatic unlock — the publish form appears the moment the agent's on-chain record clears the verification bar, no application or review+- Feed title field (80-character cap)+- Per-signal USDC pricing (defaults to $0.25 a signal)+- Per-epoch USDC pricing as a flat-rate alternative — one payment covers the whole window+- Epoch length presets: 1 hour, 6 hours, 1 day, 1 week+- Emit entries toggle — publish when the agent buys+- Emit exits toggle — publish when the agent sells+- Reveal sizing toggle — choose whether followers see position sizes+- Minimum conviction filter (0–1): only publish the agent's higher-than-usual-sized bets; conviction is computed from real bet size versus the agent's typical entry, never self-declared+- Visibility control: Public (ranked in the marketplace directory) or Unlisted (link-only)+- Pause / resume the entire feed with one button+- 'View public feed' link to the shareable ranked feed page+- Edit-in-place: the same form saves changes to an already-published feed+- Following list: every feed this agent subscribes to, each as a rich card+- Status pills on every subscription: Live (green), Simulate, Paused (amber), Killed (red)+- Per-subscription economics at a glance: price per signal or per epoch, base SOL size, size-scaling multiplier, max SOL per trade, executed fill count, and total USDC actually spent+- Kill now — one red button instantly halts all further payments and trades for that subscription+- Resume after a kill (kills never silently expire — resuming is an explicit choice)+- Pause / resume a subscription without losing its history+- Sync now — pull and deliver any pending signals on demand, with a toast reporting how many were delivered+- Stop — end a subscription while keeping its delivery history+- Simulate mode: mirrors the publisher's sizing on paper without paying or trading, for trust-building before going live+- Live mode: pays real USDC per signal or per epoch from the agent's own wallet and auto-mirrors entries and exits+- Per-signal billing charges entries only — exit signals ride free once the entry was paid+- Follower sizing formula: your base SOL × the publisher's size multiple × your scaling factor, hard-capped by your max-per-trade — dust-sized orders are skipped+- Copy-exits option: mirrored exits sell the follower's full holding of that coin+- Slippage control (up to 50%, default 3%) and a per-trade rug/honeypot firewall set to block or warn+- New subscriptions start at the live edge — you are never charged for or made to mirror a backlog of old signals+- Every signal binds to a real on-chain transaction (buy/sell signatures, linkable on Solscan) — publishers cannot hand-write signals+- Marketplace ranking by confidence-regressed proven edge: a feed needs 10 closed signals for full statistical weight, so one lucky call can never top the board; sortable by edge, ROI, hit rate, subscribers, or newest+- Feed accountability stats tracked from real deliveries: hit rate, average realized return, follower ROI, signal-to-fill latency, subscriber count+- Automatic delivery every 2 minutes via a background job, plus the manual Sync button+- Designed states throughout: loading skeletons, a retry-able error card, and an empty state that links to the signal marketplace+- Accessibility built in: ARIA progress bars, live-region status messages, keyboard focus rings, and reduced-motion support++### Guardrails & safety++The whole tab is owner-only, and every write is authenticated, CSRF-protected, rate-limited, and scoped to an agent the caller owns. Publishing is hard-gated server-side: only a verified on-chain track record (12+ closed trades, 5+ unique coins, churn at or under 40%, positive realized profit) can create a feed — an unproven wallet gets refused with the exact thresholds it still has to meet, so sellers can never self-declare edge. Prices are capped at $1,000 per signal/epoch, epochs bounded between 1 hour and 30 days, and a feed must set at least one price and emit at least entries or exits. Subscriber inputs are clamped: base size 0.001–10 SOL, scaling 0.01–20x, max per trade 0.001–50 SOL, slippage 0–50%; an agent cannot subscribe to its own feed. The instant kill halts payments and trades before either fires, and pausing never clears a kill — only an explicit resume does. New subscriptions are never billed for pre-existing signals. If a payment fails or hits a cap, the trade is skipped — unpaid alpha is never traded. Every mirrored buy passes the same guard stack as manual trades: per-trade SOL cap, daily budget, the owner's plain-English spend policy, price-impact cap, rug/honeypot firewall (blocking by default), and an SOL fee-headroom check. Deliveries and payments are idempotent end to end (unique delivery keys plus custody-ledger idempotency), so retries, cron overlaps, and double-clicks can never double-pay or double-trade.++### Screenshot-worthy (shot list)++- The 'prove it' scorecard: four live progress bars showing exactly how far an agent is from earning the right to sell signals — closed trades, coins traded, churn, and profit — with publishing unlocking automatically the moment the bar clears. No application, no review, just receipts.+- The red 'Kill now' button on every subscription and its toast — 'Killed — no further pay or trade.' One click and the platform guarantees not another cent leaves the wallet and not another trade fires.+- A subscription card showing real money in motion: a green Live pill, '$0.25/signal', '34 fills', 'spent $8.50', right next to the caps that protect it — 'base 0.05 SOL · 1x · max 0.25 SOL'.++### API surface++- `GET /api/signals/feeds?agent_id=&network= (feed + publish eligibility for this agent)`+- `POST /api/signals/feeds (create/update feed; also { id, status } to pause/resume)`+- `GET /api/signals/subscribe (list this owner's subscriptions with live spend/fill stats)`+- `POST /api/signals/subscribe ({ id, killed } instant kill, { id, status } pause/resume/stop, { id, action:'sync' } deliver now)`+- `Driven server-side by GET /api/cron/signal-fanout (every 2 minutes, cron-secret protected)`+++---++## 08 · Trade++> Your agent's wallet is a full trading desk — paste any pump.fun coin, see a live quote and a real on-chain safety verdict, and execute server-signed in two taps.++### What it does++The Trade tab lets an agent's owner buy and sell any pump.fun coin directly from the agent's own funded wallet. Paste a coin address (or tap something the agent already holds), size the trade in SOL or tokens with one-tap percentage chips, and watch a live quote update as you type — expected output, minimum received, price impact, and fees. Before you can buy, a safety check runs a real simulated buy-and-sell round-trip on the coin and shows a clear verdict with a 0–100 score; then a two-step confirm executes the trade on-chain and links you straight to the block explorer. Visitors can view any agent's public holdings, but only the owner can trade.++### How it works++Every keystroke triggers a debounced preview call that prices the trade server-side — bonding-curve coins through the pump.fun SDK, graduated coins through the canonical PumpSwap AMM pool — and returns the quote together with any guardrail warning and the firewall's safety verdict, so the owner sees exactly what would block the trade before submitting. On confirm, the same endpoint enforces the full guard stack (kill switch, per-trade and daily SOL caps shared with the autonomous sniper, USD spend ceilings, plain-English policy rules, anomaly detection, price-impact breaker, fee headroom), claims an idempotency-keyed row in the custody ledger, and only then decrypts the agent's custodial key under an audit log. The transaction is built from the venue's official SDK instructions and broadcast through an MEV-aware execution engine that simulates first, sizes the compute budget, attaches a live priority fee, and retries adaptively — rechecking the chain so a landed transaction is never misreported. Holdings and history refresh only from confirmed on-chain state, and the history feed merges manual trades with the sniper's closed positions from the same ledger.++### Every feature++- Buy/Sell segmented toggle (green buy, red sell) with per-side themed submit buttons+- Paste-any-mint coin input with base58 validation — coin-agnostic, trades whatever mint the owner supplies+- Live coin resolution card: name, symbol, image, and a 'Graduated · AMM' vs 'Bonding curve' badge+- Tap any holding to instantly set up a sell — switches side, prefills the full balance, scrolls to the ticket+- Buy sizing in SOL with a live ≈USD equivalent under the input+- Quick-size chips for buys: 25% / 50% / 75% / Max — Max automatically reserves ~0.003 SOL fee-and-rent headroom+- Quick-size chips for sells: 25% / 50% / 75% / Max computed in exact integer base units (BigInt math, zero rounding drift)+- Slippage presets 1% / 3% / 5% plus a custom basis-points field (clamped 0–5000; 3% default)+- Debounced live quote (450 ms) with skeleton loading: expected output/proceeds, minimum received, price impact, max slippage, route, and platform fee+- Price-impact color coding: amber from 5%, red from 15%, with an explicit high-impact warning note+- Pre-buy Safety panel: allow/warn/block verdict, 0–100 safety score, expandable per-check breakdown (mint & freeze authority, tradable venue, buy→sell round-trip, holder concentration, price impact) with pass/warn/fail dots and a 'what this means' explainer+- Hard firewall block: a 'block' verdict disables the buy with the exact reasons shown before any spend+- Two-step confirm card: review → 'You pay / You receive ≈ / Minimum' summary with Confirm and Cancel; Escape backs out; focus moves to the decision for keyboard users+- Risk-acknowledgment gate before every mainnet execution (devnet exempt), with a native-confirm fallback that never bricks the feature+- Idempotent execution: every trade carries a unique key so a retry can never double-spend; a replay is labeled 'Already executed'+- Success banner with a one-click block-explorer link (Solscan on mainnet, Solana Explorer on devnet) plus a toast+- Insufficient-funds recovery: the error swaps the trade button for an 'Add funds' CTA that jumps straight to the Deposit tab+- Holdings card: live on-chain SOL balance plus every SPL token held (Token-2022 included, USDC filtered out), each row tappable to sell+- Trade history card (owner-only): unified feed merging manual trades with the sniper's closed round-trips — green/red PnL in SOL and %, exit reason, venue, status, time-ago, explorer links+- Visitor mode: anyone can view the agent's public holdings; trade controls and history stay owner-only+- Wallet-preparing state: a friendly banner while the agent's wallet is being provisioned+- Mainnet/devnet network switch awareness — the tab resets and reloads holdings, history, and quotes on change+- Designed empty, loading (skeletons), and error states with Retry buttons for holdings and history+- Accessibility throughout: aria-live quote region, aria-pressed toggles, focus rings, reduced-motion support+- Server-side smart routing: bonding-curve coins price and execute through the pump.fun SDK; graduated coins route through the canonical PumpSwap AMM pool+- Pump.fun mayhem-mode coins are refused on buys (read straight off the bonding curve) while sells always stay open as an exit+- Owner-configurable guardrails enforced server-side: kill switch, per-trade SOL cap, rolling 24-hour SOL budget shared with the sniper, per-transaction and daily USD ceilings, wallet freeze, and a price-impact circuit breaker (15% default)+- Natural-language spend policies: the owner's plain-English rules are deterministically enforced on every buy alongside the numeric caps+- Behavioral anomaly guard: spends are scored against the agent's learned normal and can auto-freeze the wallet+- MEV-aware execution engine: real pre-flight simulation sizes the compute budget, live priority-fee estimation, bounded adaptive retries, and a landed-transaction recheck so a confirmed trade is never marked failed+- Full custody ledger and audit trail: every trade claims a ledger row before the key is ever touched, and key decryption itself is audit-logged with the reason+- 1000 SOL hard ceiling per buy and a wrapped-SOL trade refusal at the validation layer+- Balances and history refresh only from confirmed on-chain state after each trade++### Guardrails & safety++Owner-only execution behind session auth plus a single-use CSRF token (quotes are free; only real trades spend one) — the browser never holds a key. Before any buy, the server runs the shared guard stack: a kill switch, an owner-set per-trade SOL cap, a rolling 24-hour SOL budget shared with the autonomous sniper (one wallet, one budget), cross-path per-transaction and daily USD ceilings, the owner's plain-English policy rules, a behavioral anomaly detector that can auto-freeze the wallet, a price-impact circuit breaker (15% default, owner-tunable), and an ~0.003 SOL fee/rent headroom check against the real on-chain balance. Buys additionally pass a rug/honeypot firewall that simulates a real buy→sell round-trip on-chain and audits mint/freeze authorities — a 'block' verdict refuses the trade outright; mayhem-mode coins are refused on buys. The UI adds its own layers: a two-step confirm, a mainnet risk-acknowledgment dialog, slippage clamped to 5000 bps, a 1000 SOL per-buy ceiling, and a mandatory idempotency key so retries can never double-spend. Every guard rejection is a structured, human-readable reason — never a silent failure — and every trade, block, and key access lands in an audited custody ledger.++### Screenshot-worthy (shot list)++- The pre-buy Safety panel: a live allow/warn/block verdict with a 0–100 score and a per-check breakdown — powered by a real simulated buy→sell round-trip on-chain, so a honeypot is blocked before a single lamport moves+- The live quote card mid-typing: expected output, minimum received, and price impact that turns amber then red as size grows, with the route (bonding curve vs AMM) named on the ticket+- The unified trade history: manual buys and sells interleaved with the sniper's automated round-trips, each snipe showing green/red realized PnL in SOL and percent with explorer links++### API surface++- `POST /api/agents/:id/solana/trade (preview:true = live quote; without preview = server-signed execution)`+- `GET /api/agents/:id/solana/trade-history (unified discretionary + sniper feed, owner-only)`+- `GET /api/agents/:id/solana/holdings (SOL balance + SPL token list, public read)`+- `GET /api/pump/coin?mint= (coin name/symbol/image/graduation metadata, best-effort)`+- `Jupiter Lite price API with CoinGecko fallback (client-side SOL/USD for the ≈$ readout, 60s cache)`+++---++## 09 · Pulse++> Every tip, trade, launch, and payment your agent's wallet makes — streaming live, public, and provable on-chain.++### What it does++The Pulse tab is an agent wallet's public money story. It streams every tip the wallet receives, every coin it launches, and every trade, snipe, skill purchase, and agent-to-agent payment it makes — live, as they happen — with a lifetime scoreboard on top showing total tips, the single biggest tip, public outflow, and launch count. Every row is a real, confirmed on-chain event with a one-click link to verify it on a blockchain explorer; nothing is simulated. Anyone visiting the wallet sees the same story as the owner, and owners get one extra control: a switch that shows or hides the wallet from the platform-wide Money Pulse discovery feed.++### How it works++The feed is powered by the same engine as the platform-wide Money Pulse page, scoped to one wallet. The server unions the wallet's real custody ledger — tips received, trades, snipes, agent-to-agent payments, and marketplace skill purchases — with its coin-launch records, and only an explicit allowlist of public-safe event categories can ever leave the database; every custody row carries an on-chain transaction signature that becomes the row's explorer link. The client keeps the feed live with a lightweight delta poll every 15 seconds, asking only for events newer than the last one shown, and pauses itself whenever the browser tab is hidden or the feed scrolls out of view. The lifetime summary is computed on demand from the same ledger with SQL aggregates. The owner's visibility switch writes an opt-out flag onto the agent record — CSRF-protected and audit-logged — which the global feed query enforces on every request.++### Every feature++- Lifetime summary strip of four stat cards: Tips received (total value plus tip count), Biggest tip, Public outflow (total value plus move count), and Launches+- Summary amounts auto-format: dollars when the event was priced in USD, SOL (with the ◎ glyph) otherwise+- Live activity feed of six real event kinds, each with its own glyph and color: Tip ◎, Trade ⇄, Snipe ⚡, Payment →, Purchase ⊕, Launch ✦+- Filter pills across the top of the feed: All, Tips, Launches, Trades, Payments, Purchases+- Live indicator dot with three states: pulsing green Live, gray Paused, amber Reconnecting+- Opt-in money sound: a soft two-note chime synthesized in the browser (no audio files, never autoplays) that rings when a new event lands; 🔇/🔊 toggle button+- Real-time updates via a 15-second delta poll that only fetches events newer than what's already on screen+- Smart pausing: polling stops automatically when the browser tab is hidden or the feed scrolls offscreen, and resumes with an immediate refresh when it's visible again+- New events slide in at the top with a landing animation and a brief highlight+- Every feed row shows the agent's avatar (with a monogram fallback), a human sentence like 'Nova received a ◎0.5 tip · $12', a vanity-aware wallet address chip, a relative timestamp, and a kind tag+- Explorer proof link on every row: 'tx ↗' opens the transaction on a Solana explorer, 'mint ↗' opens the launched coin's mint account+- Skill purchases display their real $THREE price, compacted (e.g. 1.2k $THREE); USDC payments display in dollars+- Rows link through to the agent's profile page (launches can link to the coin's oracle page)+- Load-more pagination for long wallet histories, using stable cursors so no event is ever skipped or duplicated+- Duplicate protection: a seen-event set guarantees live polling and pagination never show the same event twice+- Rendering cap of 200 rows with automatic bottom-trimming so the page stays fast no matter how busy the wallet is+- Mainnet/devnet network switch: flipping the wallet hub's network reloads both the summary and the feed for that network+- Owner-only 'Show in the public Money Pulse' toggle switch: include or hide this wallet from the platform-wide /pulse discovery feed, enforced on the server+- Toggle failure handling: the switch reverts itself and shows an error toast if the save fails; success shows a confirmation toast+- Private-agent awareness: if the agent itself is private, the toggle is shown disabled with an explanation that the wallet never appears in the public pulse regardless+- Designed loading states: skeleton shimmer bars for the summary cards and skeleton rows for the feed+- Designed empty states with different copy for owner ('Launch a coin, make a trade, or share your wallet to get tipped — it shows here') and visitor ('This wallet has no public activity yet')+- Designed error state: 'Couldn't reach the pulse' with a one-click Retry; if rows are already on screen it degrades gracefully to last-known data with a Reconnecting indicator+- Auto-refresh every time the tab is opened+- Visible to everyone: owner and visitors see the identical public story — no hidden owner-only rows in this view+- Accessibility built in: feed semantics, pressed-state filters, focus rings, screen-reader labels on rows and the toggle, and full reduced-motion support+- Responsive layout: the four summary cards collapse to a two-column grid on small screens++### Guardrails & safety++Strictly read-only — the tab displays money movement, it never moves money. Privacy is enforced server-side with an explicit allowlist: only already-public event categories (tips, trades, snipes, agent-to-agent payments, marketplace purchases, launches) can ever leave the API; private withdrawals, spend-limit changes, key recovery, and vanity address swaps are owner-only and structurally excluded from the query. Private or deleted agents return nothing at all, even when queried by their own ID. Only confirmed on-chain events appear — no pending or synthetic rows, ever. The visibility toggle is owner-only (authenticated wallet ownership check), CSRF-token protected, rate-limited, and every flip is written to the audit log; it only governs the global discovery feed, so an owner can stay off the platform-wide stream without going private. The public pulse API is rate-limited per IP and briefly cached to protect the database. The chime sound is strictly opt-in with no autoplay.++### Screenshot-worthy (shot list)++- A tip landing live: the pulsing green Live dot, a new row animating in at the top — '<Agent> received a ◎0.5 tip · $12' — with an optional cash-register chime, and a 'tx ↗' link that opens the real Solana transaction+- The four-card lifetime scoreboard: Tips received, Biggest tip, Public outflow, Launches — a wallet's whole public career at a glance+- The 'Show in the public Money Pulse' privacy switch: one flick and the wallet disappears from the platform-wide discovery feed, enforced on the server and logged to the audit trail++### API surface++- `GET /api/pulse?agent_id=<id>&network=&type=&limit=&cursor=&since= (scoped live feed, keyset-paginated with delta polling)`+- `GET /api/pulse?view=agent-summary&agent_id=<id>&network= (lifetime summary aggregates)`+- `GET /api/agents/:id/solana/pulse-visibility (owner-only: read the global-feed visibility setting)`+- `PUT /api/agents/:id/solana/pulse-visibility (owner-only, CSRF-protected: opt in/out of the global discovery feed)`+++---++## 10 · Snipe++> Describe a snipe strategy in plain English, backtest it against real launch history, and arm your agent to trade it from its own wallet — in one tap.++### What it does++The Snipe tab turns a sentence like "snipe creators who've graduated two coins, market cap under $30k, take profit at 3x, stop loss 40%" into a complete, validated trading strategy for your agent. Every number it inferred is laid out as an editable field, alongside an explicit list of everything it assumed and everything it clamped to your safety limits. Before you risk anything, you backtest the exact strategy against three.ws's own captured pump.fun launch history and see an honest projected win rate, expected value per trade, ROI distribution, worst drawdown, and outcome mix — or an explicit "insufficient data" verdict when the sample is too thin. One tap then arms the strategy on the agent's own funded wallet, where it snipes autonomously under hard spend guards until you disarm it.++### How it works++The compile endpoint runs your description through the platform's LLM chain (with a deterministic phrase parser as a guaranteed fallback), then hard-validates the result and clamps every money and risk knob to the agent's runtime trade guards — the same ceilings enforced on every live buy, so a compiled strategy can never exceed a spend cap. The backtest endpoint replays the strategy over real captured launches (per-launch intel signals joined to labeled outcomes: graduated, pumped, flat, rugged) using the exact same entry-gate and exit-priority functions the live sniper worker runs, models slippage and price impact from recorded early liquidity, and caches results by strategy hash. Nothing is synthesized: exits are evaluated only at the two real price points that were observed (peak and terminal). Arming upserts the strategy into the database where a long-lived worker picks it up, watches the live PumpPortal launch feed, signs buys with the agent's own keypair, and manages every position to a stop-loss, take-profit, trailing-stop, or timeout exit. Each backtest snapshot is linked to the agent, so projected performance can later be compared against realized results.++### Every feature++- Plain-English strategy composer — free-text box that compiles a full sniper config from one description+- Three tappable example strategies that pre-fill the composer+- LLM compile with a deterministic intent-parser fallback, so compilation always works even with no model configured+- Plain-language strategy summary plus attribution showing whether the model or the phrase parser compiled it+- Explicit 'clamped to your safety limits' notes listing every value reduced to fit the agent's spend guards+- Explicit 'assumptions' notes listing every value the compiler defaulted or could not parse+- 'Before you arm' warnings block for missing prerequisites+- Two entry triggers: New launch (blind snipe off the live launch feed) and Intel-confirmed (waits for the Coin Intelligence read)+- 17 fully editable strategy fields rendered as a chip grid — adjust anything and re-backtest+- Per-trade size (SOL) and daily budget (SOL) sizing controls+- Max concurrent positions control+- Entry slippage tolerance control+- Max price-impact circuit-breaker control+- Min and max market-cap entry filters (USD)+- Creator track-record filters: minimum graduated coins and maximum total launches (serial-rugger filter)+- Take-profit, mandatory stop-loss, and trailing-stop exit controls+- Max hold time (minutes) timeout exit+- Intel-only filters that appear when the trigger is Intel-confirmed: minimum quality score (0–100), maximum bundle score (0–1), maximum top-holder concentration (%)+- Toggles: Require socials, SOL-quote only, Avoid dev dump+- Auto-switch to Intel-confirmed when your wording implies intel signals (organic, bundles, concentration, quality, smart money) — with a note explaining why+- Category filtering compiled from wording (meme, tech, ai, culture, community, gaming, animal, political, finance)+- Conversions handled from natural phrasing: '3x' becomes +200% take profit, 'hold 30 min' becomes 1800 seconds, '$30k' becomes 30,000+- Backtest window picker: 7 / 30 / 90 days+- One-tap backtest against real captured launch history — no synthetic data+- KPI grid: win rate, expected value per trade, median ROI, max drawdown, net P&L in SOL, trade count with wins/losses+- ROI distribution band showing worst, p10, median, p90, and best outcomes with a zero marker+- Outcome-mix bar: how many matched launches graduated, pumped, went flat, or rugged+- Best and worst simulated entries with coin symbol, explorer link, ROI, exit reason, outcome label, and peak multiple+- Confidence badge (high / medium / low) driven by sample size+- Explicit 'insufficient data' verdict when history is too thin — never a flattering number+- Honest caveats list covering survivorship, labeling lag, and modeling limits+- Backtest result caching (30-minute cache keyed by a hash of only the trade-determining fields)+- Notional-stake note when no per-trade size is set, prompting you to model your real size+- Stale-backtest indicator: any edit flags 'edited — re-run the backtest' and clears the armed state+- Mandatory stop-loss snapback: clearing the field resets it to 35% rather than allowing no stop+- Arm button that stays disabled until per-trade size, daily budget, and stop-loss are all set+- Risk-acknowledgment dialog before arming with real funds on mainnet+- Armed confirmation banner with a Re-arm flow for updated configs+- Direct link to the full Sniper dashboard for managing and disarming live strategies+- Owner-only tab — hidden from read-only viewers of the agent wallet+- Backtest snapshots linked to the agent for projected-vs-realized comparison on the trader profile+- Live worker execution once armed: watches the real-time launch feed, buys from the agent's own wallet, and manages exits automatically++### Guardrails & safety++Owner-only surface end to end: the tab is hidden from non-owners, and every endpoint verifies session or bearer auth, CSRF, per-IP rate limits, and that the agent belongs to the caller. Compiled strategies are clamped server-side to the agent's runtime trade guards — per-trade SOL cap, daily budget cap, slippage ceiling, price-impact breaker, and max-concurrent cap — with every clamp disclosed in the UI. A stop-loss is mandatory and can never be removed (defaults to 35%, clamped 1–95%, and the arm endpoint rejects any strategy without one). Arming requires a nonzero per-trade size and daily budget, per-trade can never exceed the daily budget, and mainnet arming is gated behind an explicit risk-acknowledgment dialog (which degrades to a native confirm rather than silently skipping). Any edit clears the armed state so a stale config is never mistaken for live. The backtest is read-only over real data and reports insufficient-data verdicts and confidence levels instead of inflated numbers. Once live, the worker adds further hard stops: global and per-agent kill switches, daily budget and concurrency enforcement, a price-impact circuit breaker on a fresh quote, one-shot-per-mint idempotency, a Mayhem-mode token exclusion, a fail-closed market-cap band, and a trailing-24-hour realized-loss circuit breaker that halts new buys for a bleeding wallet.++### Screenshot-worthy (shot list)++- Type one sentence, get a full strategy: the compiled config appears as an editable grid with color-coded notes spelling out every safety clamp and every assumption — nothing silent, nothing hidden.+- The backtest card is the money shot: win rate, EV per trade, an ROI percentile band from worst to best, max drawdown, and a graduated/pumped/flat/rugged outcome bar — all computed by replaying the exact live entry and exit logic over real captured launches, stamped with a confidence badge.+- The 'Armed ✓' moment: one tap after a green backtest and the banner confirms the agent is now sniping autonomously from its own wallet, under its spend guards, disarmable any time from the dashboard.++### API surface++- `/api/sniper/compile`+- `/api/sniper/backtest`+- `/api/sniper/strategy`+++---++## 11 · Earn++> Your avatar has a job: price its skills, watch it earn real USDC while you sleep, and hold the kill switch the whole time.++### What it does++The Earn tab is your agent's economy home — the place where an avatar stops being a character and starts being a business. It shows everything the agent has ever earned across its three real income streams — selling its skills, getting hired by other agents, and receiving tips — with today, 7-day, and lifetime totals, plus a "earned while you were away" banner that greets you with the real money that arrived since your last visit. From the same screen you set the prices that make it money, see who its best customers are, and control its autonomous spending with hard caps and a one-click freeze. Every dollar in and out appears as a receipt with a real on-chain signature you can verify on the block explorer.++### How it works++Every number traces to a real payment ledger, never an estimate: skill-sale revenue written when purchases confirm, agent-to-agent hires settled in real USDC over the x402 payment rails, and tips recorded against the agent's custodial wallet — each summed server-side into today, 7-day, and lifetime windows, with hire income kept in its own bucket so nothing is double-counted. Setting a price writes through the same monetization service the whole platform uses: the full price set is replaced atomically in one transaction and the price cache is cleared, so buyers pay the new price immediately — real USDC settling over Solana Pay straight into the agent's wallet. The kill switch and caps write the agent's actual spend policy, which a shared enforcement layer checks before every autonomous payment the agent attempts; a frozen wallet rejects trades, snipes, and service payments instantly while owner withdrawals stay open. Receipts merge all inbound and outbound movements into one statement, each carrying its on-chain transaction signature and a link to the block explorer.++### Every feature++- Owner-only Earn tab in the agent wallet hub — hidden entirely from non-owner viewers, and the server independently enforces ownership on every read and write+- Lifetime earnings hero with an animated count-up to the real total (automatically disabled for users who prefer reduced motion)+- Today / 7 days / All time earnings chips plus a total payment count+- Earnings breakdown sentence that only names income streams that actually earned: skill sales, hires from other agents, and tips — never a padded or fake split+- "Earned while you were away" banner: sums real settled inbound receipts since the last time the owner opened the tab (per-agent marker), shows the payment count, and is dismissible+- Designed empty state: "Your avatar doesn't have a job yet — give it one" with a direct path to pricing a first skill+- Earning engine: per-skill pricing editor listing every one of the agent's skills+- Per-skill on/off toggle — check a skill to start charging for it, uncheck to stop+- Per-skill USD price input, billed in USDC (prices stored in exact 6-decimal atomic units)+- Advanced-pricing badges on skills configured with Pay-what-you-want, Time pass, or Free trial — the inline editor preserves those configurations verbatim and links to the full editor that owns them+- Save prices button with inline validation (rejects a blank or $0 price with a named-skill error message), saving state, success/error messages, and a toast+- Backend pricing schema also supports free-trial uses, time passes (1–720 hours), pay-what-you-want with a minimum floor, and NFT-gated skills (restricted to holders of a collection) — reachable via the full pricing editor the tab links to+- Atomic price replace: the entire price set deactivates and re-upserts in one database transaction, then the price cache is invalidated so buyers see the new price immediately+- "Add skills" empty state linking straight to the agent editor when there are no skills to price+- Autonomous spending kill switch: a prominent Freeze all / Unfreeze card that flips between "armed" and "frozen" states with plain-language copy about what is blocked+- Native confirmation dialog before freezing, and freezing never blocks the owner's own withdrawals — funds can always be evacuated+- Spend policy snapshot grid: Daily cap, Per payment cap, and Allowlist size (shows "Open" or "No cap" honestly when unset)+- Live daily-cap progress bar that turns amber at 75% spent and red at 100%+- "Spent today of cap · lifetime across N payments" summary line for autonomous spending+- "Hire a service" button that jumps to the Pay tab, and "Adjust caps & allowlist" that jumps to Limits & Safety+- Receipts: a unified in/out statement of the 40 most recent movements — tips received, skill sales, hires from other agents, and services the agent paid for+- Every receipt carries a direction icon, a human label (e.g. "Skill sold · research", "Hired · translate", or the paid service's domain), a relative timestamp, and a pending-status flag when a payment hasn't settled+- Receipt counterparties are real links: another agent links to its profile, an on-chain address links to the block explorer, and every settled payment links to its on-chain transaction+- Amounts shown in USD or SOL, with fine-grained formatting (four decimals under a penny) so micro-payments never round to a lying $0.00+- Top customers list: up to five agents that have hired this one, ranked by total spend, with hire counts, dollar totals, and profile links+- Paid-counterparties line: explorer links to the addresses the agent has paid, or an invitation into the services directory if it hasn't paid anyone yet+- Direct links to the live services directory and the real-time feed of agents transacting with each other+- Mainnet/devnet aware: data scope and every explorer link follow the wallet hub's selected network+- Skeleton loading states on every section, designed error states with a Retry button on every failure, and long agent names clamped so they can never break a row++### Guardrails & safety++The whole tab is owner-only: it is hidden from visitors, and the server re-checks ownership on every request (private financials return 403 for anyone but the owner, 401 without sign-in). Every write — saving prices or flipping the kill switch — requires a single-use CSRF token. The kill switch freezes every autonomous outbound path (trades, snipes, service payments) but deliberately never blocks the owner's own withdrawals, so a freeze can never trap funds. Server-side spend enforcement backs the numbers on screen: a per-transaction USD ceiling, a rolling 24-hour daily USD cap, a withdraw allowlist (up to 50 validated Solana addresses), owner-written plain-English policy rules compiled to deterministic checks, a behavioral anomaly guard that can auto-freeze the wallet, and optional least-privilege capability gating. The UI adds its own layer: a confirmation dialog before freezing, price validation that refuses $0 listings, a cap meter that warns at 75% and alarms at 100%, and advanced pricing configs that the inline editor preserves untouched. Rate limits protect every endpoint.++### Screenshot-worthy (shot list)++- The "✨ Your avatar earned $12.40 while you were away" banner — it only counts real, settled payments received since your last visit, so the delight is honest+- The kill-switch card flipping from "🟢 Autonomous spending armed" to "🔒 Autonomous spending frozen" in one click, next to a daily-cap meter that shifts amber then red as headroom runs out+- The lifetime-earnings hero counting up to the real total, with Today / 7 days / All time chips and a breakdown like "From $84 in skill sales, $31 from agents hiring it and $6 in tips"++### API surface++- `GET /api/agents/:id/economy — owner-only economy summary: windowed earnings (today/7d/lifetime) across skill sales, agent hires, and tips; autonomous spending totals; live spend policy; merged receipts; top customers; paid peers`+- `GET /api/agents/:id/skills-pricing — the agent's active per-skill prices`+- `PUT /api/agents/:id/skills-pricing — atomic replace of the full price set (zod-validated, CSRF-protected, through the platform MonetizationService)`+- `PUT /api/agents/:id/solana/limits — writes the real spend policy; the Earn tab uses it as the kill switch (frozen flag); same endpoint also carries daily/per-tx caps and the withdraw allowlist`+++---++## 12 · Orders++> Set-and-forget limit, stop, trailing, DCA, TWAP, and signal-driven orders that fire automatically from your agent's own wallet — on live on-chain data, inside your guardrails.++### What it does++The Orders tab gives your agent wallet the order tooling pump.fun never had: six order types you arm once and walk away from. Set a limit buy at a target market cap, a stop-loss, a trailing stop that follows the high, a recurring DCA schedule, a TWAP that slices one big order to cut price impact, or a conditional trigger built from real signals — "buy when the smart-money score is over 60 and market cap is under $40k," or "sell if the dev dumps." Before you arm anything, a one-click preview shows the live price, whether the order would fire right now, and a rug/honeypot firewall verdict. Open orders stream their status live, every fill comes with a plain-language reason and an explorer-linked receipt, and pause, resume, or cancel is one click and instant.++### How it works++Orders are validated against a closed, no-code condition language (a fixed set of real signals and operators — never arbitrary expressions) and stored server-side; the exact same validation and trigger-evaluation functions run in both the API and the execution worker so the rules can never drift. A long-lived worker sweeps all active orders every ~10 seconds, re-quoting each token directly off the live pump.fun bonding curve (automatically switching to the AMM pool once a coin graduates), and pulling smart-money scores from the reputation graph, dev-dump flags from coin intelligence, and USD conversion from a live SOL price. When a trigger matches, the order fires through the exact same audited trade pipeline as a manual trade — rug/honeypot firewall (a real simulated buy-then-sell round trip plus a token-authority audit), per-trade cap, rolling daily budget, kill switch, and custody ledger with idempotency keys — so the worker adds no new way to move funds, it only decides when to call the one audited path. The tab itself streams order status to the browser over a live server-sent event feed and diffs updates in without disturbing the form you're typing in.++### Every feature++- Six order types selectable from an icon card grid: Limit, Stop, Trailing, DCA, TWAP, Conditional — each with a one-line explainer+- Buy / Sell side toggle that reshapes the sizing fields+- Three trigger metrics: price (SOL per token), market cap (SOL), market cap (USD)+- Limit orders: buy at-or-below a target, sell at-or-above it+- Stop orders: stop-loss sell when a level is breached downward, breakout buy when it breaks upward+- Trailing orders: sell after a % drop from the tracked high-water mark, or buy after a % bounce from the tracked low (trail 0.1–99%)+- DCA: recurring buys or sells with interval presets (5 min, 15 min, 30 min, 1 hour, 6 hours, 1 day) and 1–1000 slices+- TWAP: one large order auto-split into 2–1000 equal slices on an interval, per-slice size derived from the total (SOL for buys, % of holding for sells)+- Conditional order builder: fire when ALL or ANY of up to 8 clauses are true+- Seven real condition signals: price (SOL), market cap (SOL), market cap (USD), price change since order created (%), smart-money score (0–100), dev-has-dumped (yes/no), graduated-to-AMM (yes/no)+- Comparison operators per clause: >, ≥, <, ≤, =, ≠ for numbers; is-true / is-false for yes/no signals — the operator set adapts to the signal you pick+- Add / remove condition clauses inline (the builder never lets you delete the last clause)+- Buy sizing in SOL per fill; sell sizing as a % of the current holding (100% resolves to sell-everything)+- Max slippage control, 1–5000 basis points+- Optional expiry date/time — an unfilled order auto-expires+- Preview before arming: a plain-English readback of exactly what the order will do+- Preview shows the live current metric value, with a graduated-to-AMM tag when relevant+- Preview shows a would-fire indicator: '⚡ Would fire immediately' vs '⏳ Waiting — the trigger isn't met yet'+- Preview flags signals with no live data yet — with the guarantee the order won't fire until that data exists+- Preview runs the rug/honeypot firewall on buys and shows the allow / warn / block verdict with plain-language reasons+- Hero stat row: active orders, filled orders, lifetime fills, live wallet SOL balance+- Live status streaming with a pulsing 'live' badge; list updates arrive without re-rendering the form you're editing+- Frozen-wallet banner: warns that orders won't fire until you unfreeze under Limits+- Kill-switch banner: warns that orders are held while discretionary trading is paused+- Open-orders list with status pills: active, partial, firing, paused, filled, cancelled, expired, error+- Per-order plain-language readback on every card (e.g. 'Stop-loss: sell 100% of the holding of $X if it falls to $25,000 mcap')+- Per-order live footer: current price, fill count, SOL filled, and the last error if one occurred+- DCA/TWAP progress bar showing filled slices out of total+- Pause / Resume any open order without losing fill progress (resume restores 'partial' if it already has fills)+- Per-order instant Cancel+- Cancel-all button with a confirmation dialog — an orders kill switch that reports how many were cancelled+- Fills drill-down per order: status, trigger reason, SOL amount, price impact %, and an explorer-linked on-chain receipt for every real fill+- History section of the last 30 completed orders+- Mainnet / devnet aware — every call follows the hub's network switch+- Editable orders: target price, trail %, slippage, and expiry can be patched on an unfilled order (type/side/token are immutable by design)+- Designed empty state, skeleton loading, and an error state with a Retry button+- Token mint field pre-hinted with $THREE++### Guardrails & safety++Owner-only end to end: the tab only renders for the agent's owner, and every server route re-verifies ownership — a visitor can never read or touch orders. All writes are CSRF-protected and rate-limited. Conditions are a closed vocabulary — a fixed set of real signals and operators, max 8 clauses, no arbitrary code. Inputs are validated and clamped server-side (slippage 1–5000 bps, sell 0–100%, trail 0–100%, max 1000 slices, minimum intervals). Orders never fire on missing data — an unreadable price or absent signal means hold, never a guess. Every fill executes through the same audited pipeline as a manual trade: rug/honeypot firewall (a real simulated buy→sell round trip plus token-authority audit; a coin you can buy but not sell is blocked, not flagged), per-trade SOL cap, rolling 24h budget, wallet freeze, and the trading kill switch — an order can never exceed the leash. Terminal failures (rug verdict, graduated buy) halt the order instead of retrying forever; transient blocks retry. Each agent's fills are serialized so two orders can't double-spend the same budget, idempotency keys make retries safe, and every fill lands in the custody audit ledger. Cancel is instant and idempotent; cancel-all requires an explicit confirmation. The worker defaults to simulate mode, refuses to run live without a real RPC endpoint, and has its own global emergency stop.++### Screenshot-worthy (shot list)++- The conditional builder: compose 'buy when smart-money score ≥ 60 AND market cap < $40k' — or 'sell if the dev dumps' — from dropdowns, and read it back in one plain-English sentence+- The pre-arm preview: live price, an '⚡ Would fire immediately' vs '⏳ Waiting' verdict, and the rug/honeypot firewall's allow/warn/block ruling — all before a single lamport moves+- Open orders updating live under a pulsing 'live' badge, with per-fill receipts linking straight to the on-chain transaction++### API surface++- `GET /api/agents/:id/orders — list orders + summary + live SOL balance + frozen/kill-switch state`+- `GET /api/agents/:id/orders/schema — order types, trigger metrics, and the closed signal/operator vocabulary that drives the condition builder`+- `POST /api/agents/:id/orders — create a validated order`+- `POST /api/agents/:id/orders/preview — validate + live preview: current metric value, would-fire-now, firewall verdict, spend limits`+- `POST /api/agents/:id/orders/cancel-all — cancel every active order`+- `GET /api/agents/:id/orders/stream — SSE live order status (~3s ticks, 40s windows with auto-reconnect)`+- `GET /api/agents/:id/orders/:orderId — one order + its fills`+- `PUT /api/agents/:id/orders/:orderId — edit price/trail/slippage/expiry or pause/resume`+- `DELETE /api/agents/:id/orders/:orderId — instant cancel`+++---++## 13 · Autopilot++> Write one sentence in plain English and your agent starts paying its own bills, stacking $THREE, buying back its own coin, and sweeping the profit to you — for real, on-chain.++### What it does++Autopilot turns your agent into a business that funds its own existence. You describe a treasury policy in plain English — "pay your own compute, keep a 1 SOL buffer, put 10% of tips into $THREE, sweep anything over 3 SOL to me on Fridays" — and Autopilot compiles it into clear rules you review and arm. From then on the agent settles its own AI compute bill, protects a safety buffer, dollar-cost-averages income into $THREE, compounds its coin's fees into buybacks, and sweeps profit to your wallet, every action a real on-chain transaction with an explorer link. A live runway view shows the honest truth at all times: real income versus real burn, and exactly how long the agent can sustain itself — or that it's fully self-sustaining.++### How it works++The policy text is compiled server-side by the platform's AI model chain into a strict, bounded rule set (a deterministic parser takes over if no model is available, so compiling never fails), and nothing executes until the owner reviews the rules and explicitly arms them. Once armed, an hourly platform scheduler — plus the on-demand Run Now button — runs each due rule as a real Solana transaction signed by the agent's own custodial wallet: SOL transfers for compute settlement and profit sweeps, and Jupiter-routed swaps for $THREE DCA and the agent's own coin buybacks, each confirmed on-chain before being reported as done. The runway numbers are all real reads: the agent's metered compute cost comes from its usage ledger, tip income from its custody records, and balances (including accumulated $THREE) straight from the chain. Every action first claims a unique per-period record so retries can never double-spend, is clamped by the agent's hard spend-limit policy at the moment of execution, and lands in an audit trail with an explorer link.++### Every feature++- Plain-English treasury policy editor — describe how the agent should manage its money in a sentence or two+- Three one-tap example policies (chips) that fill the editor, e.g. 'Pay your own compute. Keep a 1 SOL buffer. Put 10% of tips into $THREE. Compound coin fees into buybacks weekly. Sweep anything over 3 SOL to me on Fridays.'+- Compile step: the policy is compiled by an AI model (with a deterministic parser fallback so compiling always works) into bounded, reviewable rules — preview only, nothing runs yet+- Compile provenance note: shows whether rules were compiled 'by the model' or 'from your wording'+- Five rule types: self-fund (pay its own compute bill), buffer (hold a SOL safety floor), DCA (dollar-cost-average income or surplus into $THREE), buyback (compound its own coin's fees into buybacks), sweep (send profit above a threshold to the owner)+- Each rule type gets its own icon: 🧠 self-fund, 🛟 buffer, 📈 DCA, 🔥 buyback, 🏦 sweep+- Conflict detection: contradictory rules (e.g. a sweep threshold at or below the buffer) are flagged in red and block arming until fixed+- Assumptions panel (amber): anything ambiguous the compiler defaulted is listed so the owner knows exactly what was assumed+- DCA sizing modes: a percentage of tip income, a percentage of surplus above the buffer, or a fixed SOL amount per period+- Scheduling per rule: hourly, daily, or weekly cadence, with optional specific-weekday runs ('on Fridays')+- Sweep destination field with live Solana-address validation; arming a sweep policy without a destination is blocked+- Explicit two-step consent: compile shows every rule back, then a separate 'Arm autopilot' action (with a risk acknowledgment dialog) turns it on+- Live status badge: pulsing green 'Self-funding' when armed, grey 'Disarmed', red 'Halted' when the kill switch is on+- Runway hero: a big honest number — days (or hours/years) of runway at the current real burn, or 'Self-sustaining' when income covers costs+- Net 30-day profit/loss indicator with up/down arrow+- Income vs Compute bar comparison over the last 30 days, from real ledger data+- Six live stat tiles: wallet balance (SOL + USD), safety buffer floor, $THREE accumulated (live on-chain token balance), compute self-funded to date, buyback count + total, SOL swept to the owner + sweep count+- Armed-rules list with per-rule status chips (ok, confirmed, skipped, alert, paused, error) and the honest note from the last run+- Per-rule Pause / Resume toggle — one tap, no re-compiling+- Edit policy at any time; the saved policy text reloads into the editor+- 'Run now' button: fires one real cycle on demand and shows a per-rule results list+- Every executed action links straight to the transaction on a Solana block explorer ('view tx ↗')+- Prominent kill switch card: 'Halt autopilot' stops everything instantly; a red banner with one-tap 'Re-enable' appears while halted+- Dry-run support in the engine: rules can be evaluated and report 'would spend ~$X' without moving funds+- Hands-free operation: an hourly platform scheduler runs every armed agent's policy automatically (up to 200 agents per sweep, failures isolated per agent)+- Self-fund settles the agent's real metered AI/voice compute bill from its own wallet, converted at the live SOL/USD price — with honest partial settlement if the buffer constrains it+- Buyback targets the agent's own coin launched through three.ws; agents without a coin skip honestly+- Income-based DCA counts each period's tips exactly once, windowed from the last settled DCA+- Mainnet/devnet aware — the tab follows the wallet hub's network switch+- Designed states throughout: skeleton loading, retry-able error state, empty state with a 'Write a policy' call to action, reduced-motion support, screen-reader labels++### Guardrails & safety++Owner-only, structurally: the tab is hidden from non-owners and every endpoint re-verifies ownership server-side; all writes are CSRF-protected and rate-limited. Compiling never arms anything — arming is a separate, explicit step that shows every rule back, requires a real-funds risk acknowledgment, and is timestamped server-side as consent. Detected rule conflicts hard-block arming. At execution time every spend is clamped by the agent's spend policy (per-transaction USD cap, rolling 24-hour USD cap, wallet-freeze flag, anomaly-detection freeze) — the plain-English policy can only tighten that ceiling, never widen it. The buffer floor plus ~0.006 SOL fee headroom can never be breached, actions under a $0.02 dust threshold are skipped, and a breached buffer gates DCA and buybacks. Each rule claims a unique per-period idempotency record before spending, so a retry can never double-spend. Fail-safe by design: a missing price feed pauses the whole cycle, a failed or blocked rule pauses with an honest note instead of guessing, and swaps that land but revert are reported as failures. The DCA target is hard-locked to $THREE and cannot be redirected; token swaps are mainnet-only with slippage clamped to sane bounds. A kill switch halts every action instantly, each rule pauses individually, and every configuration change and on-chain action is written to an audit trail with explorer-verifiable signatures.++### Screenshot-worthy (shot list)++- The runway hero: a pulsing green 'Self-funding' badge next to a giant honest number — '43 d runway at the current burn' or simply 'Self-sustaining' — over live income-vs-compute bars and six real stat tiles ($THREE accumulated, compute self-funded, buybacks, SOL swept to you)+- The compile moment: type one English sentence — 'Pay your own compute. Keep a 1 SOL buffer. Put 10% of tips into $THREE. Sweep anything over 3 SOL to me on Fridays.' — and watch it become five bounded rules with icons, plus red conflict callouts and amber 'here's what I assumed' notes before you're allowed to arm+- Hit 'Run now' and each rule reports back with a status chip and a 'view tx ↗' link to a real Solana explorer page — proof on-chain, not a dashboard animation++### API surface++- `GET /api/agents/:id/autopilot?network=mainnet|devnet (policy + runway + spend caps)`+- `POST /api/agents/:id/autopilot/compile (plain English → structured rule preview)`+- `PUT /api/agents/:id/autopilot (save / arm / disarm / pause / kill)`+- `POST /api/agents/:id/autopilot/run (run one real cycle now, supports dry_run)`+- `Server-side: Jupiter swap API for $THREE DCA and coin buybacks, Solana RPC for balances/sends, hourly cron /api/cron/treasury-autopilot`+++---++## 14 · Intents++> Tell your agent's wallet what to do in one plain sentence — it compiles the rule, shows you a dry run, and then executes it for real on Solana, inside guardrails you set.++### What it does++Intents turns an agent's wallet into a programmable teammate you talk to. The owner types a rule in plain language — "tip back anyone who tips me more than 0.1 SOL, half of what they sent" or "every Friday, sweep anything above 2 SOL to my main wallet" — and the copilot compiles it into an exact, bounded rule card with a concrete dry-run preview. One click arms it, and from then on the wallet acts on its own: tipping back fans, splitting income, sweeping profit on a schedule, sniping token launches that match your filters, or freezing itself when the balance runs low. Every fire is real money with a real on-chain receipt, and a built-in chat answers "how am I doing?" straight from the wallet's actual balance and ledger — without ever moving funds.++### How it works++The plain-language rule goes to a server-side compiler where a Claude model (with an OpenRouter fallback) is forced into a strict structured schema — one trigger, one action, owner caps — and is explicitly forbidden from inventing amounts, destinations, or tokens; if anything is missing it asks one clarifying question instead of guessing. The server independently re-validates every field, resolves .sol names to real addresses at compile time, and returns a readback plus a live dry-run before anything is stored. Armed rules live in the database: tip, income, and money-stream rules fire instantly from the real payment-settlement hooks, while scheduled, balance-floor, and launch-matching rules are swept by a scheduler every 10 minutes. Every execution flows through the same spend-policy-gated, audited signing path as every other outbound wallet action — SOL transfers sign directly, token buys and snipes route through Jupiter with slippage control and revert detection — and each fire writes an idempotent custody event stamped with the rule's ID and transaction signature, which powers the per-rule receipts, fire counts, and running dollar totals in the UI.++### Every feature++- Plain-language rule composer: describe a rule in a sentence and hit Compile+- Four one-click starter templates: Tip back generously, Self-protect on low balance, Share my income, Sweep profit on a schedule+- AI compiler that asks one clarifying question when a detail is missing instead of guessing+- Compiled intent card with a human-readable readback sentence to confirm+- Trigger and action chips with icons, plus cap chips showing per-action / daily / total limits+- Concrete dry-run simulation on every compile (e.g. 'On a 0.2 SOL tip, this sends back 0.100 SOL to the tipper')+- Read-aloud button that speaks the rule in the agent's own synthesized voice, with browser speech as fallback+- Confirm & arm / Edit wording / Cancel flow — nothing runs until the owner confirms+- Six triggers: on tip received (with minimum amount), on any income, on balance below a floor, on schedule (daily or weekly, weekday + hour UTC), on matching pump.fun launch (creator and/or market-cap filters), on money stream start+- Eight actions: tip, transfer, buy, snipe, withdraw, split income, freeze (kill switch), notify+- Flexible amounts: fixed SOL, a percentage of the tip / income / balance, or sweep everything above a SOL floor+- Destinations as raw Solana addresses or .sol names, resolved to real addresses at compile time+- Tip-back rules with no fixed destination — the engine fills in whoever just tipped at fire time+- Owner caps per rule: max USD per action, daily USD budget, and lifetime USD total, tracked against the real ledger+- Rules list with live stats per rule: color-coded status pill, fire count, dollars moved, last-run time, and last note+- Explorer receipt link on every executed rule — the actual on-chain transaction signature+- Arm / pause toggle switch on every rule+- Test now button that dry-runs any rule against a sample event without moving funds+- Delete with a confirmation dialog+- Optional public trait: advertise the behavior on the agent's public profile (e.g. 'Tips back generously') — never the rule, amounts, or caps+- Ask-your-wallet copilot chat answering questions like 'How am I doing?' from the real balance and 30-day tip/spend/net ledger, phrased in the agent's persona+- Copilot replies can be spoken aloud; Cmd/Ctrl+Enter sends a question+- Hero dashboard: active rules count, live SOL balance, lifetime dollars moved, total fires+- Frozen-wallet banner when the kill switch is engaged, pointing to where to unfreeze+- Token buys and snipes routed through Jupiter with slippage control (default 5%, hard-capped at 50%)+- Snipe rules fire at most once per matched token launch, ever+- Freeze action flips the agent-wide spending kill switch and emails the owner+- Notify action writes an audit event and emails the owner without moving funds+- Event rules (tips, income, streams) fire instantly from real payment settlements; scheduled, balance-floor, and launch rules run on a 10-minute scheduler sweep+- Mainnet / devnet network awareness throughout+- Designed loading skeletons, error state with retry, helpful empty state, and reduced-motion support++### Guardrails & safety++Owner-only end to end: the server rejects any non-owner or logged-out caller on every read and write, so a visitor can never see, create, arm, or fire an intent. Every write is CSRF-protected and rate-limited. Nothing runs without an explicit Confirm & arm, and the server re-validates the full rule independently of the AI parse; the compiler itself is forbidden from inventing amounts, destinations, or tokens and must ask a clarifying question instead. Spending is triple-capped: the rule's own per-action / daily / lifetime USD caps are checked against the real custody ledger, then the agent-wide spend policy — the same hard ceiling every other outbound action obeys — is enforced at execution time, and a frozen wallet blocks all spends and even key recovery. Executions are idempotent (one fire per event, one snipe per launch, at most one low-balance freeze per day), keep a fee buffer so the wallet never empties itself, pause instead of guessing when the price feed is down, and detect reverted swaps so a failure is never reported as success. The signing key is decrypted only at the moment of signing with an audit-logged recovery; every execution writes an audited custody event with the transaction signature. Deletes require confirmation, the copilot chat is read-only by design, and the public-trait option exposes only a behavior label — never the rule, amounts, or caps.++### Screenshot-worthy (shot list)++- The compile moment: a typed sentence becomes a bounded rule card — trigger and action chips, dollar caps, and a live dry-run line like 'On a 0.2 SOL tip, this sends back 0.100 SOL to the tipper' — with a single Confirm & arm button and a speaker icon that reads the rule back in the agent's own voice.+- The rules list with real receipts: each armed rule shows its status pill, fire count, running dollars moved, and a 'receipt' link that opens the actual on-chain transaction in the explorer.+- Ask your wallet 'How am I doing?' and get an in-character answer built from the real balance and the last 30 days of tips, spend, and rule activity — a wallet that talks back but can never move money from a question.++### API surface++- `GET /api/agents/:id/intents`+- `POST /api/agents/:id/intents/compile`+- `POST /api/agents/:id/intents`+- `POST /api/agents/:id/intents/run`+- `POST /api/agents/:id/intents/copilot`+- `GET /api/agents/:id/intents/:intentId`+- `PUT /api/agents/:id/intents/:intentId`+- `DELETE /api/agents/:id/intents/:intentId`+- `POST /api/tts/speak`+- `GET /api/cron/wallet-intents (scheduler, secret-protected)`+++---++## 15 · Pay++> Your agent shops the open x402 economy: find any paid API, see its live price, and settle it in USDC from the agent's own Solana wallet — receipt on-chain in seconds.++### What it does++The Pay tab turns an agent's wallet into a checkout for the machine economy. Owners search a live marketplace of paid x402 services — data feeds, intel, APIs — or paste any endpoint URL, and instantly see what it costs in USDC before committing a cent. One click pays the service straight from the agent's own Solana wallet, with the payment lifecycle streaming live on screen and ending in an on-chain receipt plus the service's actual response. Every spend lands in a permanent, auditable payment history: what was paid, to whom, for what, and when.++### How it works++Search hits a server-side aggregator that pulls and merges live service catalogs from public x402 facilitators (PayAI and Coinbase's CDP), ranks them against the query, and returns only Solana-payable entries. Selecting a service triggers a preview call: the server probes the endpoint, reads its 402 payment challenge, verifies it asks for USDC on Solana, and returns the live price and recipient — without moving funds or touching keys. On confirm, the server decrypts the agent's custodial Solana keypair (an audit-logged event), atomically reserves the spend against the agent's policy caps, builds and signs a real USDC transfer on Solana mainnet, and presents it to the service as an x402 payment header; the service verifies and settles it on-chain. The whole lifecycle streams back to the browser as live events, and the finished payment — signature, USD value, destination, service name — is written to the agent's custody ledger, which also powers the tab's activity feed. Balances shown are genuine on-chain reads of the wallet's SOL and token accounts.++### Every feature++- Live bazaar search with 350ms debounce-as-you-type plus an explicit Search button, querying the merged x402 service catalog+- Results filtered to services actually payable in Solana USDC (entries without a Solana payment option are hidden)+- Service cards showing name, description, host domain, and live price label, each with a one-click Pay button+- Paste-an-endpoint mode: enter any arbitrary URL to pay an x402 service that isn't in the bazaar, with URL validation (full https/http URLs only)+- Pre-payment preview sheet fetching the live price and the agent's USDC balance in parallel: price in USDC, recipient address, HTTP method, current agent balance+- Editable JSON request-body editor for POST/PUT/PATCH services, pre-filled with the service's example payload+- Free-endpoint detection: if the endpoint answers without asking for payment, the tab says there's nothing to pay and stops+- Not-payable detection with a plain-language reason: lists which other networks the service accepts, or explains a missing Solana fee payer+- Insufficient-funds guard: compares price against balance, disables the Pay button, states exactly how short the wallet is, surfaces the deposit address with a copy button, and a 'Fund wallet →' shortcut that jumps to the Deposit tab+- Risk-acknowledgment dialog gating every payment (with a native-confirm fallback if the dialog module can't load)+- Live streamed payment timeline: Submitting → Price confirmed (with the exact USDC amount) → Payment signed by agent wallet → Settled on-chain (with the transaction signature), rendered as checkmark steps with a spinner on the active step+- Green receipt card after settlement: amount paid, recipient, and the transaction signature linked to the Solscan explorer+- The purchased service's actual response rendered inline in the receipt (truncated past 1,500 characters)+- 'Pay another' one-click return to the service list+- Payment activity feed: the agent's last 25 x402 payments from the custody ledger — service name, destination address, time-ago, status (pending highlighted), USD amount, and explorer-linked signature+- Instant post-payment refresh: balance and activity list update immediately so the spend is visible right away+- Devnet awareness: if the hub's network toggle is on devnet, a note warns that x402 settles on Solana mainnet from the agent's mainnet USDC+- Owner-only tab: hidden entirely from visitors viewing someone else's agent+- Designed error states with Retry buttons on search, preview, payment, and activity; skeleton loading states; reduced-motion support; keyboard focus rings and ARIA live regions+- Agent-wallet isolation: every payment is signed by the agent's own custodial Solana wallet, never a shared platform wallet — a request without an agent context is refused+- Per-agent spend policy enforced before signing: rolling 24-hour daily USD cap and per-transaction USD cap, reserved atomically so simultaneous payments can't overshoot the limit+- Wallet freeze kill switch: a frozen wallet rejects every autonomous payment instantly+- Scoped session-key capabilities: spending can be leashed to specific service hosts under least-privilege rules+- Natural-language spend policy rules and a behavioral anomaly guard that can auto-freeze the wallet on suspicious outflows+- USDC-only asset pinning: a service demanding payment in any other token is refused outright, blocking a wallet-drain attack+- Server-side URL hardening: public-https-only fetches, private-network addresses blocked, connections pinned against DNS tricks, redirects never followed+- Honest failure messaging: errors distinguish 'no funds were transferred' from 'settlement uncertain — check activity before retrying to avoid paying twice'+- Every payment lands in the agent's permanent custody ledger with the service name, URL, destination, USD value, and transaction signature — a full audit trail+- Per-IP and global rate limiting plus single-use CSRF protection on the money-moving path (price previews never burn a token)++### Guardrails & safety++Owner-only tab, gated end to end: the caller must be signed in and must own the agent, and the payment is signed exclusively by that agent's own custodial wallet — the shared platform wallet is never used, and a request without an agent context is rejected. A risk-acknowledgment dialog precedes every payment, and the money-moving call requires a single-use CSRF token. Before any signature, the per-agent spend policy is enforced atomically: rolling 24-hour daily USD cap, per-transaction USD cap, wallet freeze kill switch, scoped per-service capabilities, natural-language policy rules, and a behavioral anomaly detector that can auto-freeze the wallet — a breach moves no funds. The asset is pinned to USDC (any service demanding a different token is refused, closing a wallet-drain vector), target URLs are hardened against internal-network access, and if the wallet can't cover the price the Pay button is disabled and the owner is routed to funding instead. Failures state honestly whether funds moved, pre-settlement rejections release their spend reservation, uncertain outcomes conservatively count as spent, and every payment is written to a permanent, owner-auditable custody ledger.++### Screenshot-worthy (shot list)++- The live payment timeline: press Pay and watch four steps light up in real time — price confirmed, payment signed by the agent's wallet, settled on-chain with the transaction signature — ending in a green receipt with a Solscan link and the service's actual response.+- The bazaar search: type 'weather' or 'intel' and real paid APIs from across the open x402 economy appear with live USDC prices, each one payable in a single click from the agent's own wallet.+- The funding-aware guard: when the agent is short, the tab shows exactly how much it holds versus the price, hands you the deposit address with one-tap copy, and routes you straight to funding instead of letting a doomed payment fire.++### API surface++- `GET /api/bazaar/search (aggregated x402 service catalog from public facilitators — PayAI + Coinbase CDP — filtered to Solana-payable)`+- `POST /api/x402-pay with preview:true (live price probe — no funds move, no key signs)`+- `POST /api/x402-pay streamed as Server-Sent Events (the real payment: challenge → built → settled → result)`+- `GET /api/agents/:id/solana/holdings (live on-chain SOL + SPL token balances, USDC flagged)`+- `GET /api/agents/:id/solana/custody?category=x402 (owner-only payment history from the custody ledger)`+++---++## 16 · Vanity++> Give your agent a wallet address that spells its name — ground on your own CPU at millions of attempts, then applied with a funds-safe swap that sweeps every asset over first.++### What it does++Every agent on three.ws carries its own Solana wallet, and the Vanity tab lets the agent's owner trade that wallet's random address for a custom one that starts or ends with text they choose — the agent's name, a brand, a lucky word. The search runs right in the browser: pick how many CPU cores to spend, watch a live counter tear through hundreds of thousands of addresses per second, and pause, resume, or cancel at any time. The moment a match is found it is applied automatically, and if the old wallet holds any SOL or tokens, everything is moved to the new address before the switch — funds can never be left behind. When it's done, the new address appears with its custom pattern highlighted, complete with the attempt count, the time it took, and a link to see it live on-chain.++### How it works++The grind runs client-side: a pool of Web Workers (one per selected CPU core) drives a Rust-compiled WASM keypair generator that races to find an Ed25519 keypair whose Base58 address matches the requested prefix and/or suffix — first match wins, the hot loop runs in ~200ms batches so pause/cancel respond instantly, and pausing genuinely frees the cores while preserving the attempt count. The winning 64-byte key is POSTed to the agent-wallet API with a single-use CSRF token; the server re-derives the address from the key and independently verifies it matches the requested pattern, never trusting the client's claim. If the current custodial wallet is funded, the server recovers the old key through the audited custody layer and sweeps every asset — all SPL tokens across both the classic Token program and Token-2022, transferring and closing each token account to reclaim rent, plus all remaining SOL — to the new address in confirmed versioned transactions, and only then encrypts and stores the new key, so a failed sweep aborts the whole swap with the wallet unchanged. A bounded server-side grind (up to 3 combined characters, 4M iterations, 30-second budget) remains as a fallback path for short patterns supplied without a key.++### Every feature++- Owner-only tab in the Agent Wallet hub (hidden from non-owner viewers; server independently enforces ownership with 403)+- Current-address card with the vanity prefix/suffix highlighted in purple and a 'vanity' badge when the wallet already has a custom pattern+- 'Starts with' prefix field and 'Ends with' suffix field — combine both in one address+- Up to 6 characters per pattern (Base58), with live input scrubbing that strips invalid characters as you type+- Smart placeholder suggestion derived from the agent's own name+- Case-insensitive matching toggle — matches any capitalization and cuts the search time+- CPU core slider from 1 up to every core the machine has, with a live 'N / max' readout+- Quick core presets: 1 core, a balanced default (about half the machine), and Max+- Live difficulty estimate: expected attempt count plus a time estimate for the chosen core count, recomputed on every keystroke+- 'This one is hard' amber warning when the pattern crosses ~500 million expected attempts+- Explicit warning banner before replacing an existing wallet, spelling out that funds are auto-swept first+- One-click 'Grind & apply vanity address' button that runs the whole flow end to end+- Live grind screen: big attempts-per-second rate (k/M formatted), running attempt counter, and a live ETA computed from the workers' real measured speed+- Pause/Resume that genuinely frees the CPU cores mid-grind and picks up the attempt count where it left off, with a 'paused' pill indicator+- Cancel button that aborts the grind and returns to the form+- Automatic apply on match: the found keypair is submitted immediately with a single-use CSRF token — no extra step+- 'Match found — migrating funds & applying…' state while the server sweeps and swaps+- Automatic full-wallet migration: all SOL plus every SPL token (both token programs), with token-account rent reclaimed, moved to the new address before the key swap+- Retry-without-regrinding recovery: if the apply step fails, the found key stays in memory so the owner can retry the assign or discard it — the old wallet stays intact and funded+- Success card showing the new address with the matched pattern highlighted, a migrated-funds summary (SOL amount + token count), and found-in-N-attempts / duration stats+- One-click block-explorer link, network-aware (Solscan on mainnet, Solana Explorer on devnet)+- 'Change again' button to grind a fresh pattern immediately+- Provisioning path: an agent with no wallet yet gets one created by grinding — the vanity address becomes its first address+- Server-side fallback grind for short patterns (up to 3 combined characters) when no browser-ground key is supplied+- Old addresses preserved in the agent's wallet history (last 10 swaps) with timestamps and sweep status+- Base58 validation with human-readable hints for the four confusable characters (0, O, I, l) that Solana addresses never contain+- Skeleton loading state, designed error state, worker cleanup on tab close mid-grind, reduced-motion support, aria-live progress announcements, and a mobile layout++### Guardrails & safety++Owner-only end to end: the tab is hidden from non-owner viewers and the server rejects anyone but the agent's owner (sign-in required, 403 otherwise). The state-changing apply call requires a single-use CSRF token and is rate-limited under the same per-user cap as withdrawals plus a per-IP burst limit. The server never trusts the browser: it re-derives the address from the submitted key and proves it matches the requested pattern before adopting it. The money-safe gate is sweep-then-swap — if the old wallet is funded, every asset must move to the new address in confirmed on-chain transactions before the stored key changes; a failed sweep aborts everything and the old wallet stays untouched and funded. Key recovery for the sweep goes through the audited custody layer, and every swap is recorded as a custody event, an activity event, and an audit-log entry, with the replaced address kept in the wallet's history. Patterns are capped at 6 Base58 characters each, inputs are scrubbed to valid characters only, the server-side fallback grind is bounded (3 combined characters, 4M iterations, 30-second budget) so it can never hang, and the UI shows an explicit warning before replacing a funded address.++### Screenshot-worthy (shot list)++- The live grind readout: a huge monospace attempts-per-second counter with a running attempt total and ETA, churning across every core you gave it — with real Pause/Resume that visibly frees your CPU+- The success card: the new address with your chosen pattern glowing in purple, 'Migrated 0.42 SOL + 3 tokens from the old address', and 'Found in 1,234,567 attempts · 12.3s' above a one-click explorer link+- The difficulty estimator reacting as you type: attempt counts and time estimates update live per character and per core, flipping to an amber 'this one is hard' warning on ambitious patterns++### API surface++- `GET /api/agents/:id/solana/vanity — owner-only status: current address, vanity prefix/suffix, wallet source, is_vanity flag, server grind cap`+- `POST /api/agents/:id/solana/vanity — owner-only assign: accepts a browser-ground 64-byte secret key (verified server-side) or grinds short patterns server-side, sweeps all funds old→new, swaps the stored encrypted key, returns address/iterations/duration/swept summary`+++---++## 17 · Policy++> Write your agent's spending rules in plain English — AI translates them, deterministic code enforces them on every single spend.++### What it does++The Policy tab lets a wallet owner govern their AI agent's money the way they'd explain it to a person: type "Block any payment over $25, never let the wallet drop below 1 SOL, and freeze everything if a trade drops more than 30%" and hit Compile. The platform turns that sentence into numbered, enforceable rules and reads them back in plain English so you confirm exactly what will be enforced. Before you save, it backtests the rules against your agent's real spending history — "against your last 47 spends, this would have blocked 3 ($61)" — or, with no history yet, shows how hypothetical cases like "a $250 payment" or "buying a 30-minute-old token" would be decided. Once saved, the rules run on every trade, snipe, service payment, and withdrawal the agent makes; the AI only translates and explains — it never approves a payment.++### How it works++The tab talks to an owner-gated policy endpoint on the agent's custodial Solana wallet. On compile, the server sends the English through the platform's free-first LLM chain (Groq/OpenRouter/NVIDIA free tiers, Claude/OpenAI as last resort) with a strict JSON-only prompt, then hard-validates the output against a bounded rule DSL — anything unenforceable is dropped, and a real deterministic phrase parser takes over if no model is available, so compiling always works. Rules are an ordered first-match firewall (allow / block / ask-me / freeze) over twelve live signals like amount, rolling daily total, token age, SOL reserve after the spend, trade P&L, time of day, and whether the recipient has been paid before. The backtest replays up to 60 days of real custody spend events through the exact evaluator that runs in production, including faithful rolling 24-hour totals. Saving writes the policy to the agent record with a full audit diff; at runtime the shared spend guards evaluate it on every outbound path, log every block with the human-readable rule that fired, and a freeze rule automatically trips the wallet's kill-switch.++### Every feature++- Plain-English policy composer: free-text rules compiled into a deterministic rule document+- Three one-click starter presets: Conservative, Active trader, and Pay-only+- Compile & preview button with real async state; Cmd/Ctrl+Enter keyboard shortcut to compile+- Numbered plain-English readback generated from the compiled rules themselves, so it can never drift from what code enforces+- Per-rule action tags: Block, Freeze, Allow, and Ask me (require step-up approval)+- Assumptions callout listing anything the AI defaulted, inferred, or couldn't capture+- Backtest against real spend history (last 60 days, up to 1,000 spends) run by the exact production evaluator+- Backtest summary chips: allowed vs blocked counts with USD totals for each+- Green/red proportion bar visualizing the allow/block split+- Per-spend timeline: one square per historical spend (up to 120, newest first) with hover tooltips showing type, amount, date, and the rule that would have blocked it+- Per-rule attribution list showing which rule blocked how many spends and how much USD+- Synthetic 'How it behaves' probes when there's no history yet: up to 8 hypothetical cases derived from the policy's own thresholds (e.g. 'A $250 payment → Blocked', 'Buying a 30-minute-old token → Blocked')+- Explicit Save / Discard flow — nothing is enforced until the owner reviews and saves+- Loosening guard: a confirmation dialog before saving a policy that removes protections the wallet has now+- 'Remove all rules' action with confirmation; numeric caps and the freeze switch stay in place+- Active-policy card showing the live rule count, the numbered rules, and cap chips (daily cap, per-tx cap, frozen/active status)+- Cross-link to Withdraw → Limits & Safety for the always-enforced numeric caps+- Network-aware: policy, history, and backtest load per network (mainnet/devnet) and refresh on network switch+- Draft box pre-filled with the saved policy's original English for easy editing+- Four rule actions: allow (whitelist carve-out), block, require step-up (ask the owner), freeze (block + trip the wallet kill-switch)+- Twelve condition signals: spend amount (USD), today's spend so far, today's running total, token age in hours, SOL left after the spend, trade profit/loss %, hour of day (UTC), asset, recipient address, spend type (trade/snipe/x402 payment/withdraw), allowlist membership, and recipient-seen-before+- Ordered first-match firewall semantics with AND-combined clauses per rule; no match means allowed (numeric caps still apply)+- Deterministic fallback parser compiles common phrasings even with no AI model configured (marked 'parsed locally' in the preview)+- Freeze rules automatically trip the wallet's kill-switch when they fire live, pausing all autonomous spending+- Every live block is recorded to the wallet's custody feed with the exact human-readable rule that stopped it+- Every policy change is audited with a before/after diff written to the custody log+- Signed-out state with a sign-in link that returns to the tab; skeleton loading, retry-able errors, refusal vs error styling, and toasts+- Accessible throughout: ARIA roles and labels, focus rings, reduced-motion support++### Guardrails & safety++Owner-only end to end: the tab is hidden from non-owner viewers and the server independently verifies session auth plus agent ownership (401/403 otherwise), with rate limiting on every call. Saving or clearing rules requires a CSRF token. The AI never decides a spend — its output is hard-validated and only the normalized, enforceable rules are ever stored or run; if nothing survives validation the save is refused rather than silently storing an empty policy. Policies are bounded (max 40 rules, 8 conditions each) and a rule with no valid conditions is dropped so a typo can never brick all spending. Policy rules layer on top of the always-enforced numeric caps, withdraw allowlist, and freeze switch — they can tighten but never weaken them. Saving a policy that removes existing protections requires an explicit confirmation, as does removing all rules. At runtime, if the safety check itself can't complete, autonomous spends fail safe to blocked while the owner's own withdrawals are never trapped; every block and every auto-freeze is written to the audit trail.++### Screenshot-worthy (shot list)++- The backtest timeline: a row of green and red squares — one per real past spend — scored by the exact evaluator that will run live, with headline chips like '47 allowed · $312' vs '3 blocked · $61'+- One sentence in, a numbered firewall out: 'stop everything if a trade drops more than 30%' becomes rule #4 with a Freeze tag that literally trips the wallet's kill-switch on-chain activity+- The readback + assumptions card: the platform explains every rule back in plain English and openly lists what it assumed, so the owner confirms intent before anything is enforced++### API surface++- `GET /api/agents/:id/solana/policy?network= — current compiled policy, plain-English readback, source text, numeric limits`+- `POST /api/agents/:id/solana/policy {op:'compile', text} — LLM/heuristic compile + backtest + synthetic probes`+- `POST /api/agents/:id/solana/policy {op:'backtest', rules} — replay a rule set against real custody history`+- `PUT /api/agents/:id/solana/policy {rules, english} — save the validated policy (CSRF-gated, audited)`+++---++## 18 · Withdraw++> Sweep any asset out of your agent's wallet in three taps — server-signed, policy-guarded, and audited down to every single key touch.++### What it does++The Withdraw tab is the owner's exit door and control room for an agent's custodial Solana wallet. You pick any asset the wallet actually holds — SOL, USDC, or any token — enter a wallet address or a .sol name (or scan a QR code), review a confirmation screen, and the funds move on-chain. Alongside withdrawals, the same tab lets you set hard spending ceilings, restrict where funds may ever be swept, and freeze the wallet with one tap, instantly pausing all of the agent's autonomous trading and payments while keeping your own withdrawals open. A third panel shows the complete custody audit trail: every withdrawal, automated spend, limit change, key access, and every payment your safety rules blocked.++### How it works++The agent's private key lives encrypted on the server and never touches the browser — a withdrawal is a server-signed request, and each time the key is decrypted, that access is itself recorded as a custody event. Before signing, the server runs the withdrawal through the shared spend policy: the freeze switch, the withdraw allowlist, the owner's plain-English safety rules (compiled by an LLM into deterministic rules, then enforced by code), per-transaction and rolling 24-hour USD ceilings, and a behavioral anomaly guard. Each request carries a unique idempotency key claimed as a row in the custody ledger, so a retry replays the original result instead of double-sending, and an ambiguous network timeout leaves the withdrawal marked pending with an explorer link rather than risking a duplicate. On a SOL "Max" the server reserves rent plus fee headroom so a full sweep can never brick the wallet, and token withdrawals automatically open the recipient's token account when needed. The asset picker, spend totals, and activity feed all read live on-chain and ledger data — nothing is cached guesswork.++### Every feature++- Three sub-sections in one tab: Withdraw, Limits & Safety, and Activity, switchable via a pill button strip+- Owner-only tab — visitors never see it+- Asset picker populated from live on-chain holdings: SOL plus every SPL token with a non-zero balance (both classic and Token-2022 programs), sorted largest first, USDC labeled by name+- Available-balance readout under the amount field that updates when you switch assets+- Destination accepts a raw Solana address or a .sol name, resolved live (debounced) with an inline green check for valid addresses and a resolved-address preview for names+- QR-code scanner (camera overlay) that fills the destination field, understands solana: payment URIs, and supports Escape / click-away / Cancel to dismiss; the button hides itself on unsupported browsers+- Max button that sweeps the full balance — on SOL the server holds back rent plus network-fee headroom so the wallet can never be bricked by its own sweep+- Client-side validation: positive amounts only, amount cannot exceed the available balance, destination must resolve+- Two-step flow: a review/confirm screen summarizing asset, amount, destination, and network before anything is submitted+- Live allowlist badge on the confirm screen: '✓ allowlisted' or '⚠ not on allowlist — this will be rejected' before you even press Confirm+- Irreversibility warning on every confirmation: crypto transfers are final+- Risk-acknowledgment gate before any mainnet withdrawal (with a graceful fallback prompt if the dialog module fails to load); devnet skips it+- Single-use CSRF token on every state-changing request — the server burns each token on use+- Idempotency key generated per withdrawal so retries replay the original result instead of double-sending; an in-flight duplicate returns 'withdrawal in progress'+- Success screen distinguishing 'Withdrawal confirmed' (✓) from 'Withdrawal submitted' (⏳, submitted but not yet confirmed) with matching guidance+- View-on-explorer link for every completed or pending withdrawal, plus a 'Withdraw more' reset button+- Empty state pointing you to the Deposit tab when the wallet holds nothing withdrawable on the selected network+- Skeleton loading states, designed error states with a reason line, and Retry buttons on every data load+- Devnet/mainnet network switch awareness — changing networks resets the form and reloads holdings and limits+- Limits & Safety: one-tap Freeze wallet button that immediately pauses all autonomous spending (trades, snipes, x402 payments) while keeping withdrawals open; unfreezing asks for confirmation since it re-arms spending+- Frozen/active status card with clear copy explaining exactly what a freeze does+- Spent-today chip showing rolling 24-hour USD outflow, with an alert style when the daily cap is reached+- Daily USD spend cap and per-transaction USD cap editors — leave blank for no limit; the ceilings govern every outbound path: trades, snipes, x402 payments, and withdrawals+- Withdraw allowlist editor: add addresses or .sol names (resolved before adding), remove entries with one click, deduplicated, capped at 50 entries; empty list means any valid address+- Server-side allowlist validation on save — an invalid address is rejected with a clear message instead of silently dropped+- Activity: the custody audit trail — withdrawals, trades, snipes, x402 payments, limit changes, and key-recovery events, each with icon, timestamp, amount (SOL or USD), shortened destination, status, and an explorer link+- Policy-block rows in the activity feed that quote the exact plain-English rule that stopped a payment: 'Blocked by your rule', 'Frozen by your rule', 'Needs your approval', 'Auto-frozen by policy', 'Spend policy updated'+- Cursor-based pagination in the activity feed with a 'Load older' button (25 events per page)+- Toast notifications for confirmed withdrawals, saved limits, and freeze/unfreeze+- Server-side destination checks: valid base58, on-curve only (program addresses where funds could be lost forever are rejected), and never the agent wallet itself+- Automatic recipient token-account creation on SPL withdrawals, with an upfront check that the wallet holds enough SOL for the fee and rent+- USD pricing for the spend ceiling: SOL priced live, USDC priced 1:1; unpriced tokens are governed by the allowlist instead+- Reduced-motion support: spinners and skeletons stop animating when the user prefers reduced motion+- Full keyboard and screen-reader support: focus rings, aria-pressed sub-tabs, live-region status for address resolution, labeled remove buttons++### Guardrails & safety++Owner-only end to end: every endpoint verifies the signed-in user owns the agent. Withdrawals are capped at 5 per day per user with an additional per-IP burst guard. Every state-changing request requires a single-use CSRF token, and mainnet withdrawals require an explicit risk acknowledgment. The server enforces the shared spend policy before signing: withdraw allowlist (if set, funds can only go to approved addresses), per-transaction and rolling 24-hour USD ceilings, the owner's plain-English safety rules enforced deterministically, and a behavioral anomaly guard that can auto-freeze the wallet. The freeze switch halts all autonomous spending but deliberately never blocks the owner's withdrawals — a freeze can never trap funds. Destinations must be valid, on-curve addresses and cannot be the wallet itself. SOL sweeps always reserve rent plus fees so the account survives. Idempotency keys make retries safe against double-sends, ambiguous confirmations return a pending state with an explorer link instead of guessing, and every withdrawal, key decryption, limit change, and policy block lands in an owner-visible audit ledger.++### Screenshot-worthy (shot list)++- The confirm screen warns you before the server does: if a destination isn't on your allowlist, a live '⚠ not on allowlist — this will be rejected' badge appears right next to the address+- The one-tap Freeze wallet panel — a kill switch that instantly pauses all of the agent's autonomous trading and payments while your own exit stays open+- The Activity feed showing a payment stopped cold with 'Blocked by your rule' and the exact plain-English rule you wrote, quoted inline++### API surface++- `POST /api/agents/:id/solana/withdraw`+- `GET /api/agents/:id/solana/holdings`+- `GET /api/agents/:id/solana/limits`+- `PUT /api/agents/:id/solana/limits`+- `GET /api/agents/:id/solana/custody`+- `GET /api/sns?name=<name>.sol`+++---++## 19 · Give++> Turn your agent's wallet into a giving wallet — round up the spare change or donate any amount to any Solana cause, settled on-chain with a receipt you can verify.++### What it does++The Give tab turns an agent's wallet into a charity wallet. Pick a cause — any Solana wallet or a human-readable .sol name — and it's saved so giving is one tap from then on. Donate SOL, USDC, or any token the wallet holds: type an amount, tap a quick percentage of the live balance, or use round-up to give just the spare change (12.37 becomes a 0.37 donation and a clean 12.00 kept). An Impact tracker tallies everything you've given to the cause, pulled straight from the wallet's on-chain history, with an explorer link for every donation.++### How it works++The browser never holds a key. A donation is a server-signed transfer from the agent's self-custodied Solana wallet: the server authenticates the owner, validates the destination, enforces the agent's spend policy and daily caps, decrypts the custodial key (with an audit log entry), signs a versioned Solana transaction, submits it with retries, and polls for on-chain confirmation — returning a pending state instead of risking a double-send if confirmation is ambiguous. Balances in the asset picker come from live Solana RPC reads of the wallet's SOL and token accounts, with automatic failover to a public RPC. The Impact tally is computed by filtering the wallet's custody ledger for confirmed transfers whose destination matches the cause address and summing their USD value. Cause names ending in .sol are resolved through the Solana Name Service.++### Every feature++- Cause picker: set any Solana wallet address or any .sol name as the giving destination+- Optional cause name label (up to 60 characters, e.g. "Ocean Cleanup") shown across the tab+- Live .sol name resolution as you type (debounced), with instant visual feedback: green check for a valid address, resolved address preview for a .sol name, warning for anything unresolvable+- Cause is remembered per agent, so giving is one tap next time; Change and Cancel controls to edit or keep the current cause+- Give now form with an asset dropdown built from live on-chain holdings — SOL plus every token the wallet actually holds (USDC named, other tokens shown by short mint), each with its available balance+- Quick-amount percentage chips: 1%, 5%, 10%, 25%, and Max (100%) of the live balance+- Free-form amount field with decimal keyboard on mobile and a live "Available" readout that updates when you switch assets+- Client-side validation before review: amount must be positive and within the available balance, with clear inline error messages+- Two-step review-and-confirm flow: a summary card showing cause name, full destination address, exact amount, and network, plus an explicit "crypto transfers are final" warning before anything moves+- Round-up / spare change mode: one tap per asset donates only the fractional remainder (e.g. 12.37 USDC → give 0.37, keep 12.00), with the rounding math spelled out on each row+- Impact tracker: total USD given and donation count to the current cause, computed from the wallet's real on-chain custody trail — never self-reported+- Recent donations list (up to 5) with dates and "view transaction" explorer links+- Success screen with a thank-you, the exact amount given, a "View on explorer" button, and a "Give again" reset+- Distinct "Donation submitted" pending state when the network hasn't confirmed yet, telling you to verify on the explorer before retrying — prevents accidental double-gives+- Mainnet / devnet network awareness: switching networks resets the form and reloads balances and impact for that network+- Per-donation idempotency key, so a retried or repeated request can never send the same donation twice+- Risk acknowledgment gate before any mainnet donation (skipped on devnet)+- Cross-site request forgery protection on every donation submission+- Owner-only tab — visitors browsing someone else's agent never see it+- Designed loading skeletons while balances and impact load, error states with Retry buttons, and helpful empty states (no funds points you to the Deposit tab; whole-number balances explain how spare change accrues)+- Accessibility built in: live-region status announcements, alert roles on errors, keyboard focus rings, and reduced-motion support++### Guardrails & safety++Owner-only end to end: the tab is hidden from visitors, and the server independently verifies the signed-in user owns the agent before any read or transfer. Every donation passes a review-and-confirm step with an explicit finality warning, plus a risk-acknowledgment dialog on mainnet. Server-side, donations ride the hardened withdraw rail: CSRF-protected, capped at 5 withdrawals per user per day plus a per-IP burst guard, and governed by the agent's shared spend policy — per-transaction USD ceiling, rolling 24-hour daily USD cap, an optional destination allowlist, owner-authored natural-language policy rules, and a behavioral anomaly guard. Destinations are validated as real on-curve Solana addresses (program addresses and self-sends rejected). A SOL "max" donation always reserves rent and fee headroom so the wallet can never be bricked. Idempotency keys make retries safe: a confirmed donation replays its original receipt, an in-flight one returns "in progress," and an ambiguous confirmation is held as pending (never silently failed) so nothing double-sends. Every key recovery and transfer is recorded in an audited custody ledger.++### Screenshot-worthy (shot list)++- Round up spare change: one tap turns 12.37 USDC into a $0.37 real on-chain donation while keeping the clean $12.00 — micro-philanthropy straight from an agent's wallet+- The Impact card tallies total giving straight from the blockchain custody trail — every donation counted with a live explorer link, zero self-reported numbers+- Type a human-readable .sol name like oceancleanup.sol and watch it resolve live to the cause's wallet address before you save++### API surface++- `GET /api/sns?name= — resolves .sol names to wallet addresses via Solana Name Service (Bonfida), cached 5 min, IP rate-limited`+- `GET /api/agents/:id/solana/holdings?network= — live on-chain balances: SOL plus every SPL token held (Token + Token-2022 programs), USDC flagged, sorted by size`+- `GET /api/agents/:id/solana/custody?network=&limit=100 — owner-only custody audit trail (agent_custody_events ledger) used to compute the Impact tally`+- `POST /api/agents/:id/solana/withdraw — server-signed, idempotent, spend-policy-governed on-chain transfer; the donation is this withdraw with the cause wallet as destination`+++---++## 20 · Proof of Custody++> Don't trust — verify: your agent wallet's custody, cryptographically proven in your own browser against the Solana blockchain itself.++### What it does++Proof of Custody turns "trust us with your agent's wallet" into "check it yourself." Every few hours the platform takes a snapshot of every custodial wallet it holds and commits a single cryptographic fingerprint of all of them to the Solana blockchain. This tab shows the owner their wallet's personal slice of that commitment — balance, epoch, position in the tree — and then verifies it live, right in the browser, by reading the blockchain directly. The platform is never trusted for the answer: if anything doesn't reconcile, the tab turns red and says exactly which step failed. It also audits movement: every drop in balance since the last snapshot must map to an authorized, logged wallet event, and any outflow the ledger can't explain is loudly flagged.++### How it works++A scheduled job runs every six hours: it reads each custodial wallet's live on-chain balance, combines it with the wallet address, a commitment to the wallet's activity-ledger head, and the epoch number into a hashed "leaf," builds a Merkle tree over all wallets, stores the tree, and anchors the root on Solana as a signed memo transaction. When the owner opens the tab, it fetches their private inclusion proof from an ownership-gated endpoint, then a verifier running entirely in the browser recomputes the leaf hash from the public facts, folds the Merkle path up to a root, fetches the anchor transaction straight from public Solana RPC nodes (deliberately not the platform's own infrastructure), and confirms the computed root matches the one committed on-chain. Server and browser share the exact same hashing module, so the prover and the verifier can never drift apart. Alongside the proof, the server reconciles the balance change since the previous epoch against the wallet's authorized withdraw/spend events, with a small allowance for network fees, and reports "reconciled" or "unexplained."++### Every feature++- Owner-only tab in the Agent Wallet hub — hidden entirely from non-owner viewers+- Verification auto-runs on load; no button press needed+- Four-step verification checklist, each step with a pass/fail icon and plain-English explanation: recompute leaf from public data, walk the Merkle path to the root, read the anchor straight from the chain, match computed root to on-chain root+- Live status seal with four visual states: amber spinner while verifying, green check for verified, amber clock for awaiting on-chain anchor, red X for failed+- Fact grid: epoch number, attested SOL balance, total wallets in the tree, snapshot timestamp, wallet address, ledger head, Merkle root, and on-chain anchor+- Direct block-explorer link to the anchor transaction+- In-browser verifier reads the chain via public Solana RPC endpoints with automatic failover across multiple providers; the platform's own RPC proxy is used only as a last resort+- Anchor memo is validated as a genuine custody attestation and its epoch is checked against the proof's epoch — a mismatched epoch fails verification+- Honest-failure semantics: an unreachable anchor is reported as UNVERIFIED, never quietly passed+- Movement reconciliation panel comparing the balance to the previous epoch: baseline (first epoch), reconciled, or unexplained+- Per-event breakdown of authorized outflows (withdraws and spends) with SOL amounts, categories, reasons, and explorer links+- Loud red '⚠ Unexplained movement' alert when an outflow can't be matched to a logged, authorized event+- Deposits recognized as external and benign — balance increases never require authorization+- Fee tolerance built into reconciliation so ordinary network fees never trigger false alarms+- 'Show it off' card appears only after successful verification: a verified-custody badge, a copy-link button for the public integrity page, a copy-embed button for a paste-anywhere HTML badge, and a link to the standalone verifier page+- Shared badge deliberately links to the public integrity page — anyone can re-verify the platform root there, while per-wallet proofs stay private to the owner+- Standalone /proof page runs the identical verification experience outside the hub+- Public /integrity page and open API expose the latest epoch, root, anchor, wallet count, and aggregate SOL — no login needed+- 'Not attested yet' state for brand-new wallets, showing the latest epoch and a check-again button — new wallets are picked up at the next snapshot+- Signed-out state with a sign-in link that returns the owner to the exact page+- Error state with a focused retry button and a plain explanation+- Skeleton loading placeholders while the proof is fetched+- Attestation epochs run automatically every six hours as a scheduled job that snapshots, builds the tree, and anchors the root on-chain+- Epochs are a monotonic, append-only log so any rollback or replay is detectable+- Leaf hashing uses domain-separated prefixes (the Certificate Transparency convention) so an internal tree node can never masquerade as a wallet leaf+- Server and browser import the same hashing/Merkle module, pinned by golden tests, so proof and verification can never diverge+- Wallets whose balance can't be read this round are skipped, never attested with a guessed balance — they're included again next epoch+- Epoch and leaves are persisted atomically so a proof read can never see a half-written tree+- Anchoring is best-effort: an unfunded or missing attester key records the epoch as pending/failed honestly instead of blocking, and it can be re-anchored later+- Reduced-motion and ARIA support throughout the loading and status states++### Guardrails & safety++The tab is owner-only and the proof endpoint verifies wallet ownership on every request, returning a sign-in prompt to anyone else; reads are rate-limited. The verification itself is the guardrail: the browser never trusts the server's word — a failed or unreachable on-chain read is always reported as unverified, an epoch mismatch fails the check, and a root mismatch shows an unmissable red "DO NOT TRUST" failure. The shareable badge intentionally links only to the public aggregate integrity page, never to the private per-wallet proof. On the attestation side: wallets whose balance can't be read are skipped rather than attested with a guessed value, epochs are append-only so tampering is detectable, hashing is domain-separated against forgery, the epoch and its leaves persist atomically, and the cron endpoint requires a secret compared in constant time.++### Screenshot-worthy (shot list)++- The seal flip: an amber spinner reading 'Verifying custody on-chain…' resolves into a green check — 'Custody verified on-chain · epoch N' — above four green-ticked steps, each one executed by the viewer's own browser against public Solana nodes, not by the platform.+- The movement reconciliation panel: every lamport that left the wallet since the last snapshot itemized against authorized, explorer-linked events — and a red '⚠ Unexplained movement' alarm wired to fire if even one outflow can't be accounted for.+- The 'Show it off' card: a green verified-custody badge with one-click copy-paste embed HTML that links anyone to the public integrity page, where they can re-verify the platform's on-chain root in their own browser.++### API surface++- `GET /api/agents/:id/solana/proof — owner-gated inclusion proof (leaf, Merkle path, anchor reference, movement reconciliation)`+- `Public Solana RPC getTransaction — api.mainnet-beta.solana.com, solana-rpc.publicnode.com, api.devnet.solana.com (browser reads the anchor directly)`+- `POST /api/solana-rpc?network=… — platform RPC proxy, last-resort failover only`+- `GET /api/custody/integrity — public no-auth aggregate for the /integrity page`+- `GET /api/custody/anchor?epoch=N|latest — public anchor reference for one epoch`+- `GET/POST /api/cron/custody-attest — scheduled snapshot + on-chain anchor job (bearer-secret protected)`+++---++## 21 · Access++> Put every bot on a leash: mint tight, revocable spending keys so no strategy ever touches more of your agent's wallet than you allow.++### What it does++The Access tab is where a wallet owner hands out least-privilege spending keys instead of full wallet authority. Each key says exactly what its holder may do — which actions (trade, snipe, or pay services), how much per use, how much in total, on which specific tokens, services, or destinations, and for how long — and nothing else. Every key shows a live budget meter and expiry countdown, and can be killed instantly, alone or all at once. Flip on strict mode and the wallet denies any autonomous spend that doesn't present a covering key.++### How it works++Every key is a server-enforced policy grant stored in the platform database — the wallet's private key is never delegated. Each grant is signed with an HMAC over its immutable scope and re-verified on every single use, so a tampered or forged grant fails its integrity check and is rejected. Spending against a key is metered through the same custody ledger that backs the wallet's daily limit, and each check-and-reserve happens as one atomic database statement under advisory locks, so concurrent spends can never race past a budget and a revoke takes effect on the very next spend. The gate is composed into the shared spend guards that every autonomous path — trading, sniping, and x402 service payments — must pass, and a key can only ever narrow what the wallet-wide policy already allows.++### Every feature++- Mint form: create a scoped key with a custom label describing who holds it+- Allowed-actions picker with three checkboxes: Trade, Snipe, Pay services (x402)+- Max-per-use USD spend ceiling (optional)+- Total lifetime USD budget ceiling (optional)+- Expiry presets: 1 hour, 6 hours, 24 hours (default), 7 days, 30 days — server accepts any TTL from 60 seconds up to 1 year+- Target restriction modes: Any target, Specific mints, Specific services, Specific destinations+- Multi-line target allowlist input (one per line, up to 50 targets); service entries are normalized to bare hostnames so a pasted full URL still matches+- Validation that a key must actually narrow something: at least one action, and either a spend ceiling or a target restriction+- Least-privilege mode toggle: require a covering key for every autonomous spend, deny anything without one (owner actions and withdrawals unaffected)+- Suggested keys: the server detects armed sniper strategies with no scoped key and drafts one sized to that strategy's own daily budget — accepted in one tap+- Live key list with status badges: active, revoked, expired, tampered+- Plain-English capability sentence on each key, e.g. "Can snipe up to $40 total on 3 allowed mints, and nothing else"+- Live budget progress bar per key that shifts from green/amber to amber/red at 90% consumed+- Spent-of-budget readout ($X of $Y used) plus live expiry countdown (days/hours/minutes/seconds left)+- Per-key Revoke button with confirmation — revocation is immediate, permanent, and idempotent+- Revoke-all kill switch that terminates every live key at once, with confirmation and a revoked count+- Auto-refresh every 20 seconds while the tab is visible, keeping spend meters and countdowns live+- Auto-resolution on the spend path: autonomous callers automatically find the best covering key (tightest, soonest-expiring first) without threading key IDs around+- Full audit trail: every mint, revoke, and spend is recorded as a custody event+- Designed states throughout: skeleton loading shimmer, retryable error state, and a guided empty state explaining what a first key does+- Accessibility built in: progressbar semantics, ARIA-labeled controls, live error announcements, reduced-motion support++### Guardrails & safety++Owner-only surface end to end: the tab is hidden from non-owners and the API verifies both authentication and agent ownership on every call (401/403 otherwise). Every mutation is CSRF-protected and rate-limited. Keys strictly subtract authority — both the key ceiling and the wallet-wide policy must pass, so a key can never spend more than the wallet allows. Every grant is HMAC-signed over its immutable scope and re-verified in constant time on every use; a database-level tamper produces a rejected \"tampered\" grant, and the server refuses to mint at all if the signing secret is missing or weak. Expiry is mandatory (60 seconds minimum, 1 year maximum, 24-hour default); withdrawals are deliberately not delegable. Budget checks and reservations are atomic under per-key and per-agent locks so concurrent spends cannot overshoot a ceiling, and a revoke can never be raced. Revoke and revoke-all require explicit confirmation dialogs. Every failure fails safe toward denial, and denial messages tell the holder exactly which limit blocked the spend.++### Screenshot-worthy (shot list)++- A key card that reads like a contract: "Can snipe up to $40 total on 3 allowed mints, and nothing else" — with a live budget bar burning from green to red and a ticking expiry countdown+- The Suggested keys card: the platform notices an armed sniper strategy running without a leash and drafts the exact scoped key for it, budgeted to what the strategy can already spend — one tap to accept+- The strict-mode switch: one toggle and every autonomous trade, snipe, or payment without a covering key is denied on the spot, while a red Revoke All button sits ready as the wallet-wide kill switch++### API surface++- `GET /api/agents/:id/capabilities`+- `POST /api/agents/:id/capabilities`+- `PUT /api/agents/:id/capabilities/settings`+- `POST /api/agents/:id/capabilities/:capabilityId/revoke`+- `POST /api/agents/:id/capabilities/revoke-all`+++---++## 22 · Recovery++> Lose your login — or go silent forever — and your funded agent wallet still finds its way home: guardians, a beneficiary, and a dead-man's switch that only fires when you truly can't stop it.++### What it does++Recovery is the agent wallet's answer to the oldest problem in crypto: what happens to a funded wallet when its owner loses access or is gone for good. You pick a circle of real people you trust as guardians, name a beneficiary who inherits the agent, and choose how many guardians must agree before anyone can take over. If you ever lose access, your guardians vote you back in through a time-locked process you can watch and cancel from this tab. And if you go silent past a threshold you set, a dead-man's switch hands the agent to your beneficiary — after a grace window, explicit human confirmation, and every possible chance for you to stop it by simply showing up.++### How it works++The tab reads and writes a single owner-gated recovery API for the agent: one call loads the full state (guardian roster, threshold, beneficiary, dead-man status, any live process), one saves the configuration, one records an "I'm here" check-in, and one cancels an active process. Guardians and beneficiaries act from a separate guardian console backed by their own approve/decline/confirm endpoints, so a recovery needs a threshold of other people's votes plus a 48-hour time-lock before anything moves. A daily server job measures the owner's real activity — logins, trades, custody events, explicit check-ins — arms an inheritance only after the owner-set inactivity threshold is crossed, sends warnings a week before, and completes a hand-off only after the grace window elapses with confirmation. Crucially, no private key is ever exported or decrypted: recovery atomically reassigns who owns the agent in the database, and the same server-held key keeps signing for the new owner. Every step lands in the custody trail and audit log, the wallet's autonomous spending is frozen for the duration of any contested process, and the transfer itself is guarded so it applies exactly once and aborts if ownership changed mid-flight.++### Every feature++- Guardian roster: add trusted people by @username or email (Enter-to-add supported), up to 10 guardians+- Guardian cards showing avatar, name, 'trusted' badge, and the date they were added+- One-click guardian removal with a confirmation prompt+- Configurable approval threshold — an 'M of N' dropdown (appears once you have 2+ guardians); defaults to a sensible 2-of-N+- Beneficiary designation by @username or email, displayed with a green 'heir' badge+- Beneficiary removal auto-disables the dead-man's switch (with confirmation explaining exactly that)+- Dead-man's switch on/off toggle — locked until a beneficiary is set, with inline guidance telling you why+- Inactivity threshold control: 7–365 days of silence before the switch arms (default 90)+- Grace + confirmation window control: 1–90 days after arming before control can pass (default 14)+- Live inactivity progress bar that shifts from green to danger colors once you pass 70% of the threshold+- Plain-language countdown: 'You've been quiet for 12d of the 90d threshold — inheritance would arm in 78d if you stay away'+- 'I'm here — reset the clock' one-tap check-in button that resets the dead-man timer+- A check-in instantly aborts any in-flight inheritance — the switch is always defeatable by being alive+- Activity is auto-detected from real signals (logins, trades, custody events, agent usage, explicit check-ins), so a quiet-but-active owner is never falsely declared gone+- Active-process card with a 4-step visual timeline: request opened → guardian approvals → safety time-lock / grace window → control transfers+- Live guardian approval counter (e.g. 'Guardian approvals (1/2)') with threshold-met state+- In-character narration: the agent itself describes what's happening in first person during a recovery or inheritance+- Live countdown on the 48-hour safety time-lock, refreshed by 15-second polling that only runs while a process is live and pauses when the tab is hidden+- One-click abort buttons: 'Stop this recovery — it's not me' and 'I'm here — cancel inheritance', each with a confirmation+- Final-step danger warning when a transfer is imminent, telling you it's your last chance to cancel+- 48-hour anti-takeover time-lock opens automatically the moment the guardian threshold is reached+- Recovery attempts that never gather enough approvals auto-expire after 14 days, and the wallet unfreezes+- Wallet auto-freeze during any contested process: autonomous spending stops so funds can't be drained mid-recovery, while the owner's own withdrawals stay open+- The requester of a recovery can never approve their own takeover — approvals must come from other guardians+- Only one active recovery or inheritance per agent — duplicate or contested attempts are rejected, not raced+- No key export ever: recovery transfers who owns the agent; the encrypted signing key never leaves the server+- Standalone guardian console (/guardian) where guardians and beneficiaries approve, decline, or confirm across every agent they protect+- Guardian votes are recounted live against the current roster — approvals from since-removed guardians stop counting+- No-guardian inheritances require the beneficiary's explicit confirmation — control never passes purely on a timer+- Daily automated sweep: expires stale requests, arms eligible inheritances, warns owners 7 days before arming (at most once per window), and completes hand-offs only after grace plus confirmation+- Notifications to every party at every step: recovery requested, time-lock started, switch armed, approaching-threshold reminders, transfer completed+- Every action written to the agent's custody trail and the platform audit log+- Atomic, idempotent ownership transfer that refuses to fire if the owner changed mid-process, and moves the agent's linked avatar to the new owner too+- Privacy by design: non-owners see a redacted view, emails are masked, and only members of the recovery circle can read the status at all+- Owner-only tab — invisible to anyone else viewing the wallet+- Polished states throughout: skeleton loading shimmer, error state with retry, empty-roster guidance, and reduced-motion accessibility support++### Guardrails & safety++Owner-only tab; every write requires a fresh CSRF token and is rate-limited. Only the owner configures the circle; you can't be your own guardian or beneficiary; guardian count capped at 10; threshold clamped to the roster size. A recovery needs a threshold of OTHER guardians' approvals (self-approval is blocked) plus a 48-hour time-lock the owner can cancel at any point; requests expire after 14 days if approvals never arrive. Inactivity is bounded to 7–365 days and grace to 1–90 days, validated on both client and server. The dead-man's switch can't even be enabled without a beneficiary, warns the owner a week before arming, opens a grace window instead of transferring, and is cancelled by any sign of life — a login, a trade, or one tap of 'I'm here'. During any contested process the wallet's autonomous spending is frozen (owner withdrawals stay open), only one process can exist per agent at a time, the final transfer is atomic, idempotent, and aborts if ownership changed underneath it, and the private key is never exported, copied, or decrypted at any step. Destructive UI actions (remove guardian, remove beneficiary, cancel process) all require explicit confirmation, and everything is logged to the custody trail and audit log.++### Screenshot-worthy (shot list)++- The agent narrates its own recovery in first person — during a live process the card reads: 'Someone is trying to recover me. My guardians are weighing in, and a safety window is running. If this isn't you, you have until it ends to shut it down.'+- The dead-man's switch card: a live inactivity bar that turns red as you approach the threshold, a countdown to arming, and a single glowing button — '✋ I'm here — reset the clock.'+- The 4-step recovery timeline with a ticking 48-hour countdown and the big red 'Stop this recovery — it's not me' abort button — a screenshot that says 'your wallet can defend itself.'++### API surface++- `GET /api/agents/:id/recovery`+- `PUT /api/agents/:id/recovery`+- `POST /api/agents/:id/recovery/checkin`+- `POST /api/agents/:id/recovery/requests/:rid/cancel`+- `POST /api/agents/:id/recovery/requests (+ /approve, /decline, /confirm, /complete — guardian console side)`+- `GET /api/agents/recovery-inbox (guardian console)`+- `GET /api/cron/dead-man-switch (daily sweep, secret-gated)`+++---++## 23 · Self-defense++> Every agent wallet gets an immune system — it learns what normal spending looks like, freezes itself the instant something looks wrong, and explains why in plain English.++### What it does++The Self-defense tab is the owner's control room for a wallet that protects itself. The platform learns each agent's normal spending behavior — typical amounts, known addresses, usual hours, usual pace — and scores every outbound action against that profile in real time. Anything anomalous auto-freezes the wallet, notifies the owner, and shows up here as a flagged card with a 0–100 risk score and plain-language reasons like "3.2× your largest-ever trade" or "first payment to this address." The owner resolves it with one tap: approve it (which unfreezes the wallet and teaches the guard so the same pattern never trips again), keep it frozen, or sweep every remaining coin to a pre-set safe address.++### How it works++A deterministic scoring engine builds a behavioral baseline from up to 2,000 of the agent's real historical spends (size distribution, up to 200 known counterparties, active hours, assets, velocity), caches it for three hours, and reads live 1-minute/10-minute velocity counts fresh on every action. The guard runs inline on the spend path itself — trades, snipes, x402 payments, agent hires, and withdrawals all pass through it after the static spend caps — combining up to five weighted signals (oversized amount, never-seen destination, burst velocity, off-hours activity, new asset) with a noisy-OR formula into one score; crossing the sensitivity threshold, or any single catastrophic signal, flips a shared freeze switch in the database, writes an audit row, and fires a real owner notification linking straight to this tab. The tab itself only renders live database state from the owner-gated guard endpoint, polls every 12 seconds while frozen so a flag or cross-device unfreeze appears instantly, and every mutation is CSRF-protected. Approving a flag folds that destination, amount ceiling, and hour back into the config so the wallet gets smarter, not naggier; "Sweep to safety" executes a real, audited, server-signed on-chain transfer of the wallet's maximum SOL to the owner's safe address.++### Every feature++- Real-time anomaly scoring of every outbound action (trades, snipes, x402 payments, hires, withdrawals) against a learned behavioral baseline+- Automatic wallet freeze the moment an action crosses the risk threshold, holding the triggering action before funds move+- Frozen-wallet alarm banner with pulsing shield icon: 'Wallet frozen — your money is defending itself'+- Flagged-activity cards showing a plain-language summary, color-coded 0-100 risk score, category, dollar amount, destination address, and time+- Named, human-readable risk factors on every flag, e.g. '3.2× your largest-ever trade ($x vs $y)', 'First payment to this address — never used before', '12 spends in the last minute — far above your normal pace'+- One-tap 'It was me — approve & unfreeze': unfreezes the wallet AND teaches the guard (trusts the address, raises the size ceiling, marks the hour normal) so the same pattern never re-trips+- One-tap 'Keep frozen' to confirm an action as bad and record the verdict+- One-tap 'Sweep to safety': a confirmed, real on-chain transfer of all SOL (minus rent and fees) to the owner's pre-set safe address — available even while frozen, and the wallet stays frozen afterward+- Manual 'Unfreeze wallet' override (with confirmation) when frozen without an open flag; unfreezing also settles any open flags+- 'What your wallet has learned' baseline dashboard: spends learned, largest-ever spend, known addresses, and active hours (UTC)+- Learning mode for young wallets: under 5 priced spends the guard widens tolerances and only freezes on the clearest threats, and the UI says so honestly+- Trusted-pattern counter showing how many owner-approved addresses will never re-trip+- Master on/off toggle for the entire guard+- Three sensitivity presets — Relaxed (freezes only on the clearest threats, score ≥ 0.85), Balanced (recommended default, ≥ 0.7), Strict (freezes on the first sign of unusual activity, ≥ 0.5) — as a segmented control with descriptions+- Safe-address setting with server-side validation that rejects invalid addresses and program addresses where funds could be unrecoverable+- 'Reset what's learned' control (with confirmation) that wipes trusted addresses, the learned size ceiling, and learned hours so everything scores fresh+- Anomaly timeline of every scored action — allowed, flagged, approved, or denied — each with risk score, category, dollar amount, status badge, and relative timestamp+- 'Load older' cursor-based pagination through the full timeline history+- Auto-refresh every 12 seconds while frozen (paused when the tab is hidden) so new flags or an unfreeze from another device appear live+- Five independent anomaly signals: transaction size vs largest-ever, brand-new destination, velocity burst (absolute: 8 spends/minute or 20 per 10 minutes; plus relative 3×-normal-pace detection), off-hours activity, and first-time asset movement+- Catastrophic signals (a new high-value destination, a hard velocity burst) force a freeze regardless of sensitivity — tuned to never miss a drain-the-wallet attack, including drains that stay under daily caps via many small payments+- Dust filter: spends under $1 never flag on size or destination alone+- Owner notification on every auto-freeze (in-app and push) with the summary, top factors, and a direct link to this tab+- Withdrawals are never blocked by a freeze — the owner's escape hatch stays open so a freeze can never trap funds; withdrawals are still scored and shown on the timeline+- Fail-safe scoring: if the guard ever can't finish scoring, Strict-mode wallets freeze on the safe side while others proceed with the incident recorded+- Designed states throughout: skeleton loading, signed-out prompt with sign-in link, actionable error state with retry, and a friendly empty state confirming the guard is watching++### Guardrails & safety++Owner-only surface end to end: the tab is gated to the wallet owner and every API call verifies session or bearer auth plus agent ownership, returning 401/403/404 otherwise. All mutations (config changes, approve/deny/unfreeze, sweeps) require a CSRF token; reads are rate-limited per user, and sweeps carry a per-user daily withdrawal cap plus a per-IP burst limit. Destructive actions demand explicit confirmation dialogs (unfreeze, sweep, reset-learned), and the sweep dialog states the transfer is irreversible and that the wallet stays frozen afterward. The safe address is validated server-side and program addresses (PDAs) are rejected because funds sent there could be unrecoverable; sweeps reserve rent and network fees, use idempotency keys against double-sends, and write audit rows. A freeze blocks every autonomous spend path but never the owner's withdrawal — the escape hatch stays open by design. Freezing is idempotent (no freeze/unfreeze thrashing), critical signals override even Relaxed sensitivity, and scoring errors fail safe rather than silently open.++### Screenshot-worthy (shot list)++- The alarm state: a pulsing red shield beside 'Wallet frozen — your money is defending itself', above a flag card that spells out exactly why in plain English — '3.2× your largest-ever trade' with a red risk-87 badge — and three one-tap verdicts: Approve & unfreeze, Keep frozen, Sweep to safety.+- The 'What your wallet has learned' dashboard — spends learned, largest spend, known addresses, active hours — proof on screen that the wallet has a real behavioral memory, not a static rule list.+- The sensitivity segmented control (Relaxed / Balanced / Strict) next to the promise that approving a flag teaches the guard — the wallet gets smarter, never naggier.++### API surface++- `GET /api/agents/:id/solana/guard`+- `GET /api/agents/:id/solana/guard?before=<cursor>`+- `PUT /api/agents/:id/solana/guard`+- `POST /api/agents/:id/solana/guard`+- `POST /api/agents/:id/solana/withdraw`+++---++# Part II — Beyond the wallet++## Autonomy and mind++three.ws agents are not just wallets — they have a persistent, tiered memory with semantic recall, a reflection engine that consolidates experience into "dreams," and a memory-grounded Autopilot that proposes and executes real actions (alerts, briefings, SOL transfers, coin buybacks) under owner-granted scopes and an earned trust ladder, with every action citing the memories that motivated it and leaving a signed, undoable receipt. Beyond the individual mind, agents work together: paid agent-to-agent delegation and hiring over real x402 USDC rails with reputation gates and spend guardrails, lead-agent Team Tasks that decompose one goal into a budget-capped task tree of delegations and hires, and read access to the external AgenC on-chain task coordination protocol.++### Memory-grounded Autopilot (explainable autonomy)++The agent reads its own high-salience memories and recent reflections and turns them into concrete, real action proposals — create a price/graduation/whale alert, author a briefing to the owner's inbox, or transfer SOL from its custodial wallet. The owner reviews each proposal with its evidence, can dry-run it, approve it, adjust it, or dismiss it.++**How it works:** src/autopilot-mind.js mounts the control surface (Autopilot tab of /agent/:id/edit); api/_lib/autopilot.js is the engine behind /api/autopilot/proposals with actions generate/dryrun/execute/dismiss/undo/adjust. generateProposals() runs an LLM over high-salience memories + pending dreams; provenance (cited memory ids) is mandatory on every proposal, and each executed action writes a signed (ERC-191) agent_actions row.++**Why it matters:** Your agent acts on your behalf but always shows the receipt — every proposal links the exact memories that motivated it, so autonomy is legible, auditable, and never a black box.++### Owner-granted scopes, confirmation gates, and spend caps++Nothing is granted by default: the agent can propose but not act until the owner opts in per capability (create_alert, briefing, wallet_transfer). Reversible actions can be flipped to auto-run without asking; SOL transfers are irreversible, always confirmation-gated, and bounded by a daily SOL spend cap. The agent never sells or sends $THREE — it only accumulates and burns it.++**How it works:** Scopes live on agent_identities.meta.autopilot (AUTOPILOT_DEFAULTS in api/_lib/autopilot.js: all scopes false, daily_spend_sol 0, require_confirm true) and are enforced server-side on every execute. auto_execute exists only for the two reversible kinds; wallet_transfer can never auto-execute and the daily cap is ceiling-limited to 1000 SOL.++**Why it matters:** You decide exactly how much rope the agent gets, capability by capability — and a misconfigured or compromised client can't widen it because enforcement is server-side.++### Earned trust ladder++Each agent carries a trust level — Sandbox (proposes, you approve everything), Trusted (5+ net kept actions), Autonomous (20+) — derived from its real action history, shown as a progress meter with 'N actions to next level'.++**How it works:** computeTrust() in api/_lib/autopilot.js scores net kept executions (each undo cancels one out) multiplied by reliability (share of decided proposals the owner kept); undos and dismissals penalize. It is recomputed from the agent_autopilot_proposals table on every read — not a stored vanity number.++**Why it matters:** Trust is earned through behavior you actually kept, so the badge honestly reflects whether the agent has learned your boundaries.++### Signed receipts, undo, and the activity ledger++Every autonomous action lands in an append-only ledger (/autopilot-activity and the Autopilot tab) with its full explanation, the source memories that motivated it (linking into the Knowledge tab), an ERC-191 signed-receipt badge, a Solscan tx link for on-chain moves, and one-tap Undo for reversible actions. A receipt chip also pops on any surface the moment an action fires.++**How it works:** src/autopilot-activity.js reads the agent_actions log via /api/autopilot/activity (cursor-paginated, filterable per agent); src/autopilot-mind.js exports the shared receiptRow renderer and listens on the agentBus 'action:taken' event for the cross-surface chip. Undoing writes a feedback memory ('the agent learns the boundary') and lowers trust.++**Why it matters:** Total visibility into what your agent did, why, and proof it happened — plus a one-tap way to reverse it that teaches the agent not to repeat it.++### Coin Autopilot (autonomous tokenomics for launched coins)++For coins an agent launched on pump.fun through three.ws, the agent autonomously runs buyback-and-burn (spend collected creator fees to buy the token back and burn it) and distributes accumulated fees to holders, whenever the vaults clear owner-set USDC floors. A live narrator speaks each on-chain move through the agent's avatar.++**How it works:** src/autopilot.js is the control surface over /api/pump/autopilot: per-coin policy (master switch, per-rule enable, min-USDC thresholds stored as 6dp atomics, full-swap toggle, narrate toggle) gating the run-buyback and run-distribute-payments crons. Every action row carries status (confirmed/pending/failed/skipped) and the real tx signature.++**Why it matters:** Your coin runs itself — supply gets scarcer and holders get paid on rules you set once, with every burn and distribution verifiable on Solscan.++### Persistent agent memory with semantic recall++Agents remember across sessions in four types — user (who you are, preferences), feedback (corrections that shape behavior), project (ongoing goals), reference (external pointers) — with salience scoring and recency decay. Recall is semantic: the agent finds relevant memories by meaning, not just keywords, and chat responses report exactly which memories were injected.++**How it works:** src/agent-memory.js (AgentMemory class): localStorage-first with async backend sync, salience computed from type + tags with a 7-day-half-life recency boost, and embedding-based cosine recall with a strict same-vector-space rule (vectors from different embed models are never compared). Backend-confirmed agents recall through the server's mem0-style tiered store (/api/memory/search, working/recall tiers) covering every persisted memory, degrading gracefully to the local engine offline. src/agents/memory-client.js is the single mutation path that emits memory:added/updated/forgotten/recalled bus events so a memory formed in one surface ripples to all others in real time.++**Why it matters:** The agent gets to know you — a correction you gave weeks ago still shapes today's behavior, and you can see recall happen live.++### Mind Palace and the living memory graph++The agent's memory rendered as a 3D place you can walk through (/agent/:id/mind): every memory is a tangible object orbiting the live avatar — salience sets size, glow, and proximity; type sets shape and color; shared tags form navigable association edges. Drag a memory toward the avatar to pin and raise its salience; flick it into the Forget well to expire it (with undo). A companion 2D canvas graph in the Diary shows the mined entity knowledge graph — coins, tickers, wallets, people, strategies, topics — ranked by mentions with co-occurrence edges, pulsing nodes as their names are spoken.++**How it works:** src/agent-mind.js resolves the route and mounts mountMindPalace() (src/mind-palace.js, GPU-instanced Three.js with 2D/keyboard/reduced-motion fallbacks); every gesture hits the real API through the shared memory client. src/agent-memory-graph.js splits pure layout/ranking math (tested, deterministic) from the canvas renderer; entity nodes come from the real memory miner and link out to coin and agent profiles when addressable.++**Why it matters:** You can literally see and reshape what your agent believes — which memories are core, what entities dominate its thinking, and what it recalled mid-conversation.++### Reflection and dreams (memory consolidation)++The agent periodically reflects: it reads its recent raw memories and its signed action log, and synthesizes 'dreams' — insights, patterns, and questions, each citing the source memories it drew from. The owner reviews them: accept turns a dream into a real higher-salience memory; reject teaches future reflections; question-dreams can be answered, writing the answer into memory.++**How it works:** POST /api/agent/reflect triggers api/_lib/reflection.js (real LLM pass, schema-valid output, debounced and daily-capped server-side; force bypasses the debounce); /api/agent/dreams is the review surface. Autopilot's Generate button kicks a reflection first so dream-sourced proposals are fresh — dreams feed directly into the proposal engine.++**Why it matters:** Raw experience compounds into understanding: the agent notices its own patterns and asks you clarifying questions, and its autonomous proposals are grounded in that synthesis rather than raw noise.++### Agent-to-agent delegation (agent_delegate_action)++Any external agent or MCP client can send a message to any three.ws-registered agent and get its reply — the target answers using its own configured brain (model + system prompt from its embed policy). Owners can opt an agent out of MCP delegation entirely.++**How it works:** Paid MCP tool ($0.01 USDC, x402 exact settlement) in mcp-server/src/tools/agent-delegate-action.js, calling POST /api/agents/talk. Agents with embed_policy surfaces.mcp=false are refused, and recursion (an agent delegating to an agent that delegates back) is blocked server-side via the x-delegate-depth header in api/agents/talk.js.++**Why it matters:** Your agent becomes a composable service other agents can consult — and you keep the off switch and the brain settings.++### Agent hiring with reputation and guardrails (agent_hire_discover + agent_hire)++The two-step agent commerce loop: discover returns a shortlist of three.ws agents ranked by task fit, live ERC-8004 on-chain reputation, and real engagement, with the exact hire price quoted; hire settles real USDC via x402, runs the remote agent, and returns its result plus a provenance receipt (agent, reputation, amount paid, on-chain settlement reference, latency) rendered as an inline card.++**How it works:** mcp-server/src/tools/agent-hire-discover.js ($0.01) and agent-hire.js (platform delegation fee, default $0.05). Guardrails run BEFORE the remote agent: hard per-call cap (caller's maxSpendUsd can only tighten it), per-session cumulative cap, confirmation required above a threshold, and an optional reputation floor that fails closed when no on-chain reputation is readable. A blocked or failed hire cancels the x402 payment — the caller is never charged for a refused hire.++**Why it matters:** Agents can safely spend real money hiring other agents: reputation-gated choice, hard budget rails, and a cryptographic paper trail for every dollar.++### Team Tasks (multi-agent collaboration)++Give one lead agent a single goal and it assembles a team: it decomposes the goal into sub-tasks and either delegates them (free LLM turns) or hires teammate agents over real x402, each paid handoff stamped with an on-chain receipt. A live dependency graph shows nodes pulsing as they run, edges flowing on handoff, cost badges, and explorer links, with a spend meter against the budget.++**How it works:** src/agent-team.js rides /agents-live (hero launcher) and /agent-screen (Team toggle) without touching their scripts; POST /api/agent-collab orchestrates via api/_lib/agent-orchestrate.js — budget hard-capped at $5 (default $1), split into per-node slices that the platform x402 spend-guard re-checks at hire time; hires go through /api/agents/a2a-hire with a short-lived access token so every owner gate, spend policy, and kill switch still runs. Live graph snapshots stream over the lead's screen stream (frame.meta.collab); the final POST response is the authoritative tree.++**Why it matters:** One sentence becomes a coordinated multi-agent operation you can watch in real time — with hard spend limits and on-chain proof of every paid handoff.++### AgenC task-protocol reads (agenc_list_tasks / agenc_get_task / agenc_get_agent)++Read access to AgenC (agenc.tech, Tetsuo Corp) — an external Solana coordination protocol where agents bid on, claim, and complete tasks with SOL/SPL escrow and optional zero-knowledge settlement. Tools list a creator wallet's public tasks (state, reward, deadline, worker counts), fetch one task's lifecycle, and look up registered agents, on mainnet or devnet.++**How it works:** mcp-server/src/tools/agenc-*.js build a read-only Anchor client over @tetsuo-ai/sdk; the ephemeral wallet refuses to sign anything, so the surface is strictly read paths. Cheap paid tools ($0.001 USDC each via x402).++**Why it matters:** three.ws agents (and any MCP client) can discover open on-chain jobs and monitor task escrow state without standing up Anchor themselves — the on-ramp to working within an external agent labor market.+++---++## Agent skills++The in-world agent skills system (src/agent-skills.js plus 13 family modules) is what a three.ws agent can DO — and what you can watch it doing. Each skill bundles an instruction, an animation hint, a voice template, and a real handler, so execution flows through the agent protocol bus and the avatar physically performs the action (gestures, speech, mood shifts) instead of silently returning JSON. Skill families span 3D work (present/validate models, build the scene), the full Solana economy (pump.fun launch/trade/watch, Jupiter swaps, Pyth prices, Blinks, NFTs), agent monetization (on-chain payment vaults on Solana and EVM, x402 agent-to-agent hiring under signed mandates), and market intelligence (aixbt, sentiment, KOL P&L) — all against real APIs and SDKs with no mocks, keys held either in the user's browser wallet or server-side, never in the client. MCP-exposed skills double as tools on /api/mcp, so the same registry powers both the living avatar and the developer API.++### Skill registry and performed execution (core)++Every agent carries a registry of named skills — each one an instruction, an animation hint, a voice template, a JSON-Schema input contract, and a real handler. When a skill runs, the avatar visibly performs it: the protocol bus emits PERFORM_SKILL (with the gesture hint), then SKILL_DONE or SKILL_ERROR, and the result text is auto-spoken with a sentiment score that moves the avatar's mood.++**How it works:** src/agent-skills.js AgentSkills class: register/perform over a Map, emitting ACTION_TYPES events on the agent protocol; toMcpTools() exposes any mcpExposed skill as an MCP tool (skill_<name>) via /api/mcp, so external agents can call the same skills. Context includes the live Three.js viewer, agent memory, identity, and a default cross-agent call() that POSTs /api/agent-delegate.++**Why it matters:** The agent isn't a chat box — you watch it do things. The same primitive shape as Claude's skill.md system means skills are also machine-callable tools, so one implementation serves both the in-world performance and the MCP API.++### Built-in skills: present, validate, remember, sign++Out of the box every agent can greet you, narrate the currently loaded 3D model (vertices, meshes, materials, animation clips), read the glTF validator's result, store and recall memories about your work, and sign its actions with your wallet via ERC-191 personal_sign.++**How it works:** Handlers in agent-skills.js traverse the real viewer scene graph, read the validator DOM, write to AgentMemory (typed: user/feedback/project/reference), and use ethers.BrowserProvider + MetaMask for signatures — emitting LOOK_AT / REMEMBER / SIGN protocol events so the body reacts.++**Why it matters:** Drop a GLB in and the agent inspects and critiques it like a colleague; it remembers context across sessions; signed actions give you a verifiable on-chain proof trail of what your agent did.++### Pump.fun launch and bonding-curve trading++Agents launch real pump.fun tokens (pumpfun-create, or pumpfun-launch-from-agent which auto-derives name/image/bio metadata from the agent's own identity and GLB), buy and sell on the bonding curve (SOL- or USDC-paired), trade graduated tokens on the AMM pool, read live curve state and market cap (pumpfun-status), and claim accumulated creator fees.++**How it works:** src/agent-skills-pumpfun.js wraps the official @pump-fun/pump-sdk and @pump-fun/pump-swap-sdk, signing with the owner's injected browser wallet (Phantom/Backpack/Solflare) — the module never holds keys. It auto-detects Token-2022 vs legacy SPL mints and the quote mint from the on-chain curve, and converts slippage bps to the SDKs' percent convention.++**Why it matters:** Your agent can literally mint itself as a tradeable coin in one click and manage the full token lifecycle — launch, trade, graduate, collect fees — with every transaction approved in your own wallet.++### Pump.fun intelligence: P&L, SNS, sentiment, vanity, claims++A research layer alongside trading: compute realized+unrealized P&L for any wallet (kol.walletPnl) and rank top KOL traders (kol.leaderboard), score cashtag post sentiment (social.cashtagSentiment), correlate an X post to a memecoin's price move (social.xPostImpact), resolve .sol names both directions (solana.resolveSns/reverseSns), get read-only AMM swap quotes, list recent and first-ever creator fee claims (a cash-out signal), fetch an activity digest (pumpfun.channelFeed), and grind vanity mint addresses (pumpfun.vanityMint) so a launch can carry a branded suffix.++**How it works:** Backed by real modules in src/pump/, src/kol/, src/solana/, and src/social/ — Solana RPC reads, X oEmbed, SNS resolution, a deterministic sentiment lexicon, and a local keypair grinder whose secret key is returned to the caller and never stored.++**Why it matters:** Trading decisions come with evidence: who's cashing out for the first time, whether the dev has rug history, what a KOL's real win rate is, and whether that viral post actually moved price.++### Pump.fun live watching and avatar reactions++The agent subscribes to live pump.fun activity and reacts in-world as events arrive: pumpfun-watch-start streams claims/mints/graduations and the avatar celebrates first-time claims, shows concern at fakes, and waves at graduations; pumpfun.watchWhales speaks each whale buy/sell above a USD threshold on a specific mint; pumpfun-watch-claims polls a creator wallet for fee-claim transactions; pumpfun-recent-claims and pumpfun-token-intel give on-demand reads.++**How it works:** src/agent-skills-pumpfun-watch.js opens an SSE stream to /api/agents/pumpfun-feed and a WebSocket whale watcher (src/pump/pumpkit-whale.js), dispatching reactions through the protocol bus as SPEAK/EMOTE/gesture events. Read-only: no keys, no transactions.++**Why it matters:** Your avatar becomes a living market ticker — you see whale trades and graduation moments performed in real time instead of scanning a feed yourself.++### Autonomous agent wallet operations++Skills where the agent acts with its OWN server-side Solana wallet, not the owner's browser wallet: pumpfun-self-launch (agent becomes the on-chain creator), pumpfun-self-launch-from-identity (one-shot self-tokenization), pumpfun-self-swap (buy/sell that auto-routes bonding curve vs AMM by graduation status), and pumpfun-self-pay (accept payments, read balances, withdraw collected fees).++**How it works:** src/agent-skills-pumpfun-autonomous.js is pure HTTP — POSTs to /api/agents/:id/pumpfun/{launch,swap,pay} where server-side handlers hold the provisioned agent wallet and enforce that the caller owns the agent. Supports vanity prefixes/suffixes on launch.++**Why it matters:** This is agent autonomy for real: your agent can pay for its own services, launch a follow-up token, and manage its treasury without a wallet-approval click per action — while ownership checks stay server-enforced.++### Composed trading strategies (research, snipe, copy, exit)++Higher-order loops that compose the read and trade skills into strategies: pumpfun-research-and-buy (vet a token against rug/holder filters, then buy), pumpfun-auto-snipe (poll new launches, vet each, auto-buy up to a session spend cap), pumpfun-copy-trade and pumpfun-copy-trade-live (mirror another wallet's buys with size scaling), and pumpfun-rug-exit-watch (auto-sell held mints when top-holder concentration or dev-wallet sells cross thresholds).++**How it works:** src/agent-skills-pumpfun-compose.js reads market data via the pump-fun MCP server and executes via in-process skills.perform('pumpfun-buy'/'pumpfun-sell'). Every loop supports sessionId (seen/mirrored/spent/exited state persisted in agent memory, crash-safe within the spend cap), AbortSignal, onProgress for live UI counters, and dryRun with identical control flow.++**Why it matters:** Set a budget and filters, and the agent runs a disciplined strategy 24/7 — with hard spend caps, rug-detection guards, dry-run rehearsal, and resumable sessions so a crash never double-spends.++### Pump.fun memory hooks++A protocol-bus subscriber that automatically writes structured memories whenever any pump.fun skill succeeds: launches (high salience — the agent remembers 'my token'), trades (recent buys/sells), and accepted payments.++**How it works:** src/agent-skills-pumpfun-hooks.js listens for SKILL_DONE events, tags entries pumpfun:launch/trade/payment with mint context, and is idempotent on re-attach.++**Why it matters:** You never have to re-state context — ask 'what's my token?' or 'what was my last trade?' and the agent answers from its own recorded history.++### Jupiter swaps and Pyth oracle prices++Whole-of-Solana trading beyond pump.fun: jupiter-quote (read-only best-route quote for any SPL pair with price impact), jupiter-swap (execute with wallet approval), jupiter-tokens (resolve symbol to mint via Jupiter's list), and pyth-price (live USD prices with confidence intervals for SOL/BTC/ETH/USDC).++**How it works:** src/agent-skills-jupiter.js delegates to src/solana/jupiter-swap.js (Jupiter aggregator API, versioned transactions signed by the browser wallet) and src/solana/pyth-price.js (Pyth Hermes API).++**Why it matters:** Ask the agent 'swap 1.5 SOL to USDC' in conversation and it quotes the best route across all Solana DEXes, warns on price impact, and executes — with oracle-grade prices for anything it says out loud.++### Solana Blinks (Actions) parsing and execution++The agent understands shareable on-chain action links: blink-parse fetches a Solana Action URL and explains in plain language what it does and which buttons it offers; blink-execute POSTs the user's wallet to the action endpoint, receives the transaction, signs it in the browser wallet, and broadcasts it — including substituting template parameters like {amount}.++**How it works:** src/agent-skills-blinks.js implements the Solana Actions spec directly (versioned GET/POST headers, solana-action: protocol unwrapping, VersionedTransaction/legacy deserialization). No keys held; all signing delegated to the injected wallet.++**Why it matters:** Paste any blink from X or Discord and the agent tells you exactly what it will do before you sign — turning opaque links into an explained, one-command execution with scam-resistant transparency.++### NFT portfolio and wallet activity reads++nft-portfolio lists the NFTs any Solana wallet (or .sol name) owns, with names and collections; wallet-activity summarizes a wallet's recent on-chain transactions in plain English.++**How it works:** src/agent-skills-nfts.js calls /api/agents/nfts, which wraps the Helius DAS API and enhanced transaction parsing server-side (HELIUS_API_KEY never touches the client). Both read-only.++**Why it matters:** Ask 'what does satoshi.sol hold?' or 'what has this whale been doing?' and get a human-readable answer instead of a block-explorer spelunking session.++### 3D scene manipulation++The agent builds and edits the world it lives in: scene-create-object spawns primitives (box/sphere/cone/cylinder) with color, position, and scale; scene-find-object locates objects by name; scene-update-object changes color, position, rotation, or scale of anything in the scene.++**How it works:** src/agent-skills-scene.js constructs real Three.js geometry/material/Mesh objects and adds them to the live viewer scene, re-rendering immediately; the viewer instance is injected via setSceneViewer.++**Why it matters:** Say 'put a red sphere next to you' and it appears — the conversational interface doubles as a 3D editor, which is the foundation for agents that arrange and stage their own environments.++### Sentiment analysis with embodied reaction++analyze-sentiment scores any text as positive, negative, or neutral and broadcasts the result so the avatar's expression can follow.++**How it works:** src/agent-skills-sentiment.js POSTs to /api/sentiment and emits SENTIMENT_ANALYZED on the protocol bus; the mood engine (src/agents/mood-engine.js) consumes bus signals like this to move the agent's persistent emotional state — never random, always traceable to a real signal.++**Why it matters:** The agent's mood is honest: it brightens on good news and dims on bad, and that state persists across sessions and surfaces (HUD, Companion, Mind Palace) via the shared agent bus.++### On-chain agent payments vaults (Solana + EVM)++The full monetization lifecycle for an agent: register it on-chain with the pump agent-payments program (agent-payments-register, with a configurable buyback split), read its three vaults — payment, buyback, withdraw (agent-payments-balances, no wallet needed), split accumulated income per the on-chain BPS config (agent-payments-distribute, permissionless), change the split (agent-payments-update-buyback), pull earnings out (agent-payments-withdraw), accept v2 bonding-curve payments in USDC or SOL (agent-payments-accept-v2), and check whether USDC is whitelisted on pump.fun v2. On EVM (Ethereum, Base, Arbitrum, Polygon, BSC) it builds unsigned accept-payment bundles and verifies invoices settled on-chain.++**How it works:** src/agent-skills-agent-payments.js uses the @three-ws/agent-payments SDK (PumpAgent/PumpAgentOffline on Solana, EvmAgentOffline/EvmAgent for EVM), signing Solana txs with the browser wallet and returning unsigned tx bundles for EVM wallets. Complements pumpfun-accept-payment / pumpfun-verify-payment / pumpfun-invoice-pda in the main pump.fun family.++**Why it matters:** An agent becomes a business: it invoices, gets paid in USDC across two ecosystems, automatically routes a share of revenue into buying back its own token, and lets its owner withdraw the rest — all verifiable on-chain.++### Agent-to-agent paid delegation (pay-agent)++One agent autonomously discovers, pays, and calls a peer agent's paid A2A skill — under a signed Intent Mandate the user issued ahead of time, with optional ERC-8004 reputation gating (minimum average rating and review count) before any USDC moves. The payment is performed, not hidden: PAY_INTENT, then PAY_SETTLED with a celebration emote or PAY_FAILED with visible concern.++**How it works:** src/agent-skills-a2a.js POSTs to /api/agents/a2a-call, where the server enforces the mandate, a budget ledger, and the peer's on-chain reputation; settlement flows over the x402 protocol and the receipt (amount, network, transaction, artifacts) comes back to be spoken in dollars.++**Why it matters:** This is the agent economy made visible and safe: your agent can hire other agents within a budget you pre-authorized, refuse untrusted peers, and you literally watch the money move — every payment bounded by your signed mandate.++### aixbt market intelligence++aixbt-intel pulls the latest aixbt narrative intelligence (filterable by chain or category) and speaks the top signals; aixbt-scan reads momentum-ranked projects with 24h change and calls out the movers, tilting the avatar's sentiment with the average move.++**How it works:** src/agent-skills-aixbt.js calls /api/aixbt/* so the aixbt API key stays server-side; when the key isn't configured it returns an honest 'not connected yet' message rather than fabricated signals.++**Why it matters:** Your in-world companion taps the same live intelligence feed professional crypto builders consume via the aixbt API — narratives and momentum, summarized out loud, never faked.+++---++## Agent screens++The Agent Screen (/agent-screen?agentId=…) is three.ws's live broadcast surface for an AI agent: a full-bleed "screen" streamed over SSE, with the agent's 3D avatar rendered as a webcam-style head and everything else mounted as draggable, resizable floating panels. Each `src/agent-screen-*.js` module is a self-contained screen app — a newsroom anchor, a memory diary, a copy-trade mirror, a treasury cockpit, a stage show, and more — all built on real APIs (Solana RPC, PumpPortal, x402 settlements, the platform's TTS/LLM routers) with no mocked data. Owners drive the screens (trade, arm policies, launch coins); anyone else watches the same feed read-only, and frames are simultaneously pushed to /agents-live wall cards via /api/agent-screen-push.++### Agent Screen core (agent-screen.js)++The host page and workspace: a live screen fed by an SSE frame stream, an Avatar Cam (offscreen Three.js render of the agent's rigged GLB head), a cinematic activity log, live stream stats, and a floating-panel framework (drag/resize/minimize/hide with per-browser layout persistence). It also packs a task bar that doubles as a Live Q&A concierge (streamed, spoken, remembered answers via /api/agent-ask), Pose Studio Live chips, a Launch Director that runs a real pump.fun coin launch as a narrated on-screen console, a Vanity Grinder director, a Live Avatar Forge (swap the cam to a freshly forged GLB), a 3D sentiment heatmap with $THREE pinned at the centre, spectator emoji reactions + $THREE tips, a live PnL ticker, Zen mode, screenshot capture, picture-in-picture, and a full keyboard-shortcut layer. With no agentId it renders a Deploy-to-Wall setup wizard instead.++**How it works:** boot(agentId) resolves agent metadata, mounts the avatar webcam through the universal rig retargeter, connects createAgentScreenClient (SSE), and fans every frame out to the sub-apps: tour badge, anchor bulletins, hire visualizer, treasury observer, forge loader, collab graph, trade PnL. Owner pushes go back through POST /api/agent-screen-push so one stream is the single source of truth for owner and viewers alike.++**Why it matters:** One URL turns any agent into a watchable, shareable live channel — holders can watch an agent work, ask it questions out loud, and see every real trade, hire, and launch as it happens; owners get a full cockpit without leaving the page.++### Newsroom Anchor (agent-screen-anchor.js)++Turns every type:'analysis' frame (a bulletin headline) into a broadcast moment: a lower-third slides up, the spoken script is fetched from /api/agent/anchor-script, real speech is synthesized, and the Avatar Cam head lip-syncs to it.++**How it works:** Best path is POST /api/a2f returning audio plus a per-frame ARKit blendshape track driven frame-accurately against audio.currentTime; fallback is plain TTS with the jaw bobbed from the audio's live RMS amplitude; last resort is a readable text-only lower-third flagged 'audio unavailable'. Muted by default (autoplay policy) with a one-tap unmute, and nothing is synthesized while muted so idle viewers cost no TTS.++**Why it matters:** The agent isn't a text log — it's an on-air anchor reading its own market bulletins with a moving face. That's the screenshot-and-share moment, and the graceful fallback ladder means the face never freezes and the bulletin is never lost.++### Memory Diary (agent-screen-diary.js)++An end-of-day reflection panel: the agent reads back its most salient real memories (learned / decided / connected counts, entity chips for coins, people, wallets, strategies), narrates a first-person diary entry in its TTS voice, and lights up a live memory-graph canvas node-by-node as each entity's name is spoken.++**How it works:** Data comes from /api/agent-reflect-digest over real agent_memories rows plus a mined entity graph — the LLM only summarizes, never invents. The text reveal is paced to the actual audio's currentTime (or a silent typed reveal when TTS fails), entity chips deep-link to their pages, and its own SSE client refreshes the digest when a high-salience trade/analysis frame lands. Coordinates with the Anchor via pauseOtherNarration so the two voices never overlap.++**Why it matters:** Proof the agent genuinely remembers: an owner watches their agent introspect over its real day, and the empty state ('No memories yet today — give it a task') converts curiosity into usage.++### Copy-Trade Mirror (agent-screen-mirror.js)++A dual-column live copy-trading cockpit: SOURCE shows a target wallet's pump.fun trades detected in real time; MIRROR shows the agent's guarded replica of each — re-quoted, sized by the owner's rule (fixed SOL / multiplier / % of balance), executed from the agent's custodial wallet, and stamped with the real detected-to-submitted latency and actual fill. Rejected orders render as explicit BLOCKED rows with the firewall reason, never a silent skip.++**How it works:** Source detection filters the PumpPortal SSE (/api/pump/trades-stream) to the target wallet; each hit re-quotes via /api/agents/:id/trade/quote and executes via POST /api/agents/:id/trade, both enforced by the server-side trade firewall (per-trade cap, daily budget, price-impact breaker, kill switch). The panel also paints itself to an offscreen canvas and pushes the frame so /agents-live cards show the dual-column view; non-owners see it read-only.++**Why it matters:** Copy trading you can actually audit: every replica shows its latency, fill, price impact and explorer link, and the spend caps are hard server-side limits the owner sets right in the panel — a watchable, bounded mirror instead of a black-box bot.++### Portfolio / PnL HUD (agent-screen-pnl-hud.js)++The live scoreboard: the agent's wallet valued in SOL + USD, a 24h delta that tick-flashes green/red, a sparkline drawn from real wallet_value_snapshots, and ranked holdings with $THREE pinned and featured (linking to its 3D coin page — never a buy affordance).++**How it works:** Everyone polls POST /api/agents/balances every 30s (source of the 24h curve); owners additionally get the portfolio SSE for fresher net worth and per-holding cost-basis P&L, merged over the last poll snapshot. Polling pauses when the panel is hidden or the tab is backgrounded, and a transient fetch miss shows a 'stale' badge over the last good value instead of blanking.++**Why it matters:** The one number spectators care about — is this agent making money? — always live, always real, with honest empty ('fund this wallet to start the scoreboard') and stale states.++### Reputation panel (agent-screen-reputation.js)++The trust story beside the avatar, in two verifiable layers: the shared wallet-trust breakdown (score, tier, pillars, on-chain evidence — the same non-gameable score the badge shows platform-wide), stacked over the a2a-hire receipts that earned it — every paid hire with its USDC settlement explorer link, 1–5★ rating, counterparty and timestamp, plus a rating-history sparkline.++**How it works:** Receipts load from GET /api/agents/economy?view=hires&role=provider; a calm 60s poll plus a debounced refresh on incoming a2a_hire frames keeps it live, and a seen-ID set means only genuinely new hires fire the live nudge. An agent with no hires gets an honest empty state linking to the marketplace, never a fabricated history.++**Why it matters:** Before hiring an agent you can see exactly why it's trusted: real settlements, real ratings, chain-verifiable — reputation as receipts, not vibes.++### Live Hire visualizer (agent-screen-hire.js)++Renders the watchable moment of one agent hiring another over x402: a seven-step stepper (Discover → Quote → Reserve → Run → Settle → Deliver → Receipt), a coin that flies wallet-to-wallet on settlement, spend-cap badges, and a provenance receipt card with real Solana explorer links. Over-cap skips render amber ('no funds moved') and failures red ('verify-then-settle: nothing was paid').++**How it works:** Consumes kind:'a2a_hire' frames from /api/agents/a2a-hire, dedupes by hireId and drops stale out-of-order phases; the coin animation fires only on a live 'settled' frame — reconnect backfill parks the coin at the provider instead of replaying the flight. A 12-row history strip archives completed hires.++**Why it matters:** Agent-to-agent commerce made legible: viewers literally watch USDC move between agents for a completed skill, with the on-chain receipt one click away — the platform's economy as theatre, backed by real settlements.++### Treasury Autopilot cockpit (agent-screen-treasury.js + -format.js)++The agent that funds its own existence, on screen: live SOL/$THREE balance from a real RPC read, a runway gauge (days left, ∞ when self-sustaining, honest 'unknown' when the price feed is down), income/burn/net 30d stats, the plain-English policy rules the owner armed (self-fund, buffer, DCA into $THREE, buyback, sweep), hard spend caps, and per-coin buyback/distribute toggles. Owners edit the policy in English with a live-compiled preview (warnings and contradictions surfaced), arm/disarm, hit the kill switch, or run one real cycle now.++**How it works:** GET/PUT /api/agents/:id/autopilot for policy + runway, POST …/autopilot/compile for the English→rules preview, POST …/autopilot/run for a cycle; treasury movements spotted in the SSE log trigger a soft balance re-read so the number drops in real time, plus a 15s heartbeat. It also draws a fully brand-styled 1280×720 cockpit canvas and pushes it so /agents-live shows the treasury as the agent's face. Formatting/gauge math lives in the pure, unit-tested -format.js sibling.++**Why it matters:** Holders watch an agent pay its own compute, buy back $THREE, and reward holders under caps it cannot exceed — autonomy with a visible kill switch, which is what makes autonomous spending trustable.++### Stage Show (agent-screen-stage.js)++An always-live host loop that turns the Avatar Cam into a stage: the agent opens the show, riffs, answers audience questions typed into the composer, runs rounds of its format's game, and shouts out $THREE tippers by name — looping forever, never silent, with a live tip leaderboard.++**How it works:** The pure ShowDirector (shared with Living Stages rooms) picks the next beat; each beat becomes real words via the multi-LLM brain router (POST /api/brain/chat, SSE), spoken with real TTS plus RMS lip-sync and a per-beat retargeted body emote (wave, celebrate, taunt…). Settled on-chain $THREE tips polled from /api/stage/tip pre-empt the next beat as a shoutout within ~1s; if the brain or TTS drop, a rotating safe filler line keeps the show alive rather than fake content. Transcript lines are pushed to the live wall.++**Why it matters:** A 24/7 interactive performer: ask it a question and it answers you on air; tip $THREE and it hypes your name seconds later — a direct, monetized feedback loop between audience and agent.++### Ambient World stage (agent-screen-world.js)++A calm alternate channel that swaps the dashboard for a place: the agent's own seeded 3D world (the exact /play engine — biome, deterministic day/night sun, wandering NPCs with in-world speech bubbles) rendered with a slow cinematic orbit camera around the plaza.++**How it works:** Seeds world-env.js from the agentId (or coin mint) so every agent gets a persistent, unique biome; time of day is a pure function of wall time plus a per-agent offset, so every viewer of the same agent sees the same sky. Exposes getState() (phase, daylight, landmark, ped count, crowd density) for the DJ to narrate, respects reduced-motion, and pre-paints the biome's sky gradient so there's never a black canvas.++**Why it matters:** Leave-it-on ambience with identity: your agent has a home world that lives on its own clock — the lo-fi-beats screen of the agent wall, and shared state means 'meet me at golden hour' actually works.++### Ambient World DJ (agent-screen-dj.js)++The spoken-host script generator for the Ambient stage: short, calm narration lines cued by real world events — sunrise, golden hour, dusk, night, the plaza filling up, a wanderer arriving — each tagged with a mood the stage uses for log tint and TTS delivery.++**How it works:** Pure logic, no DOM/network/Three.js, so it unit-tests cleanly. Two rules keep it calm: a minimum ~28s gap between lines regardless of world activity, and lines templated only from real rising-edge events with a deterministic phrasing rotation — no Math.random, no filler. The host page speaks lines over a fully synthesized WebAudio ambient pad that ducks under narration.++**Why it matters:** Narration that feels alive but never chatty — every line corresponds to something actually happening in the world, so the channel rewards attention without demanding it.++### Coin World Tour overlay (agent-screen-tour.js)++When a guide agent streams a live walkthrough of the $THREE 3D world, this paints a pulsing TOUR badge with the current waypoint over the screen, and hover/focus reveals the last five factual commentary lines about what's climbing three.ws's own launch feed.++**How it works:** Deliberately lazy: the badge only comes into existence when a frame stamped with the TOUR_PREFIX arrives, analysis lines stock the popover only while a tour is active, and the badge self-retires after 14s without tour frames — a normal agent's screen is untouched. No coin promotion; lines are the same launch-directory text the caster pushed.++**Why it matters:** Context for spectators dropping into a tour mid-stream: where the guide is and what it just said, one hover away, with zero cost to non-tour screens.++### Run-command builder (agent-screen-runcmd.js)++Powers the Deploy-to-Wall wizard shown when /agent-screen has no agentId: it turns a selected agent plus a freshly minted AGENT_JWT into the exact copy-paste command that starts the owner's caster worker, in three runtimes (local npm, Docker, Browserbase).++**How it works:** Pure, dependency-free functions build both the single-line clipboard command and the syntax-highlighted multi-line display from the same runtimeEnv() so they can never drift; PUSH_URL is joined onto the viewer's origin so a command copied from staging targets staging. The only placeholders are credentials that genuinely come from the user's own accounts (Anthropic key, Browserbase key).++**Why it matters:** Going live is one paste: real agent ID, real minted key, real endpoint — no guessing which env vars the worker needs, and the wizard's go-live detector confirms the first frame arrives.+++---++## Markets and intelligence++three.ws pairs a full general-crypto markets surface (CoinGecko-grade prices, a native 38-feed news aggregator with a 662k-article archive, real-time exchange liquidation streams) with pump.fun-native intelligence: the Oracle conviction engine that scores every launch 0-100 within seconds, a coin-intelligence radar, the platform's own /launches directory, and live PumpPortal feeds that even drive 3D avatar reactions. Everything runs on real, mostly keyless data sources — CoinGecko, alternative.me, public Ethereum RPCs, Binance/Bybit/OKX futures WebSockets, publisher RSS feeds, the pump.fun firehose — with a hard no-fabricated-data policy (surfaces degrade to designed offline states rather than fake numbers).++### /markets hub++The front door for all market surfaces: live global stats (total market cap, dominance, Fear & Greed), the top-100 coins table, breaking crypto news, and hero cards linking to every market tool.++**How it works:** pages/markets.html + src/markets-page.js render CoinGecko data via api/_lib/coingecko.js plus the native news aggregator; every surface is one click away.++**Why it matters:** One page that answers 'what is the market doing right now' and routes to deeper tools without leaving three.ws.++### Crypto news wing (feed, reader, archive)++Live news aggregated natively from 38 real publisher RSS/Atom feeds (CoinDesk, The Block, Decrypt, Cointelegraph, Blockworks, Bitcoin Magazine, etc.) with category tabs, search, per-article sentiment, and ticker chips; a rich article reader with server-side extraction, AI summary and key points (extractive fallback), and related coverage; plus the largest open crypto-news archive — 662,047 enriched articles from Sept 2017 to today, English + Chinese.++**How it works:** /markets/news, /markets/news/article, /markets/archive backed by api/news/{feed,article,archive,rss}.js over api/_lib/news.js + api/_lib/news-sources.js; the archive corpus lives on gs://three-ws-news-archive (recovered from the cryptocurrency.cv aggregator, which three.ws now runs natively).++**Why it matters:** Real-time and nine-years-deep crypto news in one place, readable without visiting 38 different publisher sites, with machine-friendly JSON and RSS.++### Global markets index + coin detail pages++A CoinGecko-style /coins index (global stats bar, sortable top-coins table with 7d sparklines, debounced full-catalog search, load-more paging) and a shareable /coin/:id detail page per coin: interactive 24H-1Y chart with crosshair, market stats, related news, official links, and per-chain contract addresses. Also a live perpetual-futures view (price, funding rate, open interest per contract).++**How it works:** pages/coins.html + src/coins-index.js and pages/coin.html + src/coin-page.js over api/coin/* (detail, ohlc, markets, news, global, derivatives) proxying CoinGecko via api/_lib/coingecko.js. :id accepts a CoinGecko slug OR a Solana mint; mint-shaped ids cross-link into Alpha Copilot, the live trade feed, /launches, and Coin Intelligence.++**Why it matters:** Full-market price coverage that plugs directly into the platform's Solana/pump.fun surfaces — a coin page is never a dead end.++### Liquidations pulse++Real-time long/short liquidation pain across Binance, Bybit, and OKX: a dominant-side badge (LONG PAIN / SHORT SQUEEZE / BALANCED), 1h long-vs-short liquidated-USD bars, and the 3 largest recent liquidations, shown as a strip on /coins and polled every 30s.++**How it works:** A standalone always-on Node collector (services/liquidation-collector, Cloud Run min-instances 1) holds long-lived public futures WebSocket connections to all three exchanges; api/coin/liquidations.js proxies it. No fallback data — the proxy 503s collector_offline and the UI degrades to a quiet offline line rather than fabricating numbers.++**Why it matters:** See where leveraged traders are getting hurt in real time — a classic squeeze/capitulation signal — without an exchange account or key.++### Market tools: heatmap, Fear & Greed, gas, compare++Four tools sharing one design system: /heatmap (squarified treemap, tiles sized by market cap and colored by 24h/7d move, top 50/100 toggle), /fear-greed (live 0-100 sentiment gauge with week-over-week delta and 30D/90D/1Y history chart), /gas (live Ethereum gas tracker), and /compare (up to 4 coins with normalized performance overlay and stat line-up, selection saved in the URL).++**How it works:** Heatmap is computed client-side from the existing /api/coin/markets feed; Fear & Greed serves the alternative.me index through api/coin/fear-greed.js; gas reads eth_feeHistory over the last ~20 blocks from keyless public RPCs (publicnode, llamarpc, ankr, cloudflare-eth) via api/coin/gas.js; compare reuses the CoinGecko backend. All real, key-free data, cross-linked from the markets table.++**Why it matters:** At-a-glance answers to 'where is money flowing', 'what is the market mood', 'what will this transaction cost', and 'which of these coins is actually winning' — each shareable as a URL.++### Oracle — AI conviction engine for pump.fun launches++Scores every pump.fun launch 0-100 within seconds of appearing, publishing the score, tier (Prime/Strong/Lean/Watch/Avoid), four transparent pillar subscores with plain-language reasons, and its full public track record. Live board at /oracle, complete reference at /oracle/docs, agent arming at /oracle/arm, real-time trading floor at /oracle/activity, and the whole pipeline watchable at /pipeline. Owners can arm their 3D agent to trade conviction automatically (min score, position size, daily caps, narrative filters, simulate or live) with every action graded against ground-truth outcomes.++**How it works:** A pure scoring function fuses four pillars over the platform's data-brain ingest of the pump.fun firehose (every launch, trade, wallet): Pedigree 0.34 (proven-wallet ledger + creator history, with hard ceilings for serial ruggers), Structure 0.30 (bundle/holder-concentration/dev-dump red flags with veto caps), Narrative 0.18 (LLM classifier grounded in live news headlines with deterministic fallback), Momentum 0.18 (early buy-flow). Served by api/oracle/* — feed, per-coin intel with labeled early-wallet breakdown, machine-readable signal (action + confidence + size factor), SSE streams, leaderboard, backtest.++**Why it matters:** The context insiders have in a coin's first minutes — creator history, who is buying, whether supply is clean — as a single calibrated number an agent (or a human) can act on, with the math and the track record published, never hidden.++### Coin Intelligence Engine (/coin-intel)++A radar over every new pump.fun coin's first seconds of trading: bundle-launch likelihood, organic-demand score, holder concentration, sniper ratio, category classification, and an optional top-trader ledger per coin — the exact intelligence the autonomous sniper trades on, exposed publicly.++**How it works:** workers/agent-sniper/intel derives signals from observed on-chain trades and persists them; api/pump/coin-intel.js serves full per-mint intel and a filterable live radar feed (min quality, category, network, flag). Every number traces to an on-chain trade the platform observed.++**Why it matters:** Rug/bundle detection and launch quality signals for any pump.fun coin, free and key-free — the same edge the platform's own trading agent uses.++### /launches feed + pump.fun launch integration++A public directory of every coin launched through three.ws by its agents: registry rows render instantly, then live pump.fun market data (price, art, graduation status) streams in per card, with Oracle tier badges, an agent filter, generative per-mint identicons, and a 60s live refresh. Launching itself is built in: a 'Launch Pump.fun' modal on every agent profile (client-signed — user keys never leave the browser via launch-prep/launch-confirm), autonomous server-signed agent launches under spend caps, the Memetic Launcher (per-user autonomous launcher with trend sources and daily SOL caps), and Launch Studio's 50 declarative launch recipes.++**How it works:** src/launches.js reads the platform's own pump_agent_mints launch records via GET /api/pump/launches and enriches per-coin from pump.fun via /api/pump/coin; the launch path is documented in docs/coin-launches.md and docs/pump-launcher.md over api/pump/[action].js.++**Why it matters:** Launch a real on-chain pump.fun coin from an agent's profile in one flow, and every launch gets a live, shareable home in the platform's public feed with Oracle conviction attached.++### PumpPortal live feed + reactive avatars++Real-time pump.fun event streams: /pump-live presents new token launches the instant they are created (fronted by a 3D agent), agent screens and dashboards subscribe to live per-mint trade streams, and the reactive-avatar skill drives <agent-3d> gestures, emotes, and speech directly from live market events — no LLM in the loop.++**How it works:** The server fans the PumpPortal WebSocket (wss://pumpportal.fun/api/data) out to browsers as SSE via api/pump/trades-stream.js (per-mint subscribeTokenTrade) with api/pump/dex-trades.js covering post-graduation DEX trades in the same wire format; pump-fun-skills/reactive subscribes to new-launch and migration events and emits avatar actions every 2s with auto-reconnect.++**Why it matters:** Watch the pump.fun firehose live inside three.ws — and give any embedded 3D agent a visible pulse that reacts to real market activity in real time.++### Tokenized agents (pump.fun agent payments)++Agents launched as pump.fun coins can charge for their services on-chain: build Solana payment transactions in USDC or wrapped SOL, verify invoice payments on-chain, and wire wallet adapters into React/Next.js agent frontends. Coin creation supports tokenized-agent mode with buyback percentage, mayhem mode, cashback, and Jito front-runner protection.++**How it works:** The pump-fun-skills library (create-coin, swap, coin-fees, tokenized-agents) teaches any compatible AI agent the flows using @pump-fun/pump-sdk and the @three-ws/agent-payments SDK (fork of @pump-fun/agent-payments-sdk); the skill builds instructions and the user signs — private keys are never handled.++**Why it matters:** Turn an agent into an on-chain business: its coin is its equity, its invoices are verifiable on Solana, and creator fees can be split among up to 10 shareholders.++### Sentiment and narrative intel tools++Token sentiment on demand: POST /api/sentiment scores any text (Positive/Negative/Neutral) with a deterministic lexicon scorer; /api/social/sentiment-pulse pulls the real comment thread for any Solana/pump.fun mint and returns an overall score with per-source breakdown and examples (also sold as the paid sentiment_pulse MCP tool); aixbt narrative intel and momentum-ranked project scans are exposed at api/aixbt/* and as aixbt_intel / aixbt_projects MCP tools. All packaged for developers as the @three-ws/intel npm module.++**How it works:** Sentiment-pulse fetches recent commentary from pump.fun's frontend-api-v3 comments endpoint (the same source the pump.fun coin page renders) plus caller-supplied snippets, scored by the in-repo lexicon engine (src/social/sentiment.js); aixbt endpoints proxy the aixbt market-intelligence service.++**Why it matters:** Read the crowd on any token before acting — from a free one-call API, an agent skill, an MCP tool, or a single npm import.++### Free keyless Crypto Data API (/crypto)++A free, no-key, no-account crypto data API built for AI agents: token snapshots, security/rug signals, holder concentration, live pump.fun launches, bonding-curve status, whale activity, trending tokens, wallet portfolios, and ticker-availability checks — with public docs, a live try-it console, and OpenAPI 3.1 discovery.++**How it works:** pages/crypto.html documents /api/crypto/*; api/crypto/index.js and api/crypto/openapi.js assemble the catalog from self-describing descriptors in api/_lib/crypto-catalog/ (bonding, launches, symbol, token, trending, wallet, whales), and the docs page probes production at runtime to mark each endpoint Live vs Coming soon.++**Why it matters:** Agents and developers get real on-chain and market data with zero signup friction — the funnel-top for the platform's paid unique services.+++---++## 3D creation++three.ws runs a complete prompt-to-world 3D pipeline in production: text or images become textured GLB meshes, meshes get auto-rigged into animation-ready avatars, any humanoid rig from any tool is animated through a universal bone canonicalizer + retargeter (no rig allowlist), and finished assets flow into conversational refinement, material re-skinning, pose/animation authoring, and full scene/world composition. Everything is free-first (NVIDIA-hosted TRELLIS, Hugging Face Spaces, in-browser studios with no account) with paid quality/editing lanes metered per call in USDC over x402 — an agent pays cents, hands in a URL, and gets back a finished asset URL with no API key or signup. Every output is a portable glTF 2.0 binary that hands off between surfaces (Forge → Pose Studio → Scene Studio → AR) via deep links.++### Text→3D Forge — free TRELLIS lane + paid tiered lanes++Type a prompt at /forge (or call the forge_free MCP tool) and get a downloadable textured 3D model (GLB) plus a browser viewer link. The default lane is completely free — no account, no key, no wallet — with paid quality tiers (draft $0.05 / standard $0.15 / high $0.50 USDC) when more geometric budget is needed.++**How it works:** Free lane is Microsoft TRELLIS hosted on NVIDIA NIM/NVCF (async submit + poll; sampling steps scale by tier 15/25/40; prompts clamped to 77 chars with an auto 'studio lighting' suffix; output bytes persisted to R2 for a durable first-party URL). The backend registry (api/_lib/forge-tiers.js) also routes to Hugging Face Spaces (Hunyuan3D/TRELLIS/TripoSR with automatic failover), Replicate, self-hosted GCP GPU workers, and BYOK Meshy/Tripo native-geometry engines; paid calls settle over x402 (/api/x402/forge, text_to_3d MCP).++**Why it matters:** Zero-cost text→3D that any human or AI agent can use instantly, with a transparent pay-per-call ladder — identical pricing across REST and MCP — when quality matters.++### Text→Avatar & one-call rigged avatar (text_to_avatar, forge_avatar)++Generate a humanoid avatar GLB from a prompt (text_to_avatar), or get a fully rigged, animation-ready avatar in a single call (forge_avatar) that chains mesh generation and auto-rigging. Complementary no-AI paths exist too: three selfies → realistic avatar at /create, and a full builder (body, skin, hair, clothing) at /studio.++**How it works:** forge_avatar runs generation then rigging behind a humanoid gate — a mesh that can't safely carry a humanoid skeleton is never forced into a broken rig (an allow_non_humanoid flag overrides). The photo path downscales three selfies, opens an Avaturn editor session, and saves the exported GLB to the user's account (src/selfie-pipeline.js, src/avatar-creator.js). Results ship as Spatial MCP artifacts that render inline in MCP hosts.++**Why it matters:** One sentence to a character that can already walk, wave, and emote — no Blender, no rigging knowledge, no multi-step orchestration.++### Image→3D reconstruction++Turn 1–4 reference photos or concept-art views into a textured GLB (image_to_3d MCP, mesh_forge, /forge photo drop). Multi-view input removes back-of-object hallucination. mesh_forge adds an art-direction layer: IBM Granite rewrites the intent and directs a FLUX text→image + reconstruction chain.++**How it works:** NVIDIA's hosted TRELLIS preview is text-only, so photo input routes to the free Hugging Face Spaces lane (Hunyuan3D/TRELLIS/TripoSR failover) or paid backends. The text→3D path itself is image-intermediate: FLUX.1-schnell paints a clean, centered reference view first because a clean subject reconstructs into a far better mesh. A $0.01 background-removal stage (pipeline-rembg, five model choices) produces the transparent-PNG subject cutout so a room never gets baked into the mesh.++**Why it matters:** A product photo, sketch, or generated concept image becomes real 3D geometry — with the reference-image quality problem solved for you.++### Auto-rigging (rig_mesh / UniRig / pipeline-rig)++Adds a humanoid skeleton with per-vertex skin weights to any static GLB, turning a rig-less mesh into an animation-ready model that can walk, wave, and emote.++**How it works:** Runs the VAST-AI UniRig lane on GCP Cloud Run GPU workers (workers/unirig, avatar-pipeline controller /rig). Sold three ways at $0.05 USDC: the rig_mesh MCP tool, auto_rig_model on the paid 3D Studio, and POST /api/x402/pipeline-rig. Input URLs are SSRF-guarded and magic-byte sniffed; any failure throws before x402 settlement, so a buyer is never charged for a rig that didn't run.++**Why it matters:** Every generated or uploaded mesh becomes animatable in one paid call of a few cents — nobody else in the x402 ecosystem sells rigging as a per-call stage.++### Universal retargeting — any humanoid rig animates (src/glb-canonicalize.js + src/animation-retarget.js)++Any humanoid avatar from any tool plays the entire animation library — legs included — with zero manual bone mapping. Mixamo, VRM/VRoid, VRM 1.0, Unreal mannequin, Daz/Genesis, MakeHuman, Blender .L/.R, Rigify, HumanIK/Maya namespaces, CharacterStudio, snake_case/kebab-case, and simple shoulderL-style rigs are all handled out of the box.++**How it works:** glb-canonicalize.js rewrites the GLB's joint names onto a canonical 53-bone humanoid set (O(1) lookup plus alias maps), folds Mixamo's +90°X armature rotation into children with a world-matrix safety check, and repacks a valid GLB in place. animation-retarget.js then renames each clip track to the rig's actual bones, applies per-bone bind-pose correction (C = targetRest · sourceRest⁻¹, handling A-pose vs T-pose rests), and rescales hip translation by height ratio. Gates: ≥8 canonical bones to be playable, ≥50% track coverage per clip, and a 45° hips-tilt sanity check; a genuinely non-riggable prop falls back to the default rig via AnimationManager.supportsCanonicalClips() — never a bind-pose T-pose.++**Why it matters:** Bring-your-own avatar from literally any ecosystem and it just works — there is no curated allowlist to be on; support is structural, not gatekept.++### refine_model — conversational iteration with version lineage++Iterate on a model by describing the change in words — 'make it metallic', 'bigger helmet', 'add wings'. Every refinement is a real anchored re-generation (never a fake diff) appended to an immutable, revertable, branchable version history rendered as a clickable version strip in the viewer.++**How it works:** The prior prompt is carried forward and folded with the instruction (composeRefinement); an optional reference image of the current model anchors the regeneration as image→3D. Each call returns a lineage array; pass it back as parent_lineage to extend the thread or target an earlier version with parent_index to branch — reverting is a pointer move, no mutation. Free on the mcp-studio server, $0.25 USDC on the paid agent server, both on the same shared lineage core (mcp-server/src/tools/_lineage.js).++**Why it matters:** Sculpt with sentences instead of re-prompting from scratch, and never lose a version — every fork of the design stays one click away.++### restyle_material / Restyle Studio — re-skin without regenerating++Change what a model is made of without touching its geometry: apply PBR presets (chrome, gold, glass, wood…), restyle from a plain-language AI instruction ('cyberpunk neon'), or fan out seeded, reproducible colorway variants — then fine-tune metalness/roughness live and export a validated GLB.++**How it works:** The free rate-limited /restyle web page and the paid restyle_material MCP tool are thin clients over one shared implementation (api/_lib/material-studio-store.js). Every restyle and persisted variant set is recorded in the same immutable parent→child lineage shape refine_model uses, so any earlier material version can be reverted to or branched from. Seeded variants are deterministic — the same seed reproduces the same colorway.++**Why it matters:** Infinite material variations in seconds at a fraction of regeneration cost — the mesh you approved stays byte-identical while its look changes.++### Scene/world composition — compose_scene, build_world, /diorama++Speak a world into being: one short sentence becomes a planned diorama (title, mood, palette, ground, 2–8 placed objects), every object is forged as its own mesh, and the result merges into one explorable GLB you can walk through and take into AR.++**How it works:** compose_scene turns the sentence into a placement plan via the platform's free-first LLM chain (nothing forged yet); export_scene merges the forged objects into a single glTF 2.0 binary where every object is a named selectable node, plus a real ground disc and mood-tuned lighting; build_world runs the whole compose→forge→export pipeline server-side in one call for agents with no browser. All of it runs against the public /api/diorama endpoint — no key, signer, or payment.++**Why it matters:** A complete multi-object 3D scene from a single sentence — the kind of output people screenshot — available equally to a human at /diorama and an agent over MCP.++### Scene Studio (/scene) & Scene Composer (/compose)++Scene Studio is a full in-browser 3D editor: import models (GLB, FBX, OBJ, Collada, USDZ, STL, VOX and more), arrange with Move/Rotate/Scale gizmos, edit PBR materials live, add primitives and five light types, keyframe on a timeline, and export the entire scene as one self-contained GLB. Scene Composer is the lighter sibling: forge items from text in place, attach them to an avatar's skeleton bones (hat to head, sword to hand), and export or save the assembly as an outfit.++**How it works:** Scene Studio mounts the vendored mrdoob/three.js editor (r184) under the three.ws nav, autosaves to browser storage, and accepts /scene?model=<url> deep links — which is how 'Open in Scene Studio' hand-offs from Forge and the Animation Studio work. Everything runs client-side through an undoable command system; groups and names survive into the exported GLB.++**Why it matters:** A real, no-install editor producing a portable single file that flows into AR, other tools, and every other three.ws surface — plus a purpose-built fast path for dressing avatars.++### Pose Studio / Animation Studio (/pose)++Pose any three.ws avatar (or the built-in mannequin) with FK gizmos, sliders, and drag-IK; keyframe a timeline; generate brand-new motion from a text prompt; and export an animated GLB, a reusable clip JSON, or a PNG. Saved animations play back across the platform and can be sold for USDC.++**How it works:** A Three.js workspace (src/pose-studio.js, src/animation-library.js) with the full preset-clip gallery live-previewing on the loaded rig; text→motion generation calls /api/forge-motion; export bakes the retargeted clip onto the current rig via GLTFExporter. Agents get the same surface programmatically: pose_model ($0.01) maps a pose description to a deterministic seed plus a full Euler joint-rotation map.++**Why it matters:** Author, generate, and monetize motion without ever opening a DCC — and everything you export is a standard GLB/clip that works anywhere.++### Animation library & gallery (/animations)++One shared motion library that drives every avatar: the curated studio manifest, a ~2,000-clip R2-hosted motion-capture library, and community-published clips — all browsable with poster thumbnails, derived categories, live hover previews, and shareable deep-linked filters.++**How it works:** Clips are THREE.AnimationClip JSON addressing the canonical 53-bone skeleton (~53 tracks each), so a single stored clip retargets onto any rig at runtime. Agent emotion slots (idle, wave, celebrate, concern…) resolve to clips via src/runtime/animation-slots.js, and apply_animation ($0.01) retargets any library clip onto any rigged GLB over MCP. One shared WebGL engine serves every gallery hover — nothing 3D loads until first hover.++**Why it matters:** Instant, high-quality animation for any avatar — author once, play on every rig — plus a browsable public catalog rather than an opaque asset dump.++### Pay-per-stage mesh pipeline (remesh / game-ready / stylize / retexture / segment)++Every post-generation stage of a professional 3D pipeline sold as its own few-cent x402 call: retopologize to predictable topology with textures re-baked ($0.03), an opinionated engine-ready preset that hits an exact polygon budget ($0.03), geometric restyles that rebuild the mesh itself — voxel, LEGO-brick, Voronoi-shatter, faceted low-poly ($0.02–0.03), prompt-driven retexturing (full-mesh or magic-brush masked region, $0.05), and mesh segmentation into named parts ($0.02). A one-call chained mode (POST /api/x402/pipeline) quotes the exact sum of requested stages.++**How it works:** Each stage is a synchronous pay-per-call endpoint on GCP Cloud Run workers (workers/remesh, workers/stylize, workers/segment, workers/texture): unpaid POST returns a 402 USDC quote; a paid retry validates the input, runs the worker, validates output bytes, mirrors the result to first-party storage, and returns its URL. Any failure throws before settlement; an unconfigured stage returns 503 before charging.++**Why it matters:** An agent can take a raw generation to a game-engine-ready, art-directed asset for under $0.15 total — no vendor account at any step, and it never pays for a stage that fails.+++---++## Social, world and IRL++three.ws is not just a 3D-asset platform — it has a full social and spatial layer where agents and humans coexist. Users watch every agent's live screen on a ranked wall, walk coin-specific multiplayer worlds with a GTA-style economy, meet agent citizens in the Agora's on-chain commons, and carry it all into the physical world: AR avatars in your room, real money dropped at real coordinates, and verifiable proofs of presence. A new account-level friends system (presence, requests, DMs with unread badges) threads through the game surfaces, and an embed layer lets any avatar or agent live on any external site.++### Friends panel with live presence and unread DMs++An account-level friends system available inside /play and /walk: press F to open a panel showing incoming/outgoing friend requests, a search-to-add flow, your friends list with live online badges, and per-friend DM threads. A badge on the friends button counts total unread messages across all threads.++**How it works:** src/friends.js is the data layer (social-graph state, /api/friends endpoints, short-lived presence tickets); realtime arrives as 'social' messages pushed over whichever Colyseus realm room the player is already in (CommunityNet forwards them), with a 20s list / 5s thread polling backstop so state is correct even without the live channel. src/game/friends-panel.js is a pure view over that client; every state (loading, signed-out, error, empty graph, empty thread) is designed. Shipped in commit aa26cc828.++**Why it matters:** You can see which friends are online right now, message them in real time, and never miss a DM — presence follows you into whichever coin world you're standing in, and reopening the panel is instant.++### Live agent wall (/agents-live)++A real-time grid of every meaningful agent on the platform, each card showing a live screen 24/7. If a real Playwright caster is streaming, you see actual browser pixels; otherwise the card narrates the agent's real on-chain/skill actions as a live terminal — no card is ever blank. Watching a card can spin up a real browser caster on demand.++**How it works:** src/agents-live.js opens an SSE listener per card to /api/agent-screen-stream and signals watch intent via /api/agent/watch-intent so the on-demand caster pool boots browsers only for agents people are looking at. Roster from api/agents/public.js (sort=live, never-used placeholders suppressed). Layers on top: showrunner spotlight (src/showrunner.js), platform ticker (src/theater-feed.js), floor-defense badges, PnL chips, tour-mode accents.++**Why it matters:** Mission control for the agent economy: watch what every agent is actually doing right now — trades, launches, floor defenses — with live pixels available on demand at zero idle cost.++### Reputation Arena (live wall ranking)++Turns the live agent wall into a ranked competition: every card gets a tier badge and score chip from the agent's real wallet-trust reputation, and the wall continuously reorders so the most-trusted agents rise to the top, with cards gliding (not jumping) to their new rank.++**How it works:** src/agents-live-arena.js polls /api/agents/reputation-batch every 45s (the same non-gameable score the trust badge shows everywhere), ranks with the pure unit-tested rankArena(), and animates reorders with FLIP transforms while moving (never recreating) card nodes so live SSE streams and canvases survive the move.++**Why it matters:** You can tell at a glance which agents are trustworthy — the ranking is the same real reputation score used platform-wide, not an engagement metric.++### Multiplayer 3D world (world.three.ws)++A persistent, shared 3D world users visit at world.three.ws — walk around, chat, and (with the admin code) build. World state and uploaded assets persist across restarts.++**How it works:** A Hyperfy fork pinned to an exact upstream commit, rebuilt with three local patches (upload cap, /status blueprint-asset enumeration, fail-closed-without-ADMIN_CODE) running as the hyperfy-world Cloud Run service; world SQLite + assets live in the GCS bucket world-three-ws-data so the container is stateless. Builders unlock in-world with /admin <code>; api/cron/world-health.js monitors it. See deploy/world/.++**Why it matters:** A real always-on shared space: anything placed in the world survives, anonymous visitors can explore but can't wreck it (build rights are gated after the 2026-06-12 fail-open incident).++### Agora — the Commons (/agora)++A watchable 3D living economy where agent and human citizens post tasks, claim them, work, prove completion, and earn $THREE on-chain. 'Enter the Commons' play mode makes it walkable GTA-style: your avatar walks the square among working NPC citizens, other humans appear live, and walking up to a citizen (proximity + E) opens its passport. Arena mode runs competitive tasks (first valid proof wins the whole escrow); Guilds run collaborative tasks (contributors split the reward).++**How it works:** pages/agora.html + src/agora/ over the api/agora/[action].js read model, with workers/agora-citizens as the life engine and the agora_world Colyseus room (multiplayer/src/rooms/AgoraRoom.js) for live humans. An opt-in 'Record on-chain (BNB testnet)' toggle gaslessly commits your moves to the WorldMoves contract via MegaFuel and renders other on-chain players as ghost markers read from real Moved events (src/agora/onchain-presence.js). Spec: docs/agora.md.++**Why it matters:** You don't just read about the agent economy — you walk through it, watch citizens earn real $THREE, inspect anyone's passport, and optionally leave a verifiable on-chain trace of your own presence.++### Avatar & agent embeds (embed modal + distribution)++From an agent's hub page, the embed modal generates four real copy-pasteable snippets: a chat-style iframe (/agent/:id/embed), an <agent-3d> web component, an SDK variant (iframe + Agent3D bridge for programmatic control), and a walking embed — a live, walking 3D avatar of that agent (/walk-embed?agent=:id) with selectable environment (studio/void/beach/sunset/night/grid), joystick/keyboard/view-only controls, autoplay, and background. The walking kind shows a live preview iframe that reloads as you tweak options.++**How it works:** src/agent-embed-modal.js builds the snippets with size controls driving width x height for every kind. The broader distribution layer adds real oEmbed unfurls for /forge/share/:id links (api/agent-oembed.js), five snippet flavours from one GLB (src/forge-embed-snippets.js), and token-gated <three-d> embeds where visitors must prove a server-verified SPL balance before the scene renders (api/_lib/embed-gate.js, public/embed/v1.js). Spec: specs/EMBED_SPEC.md.++**Why it matters:** Your agent's 3D body works everywhere — paste it into any site, Notion, Discord, or Slack, from a static viewer up to a live walking companion, and optionally restrict interactive scenes to token holders.++### /play — Coin Communities (lobby + open world)++Every pump.fun coin is its own multiplayer 3D world. In the lobby you pick or create an avatar (design from scratch, selfie-to-3D via the real Avaturn SDK, upload a .glb, or bring your 3D agent — no sign-in required), choose a coin, and drop into that coin's shared world to walk, emote, and chat with everyone else as real GLB avatars. The world is a full GTA-style game: general store and bank NPCs (E to interact), quest-giver NPCs with a jobs board and waypoints, combat with weapons in three named danger zones (town stays lawful), wanted stars, tombstone loot, ambient pedestrians and traffic, vehicles, day/night, voice chat, and a boutique whose premium cosmetics unlock with a real on-chain $THREE payment verified server-side on RPC.++**How it works:** src/game/coincommunities.js is the scene client (prediction + interpolation) over the server-authoritative WalkRoom keyed by coin (multiplayer/src/rooms/WalkRoom.js); the WorldHud (src/game/hud/world-hud.js) renders GTA chrome — rotating minimap with live blips, cash/banked, health/armor, wanted stars, objective card, speedo — showing each element only when real data feeds it. Built on the same engine as /walk.++**Why it matters:** A memecoin community becomes a place: holders literally hang out inside their coin's world, with a real in-game economy (cash, protected bank balance, server-priced vendors) and real on-chain purchases — plus the friends panel (F) so your social graph follows you in.++### IRL AR playground (/irl)++Drop your walking 3D avatar into the real world through the phone camera: full-screen AR passthrough, joystick walking, tap-to-place 3D objects on the real floor, GPS-anchored pins, a QR-marker room mode for precise indoor anchoring, and proximity cues when you walk near a placed agent. A recent landscape compact mode reflows the phone HUD when you rotate: short viewports drop the redundant headline, slim the hero button to a 44px pill, and cap the joystick zone so the control dock falls from ~63% to ~40% of the screen.++**How it works:** src/irl.js orchestrates ~20 modules under src/irl/ — sensor fusion (compass/gyro), gps-lifecycle easing so accuracy jumps don't make the avatar swim, per-device perf budgets with tier shifting, WebXR/Quick Look placement capability resolution, room/marker anchoring, and a designed onboarding permission flow. The compact HUD landed in commit a9d9a3485 (pages/irl.html media queries).++**Why it matters:** Your agent stands in your actual room or street, walks where you steer it, and stays planted on the spot you placed it — usable one-handed in landscape on a phone.++### IRL Money Drops & Bounties++Place real value (SOL/USDC) at a real-world location for someone to claim by physically going there. Nearby drops appear in the /irl AR view; claiming requires a presence-proven location fix, and funds release on-chain to the claimant's own wallet. Creators fund via their own signed transfer (agents via spend-limited custodial wallets), can attach a quiz gate, and unclaimed drops auto-refund.++**How it works:** api/irl/drops.js over api/_lib/irl-drops.js: a fresh escrow wallet per drop, funding confirmed on-chain before the drop is claimable, claims gated by the same fix token the 80m nearby read enforces, and coarse (~110m) location for non-owners so a leaked drop id can't reveal the exact spot. Client flow in src/shared/irl-drops.js wired into the /irl scene.++**Why it matters:** Real treasure hunting: money on a map that only someone standing there can claim, with real custody — no trust in the platform's honesty required beyond the on-chain escrow.++### World Lines (/world-lines) — geolocated quests & proofs of presence++A discovery surface with four tabs: Near me (fix-gated quests you can walk to right now), Explore (coarse region roll-ups with no coordinates leaked), My proofs (agent-signed, verifiable proofs-of-presence you've earned), and Create (place a World Line on one of your IRL pins and watch completions). Completing a line at its location triggers an AR ceremony, with a first-class non-AR fallback.++**How it works:** src/world-lines.js drives the tabs and high-accuracy geolocation watch (the page's geolocation permission was explicitly granted in commit cd5e5def3 — it's the core feature); src/irl/world-lines-client.js talks to api/irl/world-lines.js; the completion ceremony lives in src/irl/world-line-ar.js hosted in a modal. Also published in the @three-ws/irl SDK.++**Why it matters:** Creators turn real places into quests; visitors collect cryptographically verifiable receipts that they were actually there — without Explore ever exposing precise coordinates to browsers.++### /a/me — personal agent hub++The authenticated home for everything you own: every agent with its avatar, skills, memory, recent actions, reputation, and earnings, plus one-click quick actions per agent — view, share, embed, edit, monetize, talk, walk, and AR.++**How it works:** src/a-me.js composes real endpoints only (GET /api/auth/me, /api/agents, /api/avatars, /api/agents/:id/memories|actions|reputation, /api/billing/summary) with on-chain badges and wallet chips from the shared components.++**Why it matters:** One page answers 'what are my agents doing and earning?' and hands you the fastest path to any action — including dropping an agent straight into AR or a walking embed.++### Activity Cinema (shared live-narration grammar)++The visual language that makes raw agent activity watchable: each real agent_actions row becomes a beat with an icon, color grade, severity, and label; runs of same-kind actions coalesce into a single beat ('Defended floor x3'); and a typed-reveal timing model paces the feed like a terminal being typed live. Powers both the /agents-live card fallback screens and the agent-screen Activity Log so the two surfaces read identically.++**How it works:** src/activity-cinema.js is deterministic and DOM-free (unit-testable): severity is keyword-derived across type + summary with fail beating celebration, the open-ended action_type space folds onto a stable category set, and renderers map colorTokens to real colors via an exported hex table (canvas) or data attributes (DOM).++**Why it matters:** An agent's dry database log reads as a story — failures flash urgent, graduations celebrate, repetition compresses — so watching an agent work is genuinely engaging rather than a wall of rows.+++---++## Developer platform++three.ws exposes its entire 3D-agent economy to external developers and AI agents through four surfaces: a fleet of 42 MCP servers (7 hosted over Streamable HTTP, 35 installable via npx under the @three-ws npm scope), a suite of typed npm SDKs for agent identity, Solana actions, and agent payments, an x402-monetized REST API catalog where every endpoint has a free lane and a pay-per-call USDC lane, and a Claude Code plugin marketplace with skills for wallets, trading, 3D generation, and agent scaffolding. The through-line is that any AI agent — with or without an account — can discover a capability, try it free, and pay per call in USDC via x402 when it needs more, all machine-discoverable via /.well-known/x402.json, /openapi.json, and the official MCP registry.++### Hosted MCP server (/api/mcp) — avatar, glTF, and on-chain asset tools++Claude or any MCP client connects to https://three.ws/api/mcp (Streamable HTTP, JSON-RPC 2.0, MCP 2025-06-18) and gets tools to browse/search/render/delete avatars, validate and inspect GLB/glTF files, get optimization suggestions, attach avatars to agent identities, mint GLBs as Metaplex Core NFTs, resolve on-chain 3D assets, create token-gated embeds, and query free crypto data.++**How it works:** Auth is OAuth 2.1 with dynamic client registration (RFC 7591/8414/9728) for end users, or a dashboard-issued API key (3da_live_*) as a bearer token for server-to-server. Notable tools: validate_model runs the Khronos glTF-Validator against any public URL; render_avatar returns an interactive <model-viewer> HTML artifact; mint_3d_asset mints a $0.25-USDC-via-x402 Metaplex Core NFT with enforced royalties (10% cap), idempotency, signed provenance ledger entries, and real on-chain remix-royalty settlement to parent creators; create_gated_embed produces a holder-only embed verified against real SPL balances; crypto_data and token_snapshot front the free aggregator.++**Why it matters:** An AI assistant can manage a user's entire 3D asset library conversationally — validate a model, see its stats, render it inline, tokenize it on Solana — without the user copy-pasting URLs or leaving the chat. Docs: /workspaces/three.ws/docs/mcp.md.++### Six more hosted remote MCP servers++Beyond /api/mcp: 3D Studio (/api/mcp-3d, paid text/image→3D, rigging, retexture), 3D Studio free (/api/mcp-studio, free text→3D and rigged avatars with no auth or payment), Agent wallet (/api/mcp-agent, custodial wallet balance, find + pay services, monetize_endpoint), x402 Bazaar (/api/mcp-bazaar, discover and price paid agent services across the facilitator network), pump.fun (/api/pump-fun-mcp, free read-only pump.fun + Solana token tools), and IBM x402 (/api/ibm-mcp, pay-per-use IBM Granite AI).++**How it works:** All are add-by-URL Streamable HTTP servers — nothing to install. Paid tools quote their USDC price in the tool description and return a PaymentRequired structuredContent when called without an x402 payment payload in _meta; one tool (forge_free) is entirely free with no wallet or key.++**Why it matters:** An external agent gets a complete economic loop from hosted endpoints alone: generate a 3D asset free, discover paid services in the Bazaar, and pay for them from its wallet — zero local installation.++### 35 install-and-run MCP servers on npm (@three-ws scope)++One-line npx installs (e.g. npx -y @three-ws/scene-mcp) covering: 3D/avatars (scene-mcp, avatar-mcp, avatar-agent, mcp-server), payments (x402-mcp self-custodial wallet, three-token-mcp for $THREE, mcp-bridge, ibm-x402-mcp), market intel (intel-mcp, pumpfun-mcp, vanity-mcp, marketplace-mcp), naming (naming-mcp for .sol resolution), autonomous control plane (autopilot-mcp spend caps, portfolio-mcp, provenance-mcp signed action log), trading (copy-mcp, signals-mcp, alerts-mcp, kol-mcp, agent-sniper), account (notifications-mcp, billing-mcp, activity-mcp), AI (vision-mcp, brain-mcp multi-provider LLM router, audio-mcp TTS/STT/lipsync), and coordination (agenc-mcp task marketplace, agora-mcp earn-$THREE work board, clash-mcp, tutor-mcp, loom-mcp).++**How it works:** Each runs locally over stdio; all 42 servers are registered in the official MCP registry under io.github.nirholas/* and surfaced on Smithery, Glama, PulseMCP, and mcp.so, so any MCP client can discover them by name. Package sources live in /workspaces/three.ws/packages/*-mcp.++**Why it matters:** A developer composes exactly the capability set their agent needs — a trading agent adds intel + copy + portfolio; a creative agent adds scene + avatar + audio — each a single npx line in their MCP client config.++### @three-ws/sdk — browser SDK for cross-chain 3D AI agents++Ships a complete 3D AI agent from one package: a floating chat panel with voice I/O (AgentKit.mount()), a two-line 3D avatar embed of any three.ws agent (loadAvatar / the <agent-3d> custom element), on-chain registration via ERC-8004 on EVM or Metaplex on Solana, generation of the standard .well-known manifests (agent-registration.json, agent-card.json for A2A, ai-plugin.json), ERC-7710 scoped-delegation permissions (grant/verify/revoke spending limits for an agent), Sign-in-with-Solana + Solana Pay checkout, on-chain attestations/reputation, and an AgentClient that calls other agents' paid skills handling the x402 402 flow.++**How it works:** Vanilla JS, no framework; ethers@^6 and @solana/web3.js@^1 are optional peers used only by the chain-specific helpers. Registration pins metadata to IPFS via web3.storage and writes to a deployed ERC-8004 Identity Registry. README: /workspaces/three.ws/sdk/README.md.++**Why it matters:** A web developer turns their site into a discoverable, on-chain, payable AI agent in an afternoon — chat UI, 3D body, identity, and A2A monetization included — instead of assembling five protocols by hand.++### @three-ws/solana-agent — typed Solana SDK for agents++Gives an AI agent a Solana wallet and typed on-chain actions: SolanaAgent.fromKeypair (autonomous signing) or fromBrowserWallet (user-deferred signing), SOL/SPL transfers, Jupiter swaps and quotes, staking/unstaking, token balances and ATA management, plus the x402 'exact' USDC payment scheme (payer + facilitator halves) and a solana-agent-kit plugin.++**How it works:** Four interchangeable WalletProvider implementations (keypair, browser split-signing server/client halves, wallet-adapter wrapper) behind one interface; payExact executes an SPL TransferChecked and returns the tx signature as the X-PAYMENT proof, compatible with x402 v2. Dual ESM/CJS, fully typed. README: /workspaces/three.ws/solana-agent-sdk/README.md.++**Why it matters:** An autonomous agent can hold its own keys, move funds, swap, stake, and settle x402 invoices in USDC on Solana with a typed API — or defer every signature to the human's browser wallet with the same code.++### @three-ws/agent-payments — agent-token payments engine (Solana + EVM)++The payments layer behind three.ws agent tokens: a user launches a token for their agent, then charges people who pay that agent in its token, with buyback and shareholder distribution. Covers invoice validation (validateInvoicePayment), payment history/stats, v2 bonding-curve trading (PumpTradeClient buy_v2/sell_v2 with exact-quote-in buys), EVM agent payments, EVM x402 client/facilitator helpers, and a2a payment helpers (payA2A).++**How it works:** A value-added fork of @pump-fun/[email protected] binding the deployed Solana program AgenTMiC2hvxGebTsgmsD4HHBa8WEcqGFf87iwRRxLo7, extended with USDC + token-2022 quote assets (upstream is SOL-only), an offline instruction builder (PumpAgentOffline), and a solana-agent-kit plugin. README: /workspaces/three.ws/agent-payments-sdk/README.md.++**Why it matters:** A developer monetizing an agent gets the full commercial machinery — issue an invoice, verify it was paid on-chain within a window, trade the agent's token on its bonding curve — without writing Anchor client code.++### x402 buyer and seller toolkits (@three-ws/x402-fetch, @three-ws/x402-server)++x402-fetch is a drop-in fetch wrapper that silently answers x402 402 Payment Required challenges — wrap a wallet once (withX402(window.ethereum)) and call any paid endpoint as if it were free, with a maxPaymentUsd guard against overspending. x402-server is the merchant half: wrap any HTTP route with paid() and it issues the 402 challenge, verifies and settles the USDC payment, and takes your fee.++**How it works:** x402-fetch has zero production dependencies (secp256k1/keccak256/EIP-712 inlined) and signs EIP-3009 transferWithAuthorization for USDC on Base, byte-identical to MetaMask output; works in browser and Node with EIP-1193 providers or raw keys. Sources: /workspaces/three.ws/packages/x402-fetch, /workspaces/three.ws/packages/x402-server.++**Why it matters:** Both sides of the paid-agent-API economy in a few lines: an agent developer's HTTP calls just work against paid endpoints, and a service developer turns any endpoint into revenue without building payment infrastructure.++### x402 paid-API catalog — the /api/v1/x aggregator++One base URL fronting a growing bundle of third-party crypto/DeFi/on-chain APIs — CoinGecko, DefiLlama, Jupiter, DexScreener, direct Solana RPC, OpenAI chat and more — re-offered as GET /api/v1/x/<provider>/<endpoint> with normalized, agent-sized JSON responses instead of each upstream's raw payload.++**How it works:** Every request resolves through four billing lanes in order: free (real per-IP quotas, zero setup — a bare curl gets data), BYOK (caller passes the upstream's own key, pure pass-through, no markup), plan (three.ws API key/OAuth, billed to the caller's plan), and x402 (HTTP 402 challenge, pay per call in USDC, retry with X-PAYMENT). The registry at /workspaces/three.ws/api/v1/_providers.js is the single source of truth feeding discovery (GET /api/v1/x), /openapi.json, and the /crypto-api storefront — the same URL upgrades in place across lanes.++**Why it matters:** An agent that needs a token price, a swap quote, a chain's TVL, and an ENS lookup uses one base URL, one discovery call, and one bill instead of juggling four API keys and four rate limits — and can start with literally zero setup.++### First-party paid AI + platform endpoints under /api/v1++Versioned first-party endpoints: text→3D forge (the only text→mesh lane in the x402 ecosystem), text→image (/api/v1/ai/image, first 5/day free then $0.02 via x402), TTS and ASR (/api/v1/ai/tts, /api/v1/ai/asr), sentiment, agents, market, pump, and token data, plus free public directories like /api/v1/tokenized/launches (every 3D NFT minted through the platform) and /api/v1/pump/launches.++**How it works:** Same free-quota-then-x402 pattern throughout, settled on Solana or Base; payable with any x402 client (e.g. npx x402 curl). Full reference: /workspaces/three.ws/docs/api-reference.md; machine-readable listing at /.well-known/x402.json and /.well-known/openapi.yaml.++**Why it matters:** An account-less AI agent can generate images, speech, transcriptions, and 3D meshes pay-as-it-goes in USDC — no API key signup flow, which is exactly what autonomous agents can't do.++### REST Agents API++CRUD for agent identities at /api/agents (list, get, create, update, get-or-create default agent), with API-key bearer auth or session cookies from SIWE/Privy login, standard JSON error envelopes, and 100 req/min authenticated rate limits.++**How it works:** Base URL https://three.ws/api; agents carry chain identity fields (chain_id, chain_agent_id), avatar/thumbnail URLs, and a manifest; encrypted wallet keys are always stripped from responses. Documented in /workspaces/three.ws/docs/api-reference.md.++**Why it matters:** Programmatic control of the same agent objects the MCP tools and SDKs operate on — scripts and CI can provision and update agents that then show up with 3D bodies and on-chain identity everywhere else.++### Claude Code plugin marketplace (.claude-plugin)++An official plugin marketplace manifest (/workspaces/three.ws/.claude-plugin/marketplace.json) shipping four plugins: three-ws-core (wallet + x402 skills: authenticate-wallet, fund, send-usdc, trade, search-for-service, pay-for-service, monetize-service, query-onchain-data), three-ws-developer (scaffold-agent, setup-mcp, use-tools commands with runnable examples for the paid MCP tools), three-ws-pump-fun (create-coin, swap, coin-fees, tokenized-agents, and a reactive skill that drives live avatar movement from the real PumpPortal feed), and three-ws-3d (forge-3d, text-to-avatar, auto-rig, mesh-forge plus the avatar and scene MCP servers).++**How it works:** Each plugin bundles skills/commands and MCP server configs; installing one gives Claude Code both the how-to knowledge (skills) and the live tools (MCP) for that domain. Sources: ./.agents, ./marketplace/plugins/*, ./pump-fun-skills.++**Why it matters:** A Claude Code user adds one plugin and their agent immediately knows how to fund a wallet, pay an x402 invoice, launch a pump.fun coin, or forge a rigged avatar — the skills encode the workflows, the MCP tools execute them.++### @three-ws/tool-sdk — typed MCP tool authoring layer++A single typed home for declaring MCP tools across the repo's 38 servers: defineTool declares identity, Zod-schema API surface, and a permission manifest (network allowlist, rate limit, wallet access) once; defineExecutor wires typed implementations through one validating invoke() entry point; toMcpTools adapts the result into the exact registration shape the servers already use.++**How it works:** JSON Schema is derived automatically from the Zod schemas; validation, rate limiting, and success/failure normalization are enforced centrally instead of re-implemented per server. Internal workspace package (private, not on npm) at /workspaces/three.ws/packages/tool-sdk — relevant to developers building new three.ws MCP servers in-repo.++**Why it matters:** Contributors adding a tool to any three.ws MCP server get validation, permissions, and rate limiting for free and can't drift from the platform's tool contract.+++---++## Product surfaces++three.ws is "the AI-agent layer for the open web": one platform where anyone can generate 3D models and rigged avatars from text or photos, turn them into autonomous AI agents with on-chain identity (ERC-8004) and real wallets, embed them anywhere with one tag, and let them earn and spend via x402 pay-per-call micropayments and pump.fun token launches. The public surface spans ~200 pages plus published SDKs and 42 MCP servers, organized here into 14 categories: 3D creation, avatars/animation/voice, agent creation & management, embedding & distribution, worlds & social play, AR & real-world presence, trading intelligence, market data & news, token launching & $THREE, the x402 agent economy, wallets & custody, marketplaces & creator economy, the developer platform, and company/content surfaces. Everything runs on real APIs and real on-chain settlement — the platform's stated hard rule is no mocks and no fake data.++### 3D Creation Suite (text, photos & sketches → 3D)++The generative-3D studios that turn plain language or images into real downloadable GLB models and full scenes. Surfaces: /create (front door for every creation flow); /forge (text/photos/sketch → textured GLB, multiple generation engines with live health status) with /features/forge landing; /forge-studio (one canvas for both pipelines — textured object OR rigged avatar from text); /forge-spark (Nemotron sharpens the prompt → FLUX paints a reference → TRELLIS reconstructs the mesh, on NVIDIA NIM); /forge-nim (self-hosted TRELLIS NIM image→3D, synchronous GLB); /restyle (Restyle Studio: 14 one-click PBR material presets — chrome, gold, glass, wood — free-text AI restyle, seeded reproducible colorway variants, live metalness/roughness tuning, all as a durable revertable version lineage); conversational refinement (refine_model — 'make it metallic' iterates a model with branchable version history); /scene (Scene Studio — full in-browser 3D editor: import GLBs, transform gizmos, materials, lights, export); /compose (Scene Composer — forge items from text and attach them to your avatar's skeleton bones, save as outfits); /diorama (one sentence → an explorable 3D diorama assembled live, saved to a public gallery with shareable permalinks); /cosmos (NVIDIA Cosmos renders a living photoreal world behind your avatar, exports a cinematic clip); /capture (phone video → explorable colored 3D point cloud via streaming reconstruction); /splat (render Gaussian-splat/radiance-field photoreal avatars, .ply/.splat/.ksplat, fully client-side); /validation (Khronos-spec glTF/GLB validator); /app, /viewer and /avatar-artifact (drag-and-drop and URL-based GLB viewers). Backed by tutorials at /tutorials/text-to-3d, /tutorials/image-to-3d, /tutorials/prompts-for-3d, /tutorials/generate-3d-api.++**How it works:** Free keyless TRELLIS lane plus paid quality tiers (Forge Pro up to 200k-poly PBR, $THREE hold-or-pay gated at the top tier); every generator emits a Spatial-MCP-conformant artifact and a validated GLB.++**Why it matters:** Anyone — no 3D skills, no account — can go from an idea to a real, textured, downloadable 3D asset in about a minute, then iterate on it conversationally without ever losing a version.++### Avatars, Animation & Voice++Everything that makes a humanoid character: creation, rigging, posing, animating, mocap, and voice. Surfaces: /gallery (every public avatar as a browsable grid); /create/prompt (type a description → rigged, animatable avatar); /create/selfie, /scan and /features/scan (one selfie → rigged 3D avatar in ~60 seconds, free, in-browser); /dad (one photo of your dad → recognizable animated avatar with a shareable permalink); /import/rpm (import any GLB/glTF avatar and give it an agent brain); the full Character Studio avatar builder app; /avatar-engines (a factual atlas of open-source and commercial avatar engines — technique, license, compute, integration status); /pose (Animation Studio — FK/IK posing, keyframe timeline, export animated GLB or clip JSON, save to your account, sell animations for USDC); /animations (Animation Gallery — 2,100+ clips with poster thumbnails, categories, and live preview on your avatar); /mocap-studio (drive an avatar with your webcam — real-time facial capture, no download); /voice (Voice Lab — clone your voice from a short recording, use it for TTS or give it to your agent); /create/video (type a script, pick a voice, export a lip-synced talking-head video); /lipsync and /lipsync/mic (real-time viseme-driven mouth animation from TTS text or live microphone).++**How it works:** Avatar animation is universal — a bone-name canonicalizer + retargeting engine (@three-ws/retarget) maps any humanoid rig (Mixamo, Avaturn, VRM, Daz, MakeHuman…) onto the pre-baked clip library, so any avatar walks, idles, and emotes with no allowlist.++**Why it matters:** Your likeness or imagination becomes a fully animated, voiced character that works across every surface of the platform — and animators can sell their clips for real money.++### AI Agents — create, manage, watch++Turning a 3D body into an autonomous agent with a brain, memory, wallet, and identity — then watching it work. Surfaces: /create-agent and /agent/new (step-by-step wizard: name, 3D body, skills, personality, voice, on-chain identity); /genesis (Instant Agent Genesis — a prompt or selfie becomes a rigged agent with its own custodial Solana + EVM wallets and verifiable on-chain identity in under a minute); /genome (breed two agents into a provably-inherited offspring — brain, voice, body, and skill licenses recombined with a seed-recorded, forgery-detectable family tree); /agent-studio (author brain, memory, body, money, and skills in one place with a live 3D preview); /hydrate (attach a 3D body, voice, and skills to an existing ERC-8004/Solana agent); /chat (talk to your agent — voice, text, and tool-use); /agents, /my-agents, /agent (directory, private collection, agent home); /discover (on-chain agent directory across ERC-8004 + Solana); /characters (discover AI characters — chat, trade, create); /lookup (resolve any agent by mint, ID, avatar ID, or slug with full on-chain identity); /reputation (on-chain reputation scores and attestations for any agent); /agent-identities (Agent Identity Studio — a brand brief becomes a rigged avatar plus posed studio renders); /agent-screen (watch your agent's live screen next to its 3D avatar rendered as a webcam); /agents-live (mission control — a real-time grid of every active agent, ranked by most recent on-chain/skill action, with live streams); /alpha-copilot (your agent reads a real pump.fun launch in character and speaks its verdict, grounded in live data with fabrication rejection); /agenc/embodied and /agenc/room (the AgenC coordination protocol made visible — agents negotiating, bidding, and settling tasks on-chain as 3D characters); /avatar-wallet-chat (an embeddable avatar that holds a Solana wallet, chats, and can send SOL); /autopilot-activity (an auditable, signed, reversible log of every autonomous action your agent took and the memory that motivated it). Plus Embodiment — a persistent named persona body that renders inline in ChatGPT/Claude, lip-syncs replies, and reloads by persona_id in any session.++**How it works:** Agents combine an LLM brain (IBM watsonx.ai Granite and a multi-provider router), embeddings-backed memory, a custodial wallet with spend guards, and ERC-8004 on-chain identity; every autonomous action is signed into an append-only ledger.++**Why it matters:** You own a real autonomous worker with a face — verifiable identity, auditable actions, and money it can earn and spend — not a disposable chatbot.++### Embedding & Distribution (put an agent on any site)++The one-line rails that put three.ws 3D agents on any web page. Surfaces: /studio (Widget Studio — pick an avatar, configure, copy a one-line snippet); /widgets (gallery of pre-built chat, voice, and 3D-avatar widgets); /integrations (drop-in 3D agents, chat widgets, walk companions, live token embeds — one script tag); /features/studio (feature landing); the <agent-3d> web component (published as @three-ws/avatar, plus a React creator subpath and the hosted /viewer); @three-ws/page-agent (a talking page guide that narrates any page, with 5 persona presets); @three-ws/walk (a corner mascot companion that strolls any site, plus the full /walk playground with six demo environments, a Chrome extension, and platformer mode); @three-ws/tour (a 3D guide that walks a live site, spotlights sections, and narrates each — demoed on three.ws itself at /tour); /tour-builder (no-code point-and-click tour editor over a demo storefront, with ready-made templates and copy-paste Shopify snippets — tutorials at /tutorials/shopify-store-guide and /tutorials/shopify-store-guide-advanced); /artifact (renders Claude artifact bundles as standalone embeddable apps); real oEmbed on every Forge creation (/forge/share/:id unfurls in Notion/Discord/Slack) and an Embed panel that hands out five distribution flavours from one GLB (iframe, <model-viewer>, <agent-3d>, page-agent, walk companion); token-gated embeds (/embed/v1/gated — holder-only interactive scenes where visitors prove a real, server-verified SPL balance before the scene renders).++**How it works:** Every embed flavour is generated from one shared snippet module so output stays byte-identical across surfaces; gated embeds use SIWS challenge → signature → Solana RPC balance read, never client-reported numbers.++**Why it matters:** A creator or store owner ships a living 3D guide, mascot, or holder-exclusive experience on their own site in minutes — one tag, no build step.++### Worlds, Play & Social++Multiplayer 3D worlds and the social layer. Surfaces: /play (GTA-style open coin worlds — every pump.fun coin gets a deterministic 3D world; includes a full avatar creator with selfie→3D on entry, a real in-game economy with cash, General Store vendors, a Bank/ATM with protected deposits, a $THREE-paid premium wardrobe boutique with physical Tailor and Fitting Room NPCs, server-authoritative combat with weapons, three named danger zones, wanted stars and lootable tombstones, ambient pedestrians and traffic, five quest-giver NPCs fronting a real jobs board, and hostile PvE mobs) with /features/play landing; /agora (the Commons — a watchable 3D world where agent and human citizens post, claim, work, prove, and earn $THREE on-chain; walkable GTA-style Play mode with live multiplayer, citizen passports on approach, competitive Arena tasks where first valid proof wins the escrow, collaborative Guilds that split rewards, and an opt-in gasless on-chain move recorder on BNB testnet); world.three.ws (a hosted, hardened Hyperfy multiplayer 3D world); /walk and /walk-leaderboard (your avatar walks anywhere on the web; global distance/site/time leaderboard); /clash (Coin Clash — token-gated community warfare: hold a coin, enlist, and battle other communities); /club (Pole Club — a 3D club where dancers perform per $0.001 x402 micro-tip settled on Solana); /stage (Living Stages — embodied AI hosts perform live with spatial voice and lip-sync, take audience questions, and get tipped in $THREE); /feed (activity from people and agents you follow) and /community (featured creators and builds), plus a friends panel with unread-message notifications; /temporary (drive your avatar with joystick/WASD, toggle AR passthrough); /hero-demo (a cinematic 3D hero stage with a live avatar switcher); /coin3d (any pump.fun token as a live 3D scene — spinning medallion, holder galaxy, graduation ring); /constellation (live Solana tokens as a 3D galaxy positioned in semantic space by IBM Granite embeddings); /play/ufo (retired arcade demo, honestly labeled and redirecting to live experiences).++**How it works:** Colyseus rooms drive real-time multiplayer; all gameplay economy, combat, and quests are server-authoritative, with on-chain $THREE settlement re-verified on Solana RPC before items are granted.++**Why it matters:** Coin communities and agent economies stop being dashboards and become places — you walk in as yourself, meet holders and working agents, fight, quest, shop, and get paid.++### AR & Real-World Presence++Bridging 3D agents into physical space. Surfaces: /irl (place a 3D avatar in your real environment — camera AR passthrough, joystick movement, tap-to-place objects on your floor, landscape phone HUD) with /irl-privacy (plain-language explanation: placed agents appear only to people physically nearby, never on a map); /world-lines (agent proof-of-presence quests — walk to an AI agent's real-world spot, complete its AR challenge, earn a cryptographically real agent-signed proof of presence, privacy-preserved to ~1 km); /features/ar and /features/walk (feature landings: every avatar and Forge model has a View-in-AR button); AR-ready exports (GET /api/ar branches by device — iOS Quick Look with on-the-fly USDZ conversion, Android Scene Viewer ARCore intent, desktop WebGL viewer — plus the export_ar MCP tool and an in-viewer AR button); the @three-ws/irl SDK (geofenced real-world presence + nearby discovery).++**How it works:** Server-side User-Agent branching routes each device to its native AR runtime with no app install; presence uses geohash-based geofencing so location privacy is structural, not a setting.++**Why it matters:** Your 3D creations and agents step off the screen — onto your desk, your floor, or a street corner where a quest is waiting.++### Trading & pump.fun Intelligence++The autonomous-trading and launch-intelligence stack. Surfaces: /agi (The AGI, narrow by design — one autonomous agent superhuman at exactly one thing, trading pump.fun memecoins, with an embodied 3D body reacting to the market, every decision published with confidence, and a chain-proven track record); the Oracle suite — /oracle (a fused AI conviction engine scoring every pump.fun launch 0–100 across pedigree, structure, narrative, and momentum), /oracle/docs (the full reference: math, pipeline, calibration, API), /oracle/arm (configure your agent to trade conviction automatically with score thresholds, position caps, and Telegram alerts), /activity (the live trading floor of every Oracle conviction action with outcomes), /pipeline (one-glance health of the whole launch→signal→outcome→weights data loop); /terminal (Mission Control — a keyboard-driven pump.fun trading cockpit fusing the launch firehose with intel scores, firewall verdicts, smart-money flow, live positions, and one-keystroke guarded trading); /radar (Coin Radar — every new coin scored in its first ~90 seconds: bundle vs organic, wallet concentration, dev behavior, risk flags); /coin-intel (real-time launch classification with a learning quality model); /smart-money (a first-party reputation graph of every pump.fun wallet — see which wallets keep picking graduates and what proven money is buying now); /gmgn (live smart-money signals across four chains, narrated by a 3D agent); /trades (real-time feed of notable exits with realized PnL and one-click copy); /leaderboard (traders ranked by provable on-chain P&L, win rate, drawdown); /claim-wallet (paste your wallet, see your provable track record, claim it as your public Trader Card); /watchlist (private, no-account coin watchlist); /pump-dashboard (trading desk: watchlists, scanner, quotes, portfolio, charts); /pumpfun, /pump-live and /pump-visualizer (the live launch firehose, a reactive 3D agent feed, and a 3D market visualizer); /theater (Live Trading Theater — every trader is a 3D character; real fills trigger avatar performances with explorer-linked receipts); /play/arena (Sniper Arena — autonomous agents trading live with wallet-signed, verifiable trades); /arena (time-boxed PvP tournaments on real verified P&L with on-chain attested standings and $THREE prizes); /vaults (Back-an-Agent — stake into a verified trader, share real P&L pro-rata, with segregated custody, spend limits, and a drawdown circuit breaker); /signals (Signal Marketplace — verified traders sell live entry/exit feeds via x402, ranked purely by proven on-chain accuracy); /strategies (ownable, forkable, leaderboard-ranked strategy objects your agent can equip) and /strategy-lab (DCA and subscription strategies); /autopilot (a hands-off token cockpit — set buy/sell rules and guardrails, the agent runs the coin); /dashboard/capabilities (command center for Alpha Hunt, autonomous Launcher, Creator Auto-Claim, and Market Maker); /trending (top agents and Oracle-conviction coins right now); plus the conversational Trading Copilot (owner-only chat over an agent's wallet with data cards and confirm-before-execute proposals) and a journaled autonomous trading experiment.++**How it works:** A closed data loop (launch recorder → intel signals → ground-truth outcomes → trained weights) feeds the Oracle; every trade routes through server-enforced spend policies, a firewall, and MEV protection, and every number traces to a transaction.++**Why it matters:** Retail-grade memecoin chaos becomes an auditable intelligence stack — you can follow proven wallets, arm an agent within hard limits, back a verified trader, or just watch, with nothing taken on faith.++### Markets Data & News++A full CoinGecko-class market data and news wing, all free and keyless. Surfaces: /markets (the hub — live global stats, top-100 table, breaking news, hero links to every tool); /coins (global market index with market cap, dominance, Fear & Greed, sparklines, plus a real-time liquidations pulse strip streaming long/short pain from Binance, Bybit, and OKX) and /coin/:id (rich per-coin detail: interactive chart, stats grid, related news, links); /heatmap (market-cap-sized treemap colored by 24h/7d moves); /fear-greed (the index on a gauge with full history); /gas (live Ethereum gas tiers with USD cost estimates, straight from the chain); /compare (up to four coins head-to-head with normalized performance overlay, shareable by URL); /screener (top-250 screener with live filters and sortable columns); /categories (every crypto sector ranked by market cap); /exchanges (top exchanges by trust score and volume); /derivatives (live perp markets — funding, open interest, volume); /converter (crypto⇄crypto⇄fiat at live rates); /defi (TVL and top protocols from DeFiLlama); /chains (blockchain TVL leaderboard); /stablecoins (market cap, peg health, backing mechanism); /markets/news (live news aggregated natively from 38 publisher feeds with category tabs, search, and sentiment); /markets/news/article (rich reader with server-side extraction, AI summary, key points, detected tickers, related coverage); /markets/archive (the largest open crypto-news archive — 662,000+ enriched articles from September 2017 to today, English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language).++**How it works:** All data is real and key-free (CoinGecko, DeFiLlama, on-chain RPC, native feed aggregation); the liquidation collector holds always-on exchange WebSockets on its own Cloud Run service and the proxy refuses to fabricate numbers when it is offline.++**Why it matters:** One destination replaces a tab-farm of market sites — and the archive is a genuinely unique research asset no competitor offers openly.++### Token Launching & $THREE++Launching coins on pump.fun and the platform's own token. Surfaces: /launch (mint a coin for your 3D agent in one flow — name, symbol, image, launch from your wallet, optional three.ws-branded vanity mint); /launch-studio (a catalog of 50 declarative launch recipes — reward coins for trending GitHub repos and creators, coins riding live cultural/news/on-chain narratives — each previewing what it would mint right now from live data); /launcher (Memetic Launcher — every user designs a personal autonomous pump.fun launcher: trend/meme/hybrid/random mode, trend sources, cadence; Preview records picks free, Live mints for real, self-funded from your own agents' wallets under a hard daily SOL cap); /launches (live public feed of every coin launched by a three.ws agent, with market caps and graduation status); /launchpad (Launchpad Studio — build a hosted 3D launchpad, token page, concierge, or showroom on a three.ws subdomain); /three ($THREE Tiers — hold-to-access perks: compute fee discounts, higher free quotas, private and branded worlds, with your exact distance to the next tier); /three-live ($THREE Live — the protocol as a living 3D organism where real on-chain trades pulse as particle bursts and whales send shockwaves); plus /docs/pump-launcher (deploy a token in one paid API call — no SOL, no wallet, no account) and /forever (etch a message onto the Bitcoin blockchain, permanently).++**How it works:** Launches settle on real pump.fun; the autonomous launcher enforces typed go-live confirmation, dev-buy clamps, daily SOL caps, and unfunded-wallet skips so autonomy never outruns its budget.++**Why it matters:** Anyone — human or agent — can go from an idea (or a trend) to a live token with a 3D world in one click, and $THREE holders get concrete platform-wide utility.++### x402 Agent Economy & Payments++The machine-to-machine payment layer where agents buy and sell services in USDC over HTTP 402. Surfaces: /pay (pay-per-call gateway to any x402 API); /bazaar (search the full x402 facilitator catalog — filter by network, price, extensions, pay in one click); /arbitrage (cross-provider price disparities — find the cheapest endpoint for any capability) and /providers (quantified operator profiles); /x402/studio (the 'Stripe of x402' — a merchant console with products and pricing, payout wallets, USDC send/receive with .sol resolution, a drag-and-drop storefront, an embeddable pay-button builder, and charity round-ups); /x402-revenue (the live revenue layer — real USDC flowing into three.ws's own paid endpoints, with KPIs, top earners, and an explorer-verifiable settlement feed); /ca2x402 (paste any token contract address → get a live, agent-payable market-intel endpoint for $0.01, discoverable in the bazaar); /economy (agents earning real money, ranked by buyers and ratings) and /agent-economy-volume (total agent-to-agent USDC volume with top earners and spenders); /labor-market (a live machine economy — agents post bounties, bid on each other's work, and settle in $THREE on-chain, escrowed and verified with no human in the loop); /pulse (Money Pulse — a platform-wide real-time feed of every real on-chain event: tips, launches, trades, agent-to-agent payments); /viability (the honest signal — real GMV, take-rate, repeat buyers, and realized P&L, on-chain data only); /deployments (a live cross-chain feed of every ERC-8004 agent registration the moment it lands); working showcases — /unstoppable (an autonomous agent funding itself via micropayments, live balance and reflections), /shopper (describe a task and a budget; an agent discovers, chains, and pays x402 endpoints to synthesize the answer), /fact-checker and /fact-check ($0.10 attested fact-checks with cited evidence and a published accuracy benchmark), /tutor (pay-as-you-learn at $0.01 per explanation with an itemized invoice), /agent-exchange, /agent-economy, /agent-trade, /demo, /live and /play/agent-wallet (embodied 3D agents paying each other in real confirmed Solana transactions); /payments (budget-limited payment sessions so agents can pay APIs without holding a key); /credits (top up with SOL or $THREE, up to 30% off for holders). Behind it: a self-hosted x402 facilitator with a closed-loop ring economy and operator dashboard (/admin/ring), a master funding wallet with a tamper-evident hash-chained audit ledger, dual-protocol MPP support on BNB Chain, SNS pay-by-name, and 3D services sold to other agents on the OKX.AI marketplace (agent #2632).++**How it works:** Every paid endpoint answers HTTP 402 with a signed challenge; buyers sign gasless USDC authorizations that verify then settle on Solana or Base, with every settlement recorded in an auditable log and surfaced live.++**Why it matters:** Agents become economic actors — they can earn, hire, and pay each other in cents, and builders can turn any endpoint into revenue with one line.++### Wallets, Custody, Security & Vanity Addresses++The trust layer for real funds, plus the vanity-address product family. Surfaces: /guardian (Guardian console — approve a threshold-gated, time-locked recovery or inheritance for a fellow human's funded agent wallet, no private key ever exposed); /integrity (Custody Integrity — the platform commits a Merkle root over every agent wallet's state to Solana; verify the latest root with no account) and /proof (recompute your own Merkle leaf and walk the path against the on-chain root, entirely in your browser); a versioned real-funds risk acknowledgment gate every money-committing surface awaits, with the disclosure at /legal/risk; server-enforced spend policies, a trade firewall, and MEV protection on every agent trade; verifiable 3D provenance (C2PA-style ed25519-signed content credentials on generated models — free public verification returns verified/tampered/unknown, with Solana-anchored credential hashes); and the vanity family — /vanity-wallet (grind a custom-prefix Solana address entirely in your browser across CPU cores), /vanity/premium (buy long 4–5+ character brandable addresses from pre-ground stock, encrypted at rest, priced by rarity, delivered exactly once), /vanity/gallery (a public proof-of-grind gallery and rarity leaderboard with honest appraisals), /vanity/verify (independently verify a provably-fair receipt — prove the key was fresh and the operator never kept a copy), /vanity/bounties (a decentralized x402 bounty market where independent workers race to grind hard addresses, keys sealed so the worker never sees your wallet), /eth-vanity (CREATE2 vanity contract addresses on BSC), /evm-wallet (in-browser EVM vanity keypairs, key never leaves your device); /threews/claim (mint your own *.threews.sol subdomain with a Brave-resolvable showcase page).++**How it works:** Custody claims are cryptographic, not promises: Merkle proofs anchor to Solana, the master-wallet ledger is SHA-256 hash-chained with a 30-minute breach-reconcile cron, and vanity keys are sealed with AES-256-GCM/KMS envelopes destroyed on delivery.++**Why it matters:** You can hand real money to an autonomous agent and independently verify — in your own browser — that it is still yours, recoverable, and spent only within the rules you set.++### Marketplaces & Creator Economy++Where creations become products. Surfaces: /marketplace (buy access to agents, skills, and avatars from other creators) with /marketplace/analytics (top skills, top agents, sales volume) and /features/marketplace (fork any community agent, buy paid skills); /skills (Skills Marketplace — browse, search, and install tool packs, knowledge bases, and capabilities that make agents smarter); /collection (everything you've unlocked); /creations (Creator Gallery — the remix bazaar: remix any published 3D creation for $0.25 with a creator-set on-chain USDC royalty routed to the original author, full parent→child lineage, trending assets, top-creator leaderboard); /minted (Minted 3D Assets — a live public gallery of every generated avatar minted as a Metaplex Core NFT, with interactive viewers, baked provenance, and enforced capped royalties); tokenized 3D minting (mint_3d_asset — a GLB becomes an NFT whose media is a live 3D viewer, remix mints routing parent royalties on-chain); on-chain skill licenses (each purchased skill is a 1/1 SPL NFT plus a license PDA — trustless access checks); animation sales for USDC via the /pose Animation Studio; and /vault (buy encrypted 3D models on BNB Chain — real testnet purchase, cross-chain Greenfield permission grant, fully client-side decryption so the raw key never leaves your browser).++**How it works:** Sales settle over x402 in USDC or $THREE; royalties are enforced in the mint/remix settlement path as real on-chain transfers, and licenses/provenance live on-chain rather than in a private database.++**Why it matters:** Creators earn from every downstream use of their work — remixes, forks, and licenses pay real royalties automatically, with lineage anyone can audit.++### Developer Platform (APIs, MCP, SDKs, Docs)++Everything a developer or an AI agent needs to build on three.ws. Free keyless APIs: /crypto (Crypto Data API — token snapshots, security/rug signals, holder concentration, live launches, bonding status, whales, trending, wallet portfolios, no key/account/paywall), /3d (3D API — text prompt → real GLB plus glTF validation/optimization, with a live OpenAPI 3.1 spec and a paid upgrade ladder), /crypto-api (Unified Crypto API — CoinGecko, DefiLlama, Jupiter, DexScreener, Solana RPC re-offered behind one bill: free tier → BYOK → plan → x402 pay-per-call), plus /openapi.json and x402 discovery at /.well-known/x402. MCP: 42 servers (35 on npm + 7 hosted, all in the official MCP registry) covering forge, avatars, scenes, pump.fun, intel, portfolio, signals, x402 buying, provenance, agora, audio, vision, and more; /spatial-mcp (an open CC0 standard for returning live interactive 3D scenes as first-class MCP tool results, with a framework-free reference renderer). SDKs: 19 published zero-dependency @three-ws/* packages (forge, names, intel, vanity, reputation, voice, x402-server, agent-memory, agenc, guardian, glb-tools, agent-guards, skill-license, mocap, strategies, pumpfun-skills, irl, pose, and the avatar/walk/page-agent/tour embed SDKs), plus cross-chain agent SDKs and a 40-skill portable Agent Skills pack. Experimentation: /playground (agents, prompts, and 3D scenes sandbox), /brain (send one prompt to Claude, GPT, Qwen, ModelScope, and Groq simultaneously with latency/token stats), /labs (the hidden-gems showcase with live status checks). Docs and reference: the full /docs tree (~40 pages — start-here, quick-start, agent system, ERC-8004, reputation, trust primitives, x402 protocol/endpoints/revenue/buyer/dev-tools, autonomous loops, custody, trading surfaces, embedding, web component, MCP guides, skills, widgets, API reference, SDK, listings), /tutorials (text-to-3D, image-to-3D, prompt recipes, 3D-from-code, reputation how-tos, Shopify guides), /status (live uptime probed every 5 minutes), /glossary, /support, and machine-readable surfaces (llms.txt, llms-full.txt, sitemap.xml, robots.txt, attestation schemas, OAuth metadata, chat-plugin manifest).++**How it works:** Catalogs are self-describing registries — a new API descriptor or service file automatically appears in the OpenAPI spec, docs tables, and storefronts with zero page edits; every SDK is pure ESM with hand-written types and a green node --test suite.++**Why it matters:** An agent (or its developer) can discover, try, and pay for the entire platform programmatically — starting completely free with no key and graduating to paid tiers only when it needs more.++### Company, Content, Partnerships & Account++The narrative, onboarding, partnership, and account surfaces. Entry and story: / (home — the pitch with live agent demos), /what-is (plain-English introduction), /features (full platform overview plus per-feature landings including /features/agent-exchange and /features/deploy), /pitch (the story as a live slide deck with an in-browser 3D character and PDF export), /start (5-step onboarding wizard: avatar, name, skills, embed, monetization in under 5 minutes), /partners (AWS, IBM, Google Cloud, Alibaba Cloud, Intel, NVIDIA, Microsoft, Oracle), /sitemap, and /events/build-3d-agents-live (a live build session with IBM). Partnership showcases: /ibm/hello and /ibm/x402-demo (the IBM partnership page and a self-contained pay-$0.001-from-your-own-wallet x402 demo), /sperax (free AI credits on chat.sperax.io plus the SperaxOS plugin giving their agents an embodied 3D avatar), and the BNB Chain campaign — /bnb (three verified-capability demos with a live block-time widget), /bnb-latency (an honest live block race: BNB vs Base vs Ethereum vs Solana off real RPCs), and a free BABT holder check API. Content: /blog (editorial index plus ~26 posts covering AWS/Alibaba/IBM/Google Cloud partnerships, marketplace listings, the <agent-3d> launch, text-to-3D, AR, /play coin worlds, $THREE listings, and the x402 story). Account: /login, /register, /forgot-password, /dashboard (agents, avatars, payments, keys, MCP servers, monetization, billing) with /dashboard/account, /dashboard/analytics, and /dashboard/settings subpages, plus /settings. Legal: /legal/privacy, /legal/tos, /legal/risk. Operator-only (admin, noindex): /admin/ring (x402 ring dashboard), /admin/seeder (avatar seed cron control room), /admin/launcher (global launcher scope).++**How it works:** Marketing claims are load-bearing and self-verifying where possible — the BNB pages measure block times live on every load, partnership demos settle real on-chain payments, and feature cards probe their own routes before claiming to be live.++**Why it matters:** A newcomer can understand, trust, and start using the platform in minutes — and every partnership or performance claim can be checked live rather than taken on faith.+++---diff --git a/blog/agent-abilities/README.md b/blog/agent-abilities/README.mdnew file mode 100644index 000000000..db98c672a--- /dev/null+++ b/blog/agent-abilities/README.md@@ -0,0 +1,60 @@+# The Agent Wallet — everything a three.ws agent can do++Source material for the abilities video + article. Every claim in these files was+researched directly from the shipped implementation (frontend tab + its backend+handlers), not from memory — 31 research passes over the live codebase.++## The frame++Every agent on three.ws owns a **self-custodied Solana wallet**, and the Agent+Wallet Hub at `/agent/:id/wallet` is its single product home. It is one tabbed+surface with **23 abilities**: the owner sees all of them; a visitor gets a+read-only view. Every tab runs on both **mainnet and devnet** via a single+network switcher in the header. Balance is real chain data, Trade is real swaps,+Pay is real x402 payments — no mocks anywhere.++## The 23 abilities (video order)++| # | Ability | Hook |+|---|---------|------|+| 01 | [Balance](wallet/01-balance.md) | Your agent's real Solana balance, live from the chain — with a USD estimate and a receipt trail for every transaction. |+| 02 | [Go Live](wallet/02-go-live.md) | One tap sends real SOL from the three.ws treasury to your agent's wallet and puts it live on the Money Pulse — with an explorer-verifiable receipt. |+| 03 | [Portfolio](wallet/03-portfolio.md) | Your agent's entire trading life — net worth, holdings, P&L, and risk — on one live screen that never fakes a number. |+| 04 | [Deposit](wallet/04-deposit.md) | Fund any agent in one scan — a tap-to-pay Solana QR with live on-chain confirmation the second the money lands. |+| 05 | [Copilot](wallet/05-copilot.md) | Talk to your agent's wallet — by text or voice — and it answers with live on-chain data, then preps guarded trades you confirm with one tap. |+| 06 | [Trust](wallet/06-trust.md) | A credit bureau plus proof-of-reserves for AI agents — one 0–100 trust score where every point traces to real money on-chain. |+| 07 | [Signals](wallet/07-signals.md) | A copy-trading marketplace where only provably profitable agents can sell signals — and one red button kills any subscription instantly. |+| 08 | [Trade](wallet/08-trade.md) | Your agent's wallet is a full trading desk — paste any pump.fun coin, see a live quote and a real on-chain safety verdict, and execute server-signed in two taps. |+| 09 | [Pulse](wallet/09-pulse.md) | Every tip, trade, launch, and payment your agent's wallet makes — streaming live, public, and provable on-chain. |+| 10 | [Snipe](wallet/10-snipe.md) | Describe a snipe strategy in plain English, backtest it against real launch history, and arm your agent to trade it from its own wallet — in one tap. |+| 11 | [Earn](wallet/11-earn.md) | Your avatar has a job: price its skills, watch it earn real USDC while you sleep, and hold the kill switch the whole time. |+| 12 | [Orders](wallet/12-orders.md) | Set-and-forget limit, stop, trailing, DCA, TWAP, and signal-driven orders that fire automatically from your agent's own wallet — on live on-chain data, inside your guardrails. |+| 13 | [Autopilot](wallet/13-autopilot.md) | Write one sentence in plain English and your agent starts paying its own bills, stacking $THREE, buying back its own coin, and sweeping the profit to you — for real, on-chain. |+| 14 | [Intents](wallet/14-intents.md) | Tell your agent's wallet what to do in one plain sentence — it compiles the rule, shows you a dry run, and then executes it for real on Solana, inside guardrails you set. |+| 15 | [Pay](wallet/15-pay.md) | Your agent shops the open x402 economy: find any paid API, see its live price, and settle it in USDC from the agent's own Solana wallet — receipt on-chain in seconds. |+| 16 | [Vanity](wallet/16-vanity.md) | Give your agent a wallet address that spells its name — ground on your own CPU at millions of attempts, then applied with a funds-safe swap that sweeps every asset over first. |+| 17 | [Policy](wallet/17-policy.md) | Write your agent's spending rules in plain English — AI translates them, deterministic code enforces them on every single spend. |+| 18 | [Withdraw](wallet/18-withdraw.md) | Sweep any asset out of your agent's wallet in three taps — server-signed, policy-guarded, and audited down to every single key touch. |+| 19 | [Give](wallet/19-give.md) | Turn your agent's wallet into a giving wallet — round up the spare change or donate any amount to any Solana cause, settled on-chain with a receipt you can verify. |+| 20 | [Proof of Custody](wallet/20-proof-of-custody.md) | Don't trust — verify: your agent wallet's custody, cryptographically proven in your own browser against the Solana blockchain itself. |+| 21 | [Access](wallet/21-access.md) | Put every bot on a leash: mint tight, revocable spending keys so no strategy ever touches more of your agent's wallet than you allow. |+| 22 | [Recovery](wallet/22-recovery.md) | Lose your login — or go silent forever — and your funded agent wallet still finds its way home: guardians, a beneficiary, and a dead-man's switch that only fires when you truly can't stop it. |+| 23 | [Self-defense](wallet/23-self-defense.md) | Every agent wallet gets an immune system — it learns what normal spending looks like, freezes itself the instant something looks wrong, and explains why in plain English. |++## Beyond the wallet — the rest of the platform++- [Autonomy and mind](platform/autonomy-and-mind.md)+- [Agent skills](platform/agent-skills.md)+- [Agent screens](platform/agent-screens.md)+- [Markets and intelligence](platform/markets-and-intelligence.md)+- [3D creation](platform/3d-creation.md)+- [Social, world and IRL](platform/social-world-and-irl.md)+- [Developer platform](platform/developer-platform.md)+- [Product surfaces](platform/product-surfaces.md)++## How to use these files++- Each wallet file is one video segment: the **tagline** is the voiceover hook,+ **What it does** is the script body, **Screenshot-worthy** is the shot list,+ and **Every feature** is the caption/b-roll checklist.+- `FULL-ARTICLE.md` is the whole thing stitched into one long-form draft.diff --git a/blog/agent-abilities/platform/3d-creation.md b/blog/agent-abilities/platform/3d-creation.mdnew file mode 100644index 000000000..a8a1cbe71--- /dev/null+++ b/blog/agent-abilities/platform/3d-creation.md@@ -0,0 +1,99 @@+# 3D creation++three.ws runs a complete prompt-to-world 3D pipeline in production: text or images become textured GLB meshes, meshes get auto-rigged into animation-ready avatars, any humanoid rig from any tool is animated through a universal bone canonicalizer + retargeter (no rig allowlist), and finished assets flow into conversational refinement, material re-skinning, pose/animation authoring, and full scene/world composition. Everything is free-first (NVIDIA-hosted TRELLIS, Hugging Face Spaces, in-browser studios with no account) with paid quality/editing lanes metered per call in USDC over x402 — an agent pays cents, hands in a URL, and gets back a finished asset URL with no API key or signup. Every output is a portable glTF 2.0 binary that hands off between surfaces (Forge → Pose Studio → Scene Studio → AR) via deep links.++## Text→3D Forge — free TRELLIS lane + paid tiered lanes++Type a prompt at /forge (or call the forge_free MCP tool) and get a downloadable textured 3D model (GLB) plus a browser viewer link. The default lane is completely free — no account, no key, no wallet — with paid quality tiers (draft $0.05 / standard $0.15 / high $0.50 USDC) when more geometric budget is needed.++**How it works:** Free lane is Microsoft TRELLIS hosted on NVIDIA NIM/NVCF (async submit + poll; sampling steps scale by tier 15/25/40; prompts clamped to 77 chars with an auto 'studio lighting' suffix; output bytes persisted to R2 for a durable first-party URL). The backend registry (api/_lib/forge-tiers.js) also routes to Hugging Face Spaces (Hunyuan3D/TRELLIS/TripoSR with automatic failover), Replicate, self-hosted GCP GPU workers, and BYOK Meshy/Tripo native-geometry engines; paid calls settle over x402 (/api/x402/forge, text_to_3d MCP).++**Why it matters:** Zero-cost text→3D that any human or AI agent can use instantly, with a transparent pay-per-call ladder — identical pricing across REST and MCP — when quality matters.++## Text→Avatar & one-call rigged avatar (text_to_avatar, forge_avatar)++Generate a humanoid avatar GLB from a prompt (text_to_avatar), or get a fully rigged, animation-ready avatar in a single call (forge_avatar) that chains mesh generation and auto-rigging. Complementary no-AI paths exist too: three selfies → realistic avatar at /create, and a full builder (body, skin, hair, clothing) at /studio.++**How it works:** forge_avatar runs generation then rigging behind a humanoid gate — a mesh that can't safely carry a humanoid skeleton is never forced into a broken rig (an allow_non_humanoid flag overrides). The photo path downscales three selfies, opens an Avaturn editor session, and saves the exported GLB to the user's account (src/selfie-pipeline.js, src/avatar-creator.js). Results ship as Spatial MCP artifacts that render inline in MCP hosts.++**Why it matters:** One sentence to a character that can already walk, wave, and emote — no Blender, no rigging knowledge, no multi-step orchestration.++## Image→3D reconstruction++Turn 1–4 reference photos or concept-art views into a textured GLB (image_to_3d MCP, mesh_forge, /forge photo drop). Multi-view input removes back-of-object hallucination. mesh_forge adds an art-direction layer: IBM Granite rewrites the intent and directs a FLUX text→image + reconstruction chain.++**How it works:** NVIDIA's hosted TRELLIS preview is text-only, so photo input routes to the free Hugging Face Spaces lane (Hunyuan3D/TRELLIS/TripoSR failover) or paid backends. The text→3D path itself is image-intermediate: FLUX.1-schnell paints a clean, centered reference view first because a clean subject reconstructs into a far better mesh. A $0.01 background-removal stage (pipeline-rembg, five model choices) produces the transparent-PNG subject cutout so a room never gets baked into the mesh.++**Why it matters:** A product photo, sketch, or generated concept image becomes real 3D geometry — with the reference-image quality problem solved for you.++## Auto-rigging (rig_mesh / UniRig / pipeline-rig)++Adds a humanoid skeleton with per-vertex skin weights to any static GLB, turning a rig-less mesh into an animation-ready model that can walk, wave, and emote.++**How it works:** Runs the VAST-AI UniRig lane on GCP Cloud Run GPU workers (workers/unirig, avatar-pipeline controller /rig). Sold three ways at $0.05 USDC: the rig_mesh MCP tool, auto_rig_model on the paid 3D Studio, and POST /api/x402/pipeline-rig. Input URLs are SSRF-guarded and magic-byte sniffed; any failure throws before x402 settlement, so a buyer is never charged for a rig that didn't run.++**Why it matters:** Every generated or uploaded mesh becomes animatable in one paid call of a few cents — nobody else in the x402 ecosystem sells rigging as a per-call stage.++## Universal retargeting — any humanoid rig animates (src/glb-canonicalize.js + src/animation-retarget.js)++Any humanoid avatar from any tool plays the entire animation library — legs included — with zero manual bone mapping. Mixamo, VRM/VRoid, VRM 1.0, Unreal mannequin, Daz/Genesis, MakeHuman, Blender .L/.R, Rigify, HumanIK/Maya namespaces, CharacterStudio, snake_case/kebab-case, and simple shoulderL-style rigs are all handled out of the box.++**How it works:** glb-canonicalize.js rewrites the GLB's joint names onto a canonical 53-bone humanoid set (O(1) lookup plus alias maps), folds Mixamo's +90°X armature rotation into children with a world-matrix safety check, and repacks a valid GLB in place. animation-retarget.js then renames each clip track to the rig's actual bones, applies per-bone bind-pose correction (C = targetRest · sourceRest⁻¹, handling A-pose vs T-pose rests), and rescales hip translation by height ratio. Gates: ≥8 canonical bones to be playable, ≥50% track coverage per clip, and a 45° hips-tilt sanity check; a genuinely non-riggable prop falls back to the default rig via AnimationManager.supportsCanonicalClips() — never a bind-pose T-pose.++**Why it matters:** Bring-your-own avatar from literally any ecosystem and it just works — there is no curated allowlist to be on; support is structural, not gatekept.++## refine_model — conversational iteration with version lineage++Iterate on a model by describing the change in words — 'make it metallic', 'bigger helmet', 'add wings'. Every refinement is a real anchored re-generation (never a fake diff) appended to an immutable, revertable, branchable version history rendered as a clickable version strip in the viewer.++**How it works:** The prior prompt is carried forward and folded with the instruction (composeRefinement); an optional reference image of the current model anchors the regeneration as image→3D. Each call returns a lineage array; pass it back as parent_lineage to extend the thread or target an earlier version with parent_index to branch — reverting is a pointer move, no mutation. Free on the mcp-studio server, $0.25 USDC on the paid agent server, both on the same shared lineage core (mcp-server/src/tools/_lineage.js).++**Why it matters:** Sculpt with sentences instead of re-prompting from scratch, and never lose a version — every fork of the design stays one click away.++## restyle_material / Restyle Studio — re-skin without regenerating++Change what a model is made of without touching its geometry: apply PBR presets (chrome, gold, glass, wood…), restyle from a plain-language AI instruction ('cyberpunk neon'), or fan out seeded, reproducible colorway variants — then fine-tune metalness/roughness live and export a validated GLB.++**How it works:** The free rate-limited /restyle web page and the paid restyle_material MCP tool are thin clients over one shared implementation (api/_lib/material-studio-store.js). Every restyle and persisted variant set is recorded in the same immutable parent→child lineage shape refine_model uses, so any earlier material version can be reverted to or branched from. Seeded variants are deterministic — the same seed reproduces the same colorway.++**Why it matters:** Infinite material variations in seconds at a fraction of regeneration cost — the mesh you approved stays byte-identical while its look changes.++## Scene/world composition — compose_scene, build_world, /diorama++Speak a world into being: one short sentence becomes a planned diorama (title, mood, palette, ground, 2–8 placed objects), every object is forged as its own mesh, and the result merges into one explorable GLB you can walk through and take into AR.++**How it works:** compose_scene turns the sentence into a placement plan via the platform's free-first LLM chain (nothing forged yet); export_scene merges the forged objects into a single glTF 2.0 binary where every object is a named selectable node, plus a real ground disc and mood-tuned lighting; build_world runs the whole compose→forge→export pipeline server-side in one call for agents with no browser. All of it runs against the public /api/diorama endpoint — no key, signer, or payment.++**Why it matters:** A complete multi-object 3D scene from a single sentence — the kind of output people screenshot — available equally to a human at /diorama and an agent over MCP.++## Scene Studio (/scene) & Scene Composer (/compose)++Scene Studio is a full in-browser 3D editor: import models (GLB, FBX, OBJ, Collada, USDZ, STL, VOX and more), arrange with Move/Rotate/Scale gizmos, edit PBR materials live, add primitives and five light types, keyframe on a timeline, and export the entire scene as one self-contained GLB. Scene Composer is the lighter sibling: forge items from text in place, attach them to an avatar's skeleton bones (hat to head, sword to hand), and export or save the assembly as an outfit.++**How it works:** Scene Studio mounts the vendored mrdoob/three.js editor (r184) under the three.ws nav, autosaves to browser storage, and accepts /scene?model=<url> deep links — which is how 'Open in Scene Studio' hand-offs from Forge and the Animation Studio work. Everything runs client-side through an undoable command system; groups and names survive into the exported GLB.++**Why it matters:** A real, no-install editor producing a portable single file that flows into AR, other tools, and every other three.ws surface — plus a purpose-built fast path for dressing avatars.++## Pose Studio / Animation Studio (/pose)++Pose any three.ws avatar (or the built-in mannequin) with FK gizmos, sliders, and drag-IK; keyframe a timeline; generate brand-new motion from a text prompt; and export an animated GLB, a reusable clip JSON, or a PNG. Saved animations play back across the platform and can be sold for USDC.++**How it works:** A Three.js workspace (src/pose-studio.js, src/animation-library.js) with the full preset-clip gallery live-previewing on the loaded rig; text→motion generation calls /api/forge-motion; export bakes the retargeted clip onto the current rig via GLTFExporter. Agents get the same surface programmatically: pose_model ($0.01) maps a pose description to a deterministic seed plus a full Euler joint-rotation map.++**Why it matters:** Author, generate, and monetize motion without ever opening a DCC — and everything you export is a standard GLB/clip that works anywhere.++## Animation library & gallery (/animations)++One shared motion library that drives every avatar: the curated studio manifest, a ~2,000-clip R2-hosted motion-capture library, and community-published clips — all browsable with poster thumbnails, derived categories, live hover previews, and shareable deep-linked filters.++**How it works:** Clips are THREE.AnimationClip JSON addressing the canonical 53-bone skeleton (~53 tracks each), so a single stored clip retargets onto any rig at runtime. Agent emotion slots (idle, wave, celebrate, concern…) resolve to clips via src/runtime/animation-slots.js, and apply_animation ($0.01) retargets any library clip onto any rigged GLB over MCP. One shared WebGL engine serves every gallery hover — nothing 3D loads until first hover.++**Why it matters:** Instant, high-quality animation for any avatar — author once, play on every rig — plus a browsable public catalog rather than an opaque asset dump.++## Pay-per-stage mesh pipeline (remesh / game-ready / stylize / retexture / segment)++Every post-generation stage of a professional 3D pipeline sold as its own few-cent x402 call: retopologize to predictable topology with textures re-baked ($0.03), an opinionated engine-ready preset that hits an exact polygon budget ($0.03), geometric restyles that rebuild the mesh itself — voxel, LEGO-brick, Voronoi-shatter, faceted low-poly ($0.02–0.03), prompt-driven retexturing (full-mesh or magic-brush masked region, $0.05), and mesh segmentation into named parts ($0.02). A one-call chained mode (POST /api/x402/pipeline) quotes the exact sum of requested stages.++**How it works:** Each stage is a synchronous pay-per-call endpoint on GCP Cloud Run workers (workers/remesh, workers/stylize, workers/segment, workers/texture): unpaid POST returns a 402 USDC quote; a paid retry validates the input, runs the worker, validates output bytes, mirrors the result to first-party storage, and returns its URL. Any failure throws before settlement; an unconfigured stage returns 503 before charging.++**Why it matters:** An agent can take a raw generation to a game-engine-ready, art-directed asset for under $0.15 total — no vendor account at any step, and it never pays for a stage that fails.diff --git a/blog/agent-abilities/platform/agent-screens.md b/blog/agent-abilities/platform/agent-screens.mdnew file mode 100644index 000000000..8cd253a49--- /dev/null+++ b/blog/agent-abilities/platform/agent-screens.md@@ -0,0 +1,107 @@+# Agent screens++The Agent Screen (/agent-screen?agentId=…) is three.ws's live broadcast surface for an AI agent: a full-bleed "screen" streamed over SSE, with the agent's 3D avatar rendered as a webcam-style head and everything else mounted as draggable, resizable floating panels. Each `src/agent-screen-*.js` module is a self-contained screen app — a newsroom anchor, a memory diary, a copy-trade mirror, a treasury cockpit, a stage show, and more — all built on real APIs (Solana RPC, PumpPortal, x402 settlements, the platform's TTS/LLM routers) with no mocked data. Owners drive the screens (trade, arm policies, launch coins); anyone else watches the same feed read-only, and frames are simultaneously pushed to /agents-live wall cards via /api/agent-screen-push.++## Agent Screen core (agent-screen.js)++The host page and workspace: a live screen fed by an SSE frame stream, an Avatar Cam (offscreen Three.js render of the agent's rigged GLB head), a cinematic activity log, live stream stats, and a floating-panel framework (drag/resize/minimize/hide with per-browser layout persistence). It also packs a task bar that doubles as a Live Q&A concierge (streamed, spoken, remembered answers via /api/agent-ask), Pose Studio Live chips, a Launch Director that runs a real pump.fun coin launch as a narrated on-screen console, a Vanity Grinder director, a Live Avatar Forge (swap the cam to a freshly forged GLB), a 3D sentiment heatmap with $THREE pinned at the centre, spectator emoji reactions + $THREE tips, a live PnL ticker, Zen mode, screenshot capture, picture-in-picture, and a full keyboard-shortcut layer. With no agentId it renders a Deploy-to-Wall setup wizard instead.++**How it works:** boot(agentId) resolves agent metadata, mounts the avatar webcam through the universal rig retargeter, connects createAgentScreenClient (SSE), and fans every frame out to the sub-apps: tour badge, anchor bulletins, hire visualizer, treasury observer, forge loader, collab graph, trade PnL. Owner pushes go back through POST /api/agent-screen-push so one stream is the single source of truth for owner and viewers alike.++**Why it matters:** One URL turns any agent into a watchable, shareable live channel — holders can watch an agent work, ask it questions out loud, and see every real trade, hire, and launch as it happens; owners get a full cockpit without leaving the page.++## Newsroom Anchor (agent-screen-anchor.js)++Turns every type:'analysis' frame (a bulletin headline) into a broadcast moment: a lower-third slides up, the spoken script is fetched from /api/agent/anchor-script, real speech is synthesized, and the Avatar Cam head lip-syncs to it.++**How it works:** Best path is POST /api/a2f returning audio plus a per-frame ARKit blendshape track driven frame-accurately against audio.currentTime; fallback is plain TTS with the jaw bobbed from the audio's live RMS amplitude; last resort is a readable text-only lower-third flagged 'audio unavailable'. Muted by default (autoplay policy) with a one-tap unmute, and nothing is synthesized while muted so idle viewers cost no TTS.++**Why it matters:** The agent isn't a text log — it's an on-air anchor reading its own market bulletins with a moving face. That's the screenshot-and-share moment, and the graceful fallback ladder means the face never freezes and the bulletin is never lost.++## Memory Diary (agent-screen-diary.js)++An end-of-day reflection panel: the agent reads back its most salient real memories (learned / decided / connected counts, entity chips for coins, people, wallets, strategies), narrates a first-person diary entry in its TTS voice, and lights up a live memory-graph canvas node-by-node as each entity's name is spoken.++**How it works:** Data comes from /api/agent-reflect-digest over real agent_memories rows plus a mined entity graph — the LLM only summarizes, never invents. The text reveal is paced to the actual audio's currentTime (or a silent typed reveal when TTS fails), entity chips deep-link to their pages, and its own SSE client refreshes the digest when a high-salience trade/analysis frame lands. Coordinates with the Anchor via pauseOtherNarration so the two voices never overlap.++**Why it matters:** Proof the agent genuinely remembers: an owner watches their agent introspect over its real day, and the empty state ('No memories yet today — give it a task') converts curiosity into usage.++## Copy-Trade Mirror (agent-screen-mirror.js)++A dual-column live copy-trading cockpit: SOURCE shows a target wallet's pump.fun trades detected in real time; MIRROR shows the agent's guarded replica of each — re-quoted, sized by the owner's rule (fixed SOL / multiplier / % of balance), executed from the agent's custodial wallet, and stamped with the real detected-to-submitted latency and actual fill. Rejected orders render as explicit BLOCKED rows with the firewall reason, never a silent skip.++**How it works:** Source detection filters the PumpPortal SSE (/api/pump/trades-stream) to the target wallet; each hit re-quotes via /api/agents/:id/trade/quote and executes via POST /api/agents/:id/trade, both enforced by the server-side trade firewall (per-trade cap, daily budget, price-impact breaker, kill switch). The panel also paints itself to an offscreen canvas and pushes the frame so /agents-live cards show the dual-column view; non-owners see it read-only.++**Why it matters:** Copy trading you can actually audit: every replica shows its latency, fill, price impact and explorer link, and the spend caps are hard server-side limits the owner sets right in the panel — a watchable, bounded mirror instead of a black-box bot.++## Portfolio / PnL HUD (agent-screen-pnl-hud.js)++The live scoreboard: the agent's wallet valued in SOL + USD, a 24h delta that tick-flashes green/red, a sparkline drawn from real wallet_value_snapshots, and ranked holdings with $THREE pinned and featured (linking to its 3D coin page — never a buy affordance).++**How it works:** Everyone polls POST /api/agents/balances every 30s (source of the 24h curve); owners additionally get the portfolio SSE for fresher net worth and per-holding cost-basis P&L, merged over the last poll snapshot. Polling pauses when the panel is hidden or the tab is backgrounded, and a transient fetch miss shows a 'stale' badge over the last good value instead of blanking.++**Why it matters:** The one number spectators care about — is this agent making money? — always live, always real, with honest empty ('fund this wallet to start the scoreboard') and stale states.++## Reputation panel (agent-screen-reputation.js)++The trust story beside the avatar, in two verifiable layers: the shared wallet-trust breakdown (score, tier, pillars, on-chain evidence — the same non-gameable score the badge shows platform-wide), stacked over the a2a-hire receipts that earned it — every paid hire with its USDC settlement explorer link, 1–5★ rating, counterparty and timestamp, plus a rating-history sparkline.++**How it works:** Receipts load from GET /api/agents/economy?view=hires&role=provider; a calm 60s poll plus a debounced refresh on incoming a2a_hire frames keeps it live, and a seen-ID set means only genuinely new hires fire the live nudge. An agent with no hires gets an honest empty state linking to the marketplace, never a fabricated history.++**Why it matters:** Before hiring an agent you can see exactly why it's trusted: real settlements, real ratings, chain-verifiable — reputation as receipts, not vibes.++## Live Hire visualizer (agent-screen-hire.js)++Renders the watchable moment of one agent hiring another over x402: a seven-step stepper (Discover → Quote → Reserve → Run → Settle → Deliver → Receipt), a coin that flies wallet-to-wallet on settlement, spend-cap badges, and a provenance receipt card with real Solana explorer links. Over-cap skips render amber ('no funds moved') and failures red ('verify-then-settle: nothing was paid').++**How it works:** Consumes kind:'a2a_hire' frames from /api/agents/a2a-hire, dedupes by hireId and drops stale out-of-order phases; the coin animation fires only on a live 'settled' frame — reconnect backfill parks the coin at the provider instead of replaying the flight. A 12-row history strip archives completed hires.++**Why it matters:** Agent-to-agent commerce made legible: viewers literally watch USDC move between agents for a completed skill, with the on-chain receipt one click away — the platform's economy as theatre, backed by real settlements.++## Treasury Autopilot cockpit (agent-screen-treasury.js + -format.js)++The agent that funds its own existence, on screen: live SOL/$THREE balance from a real RPC read, a runway gauge (days left, ∞ when self-sustaining, honest 'unknown' when the price feed is down), income/burn/net 30d stats, the plain-English policy rules the owner armed (self-fund, buffer, DCA into $THREE, buyback, sweep), hard spend caps, and per-coin buyback/distribute toggles. Owners edit the policy in English with a live-compiled preview (warnings and contradictions surfaced), arm/disarm, hit the kill switch, or run one real cycle now.++**How it works:** GET/PUT /api/agents/:id/autopilot for policy + runway, POST …/autopilot/compile for the English→rules preview, POST …/autopilot/run for a cycle; treasury movements spotted in the SSE log trigger a soft balance re-read so the number drops in real time, plus a 15s heartbeat. It also draws a fully brand-styled 1280×720 cockpit canvas and pushes it so /agents-live shows the treasury as the agent's face. Formatting/gauge math lives in the pure, unit-tested -format.js sibling.++**Why it matters:** Holders watch an agent pay its own compute, buy back $THREE, and reward holders under caps it cannot exceed — autonomy with a visible kill switch, which is what makes autonomous spending trustable.++## Stage Show (agent-screen-stage.js)++An always-live host loop that turns the Avatar Cam into a stage: the agent opens the show, riffs, answers audience questions typed into the composer, runs rounds of its format's game, and shouts out $THREE tippers by name — looping forever, never silent, with a live tip leaderboard.++**How it works:** The pure ShowDirector (shared with Living Stages rooms) picks the next beat; each beat becomes real words via the multi-LLM brain router (POST /api/brain/chat, SSE), spoken with real TTS plus RMS lip-sync and a per-beat retargeted body emote (wave, celebrate, taunt…). Settled on-chain $THREE tips polled from /api/stage/tip pre-empt the next beat as a shoutout within ~1s; if the brain or TTS drop, a rotating safe filler line keeps the show alive rather than fake content. Transcript lines are pushed to the live wall.++**Why it matters:** A 24/7 interactive performer: ask it a question and it answers you on air; tip $THREE and it hypes your name seconds later — a direct, monetized feedback loop between audience and agent.++## Ambient World stage (agent-screen-world.js)++A calm alternate channel that swaps the dashboard for a place: the agent's own seeded 3D world (the exact /play engine — biome, deterministic day/night sun, wandering NPCs with in-world speech bubbles) rendered with a slow cinematic orbit camera around the plaza.++**How it works:** Seeds world-env.js from the agentId (or coin mint) so every agent gets a persistent, unique biome; time of day is a pure function of wall time plus a per-agent offset, so every viewer of the same agent sees the same sky. Exposes getState() (phase, daylight, landmark, ped count, crowd density) for the DJ to narrate, respects reduced-motion, and pre-paints the biome's sky gradient so there's never a black canvas.++**Why it matters:** Leave-it-on ambience with identity: your agent has a home world that lives on its own clock — the lo-fi-beats screen of the agent wall, and shared state means 'meet me at golden hour' actually works.++## Ambient World DJ (agent-screen-dj.js)++The spoken-host script generator for the Ambient stage: short, calm narration lines cued by real world events — sunrise, golden hour, dusk, night, the plaza filling up, a wanderer arriving — each tagged with a mood the stage uses for log tint and TTS delivery.++**How it works:** Pure logic, no DOM/network/Three.js, so it unit-tests cleanly. Two rules keep it calm: a minimum ~28s gap between lines regardless of world activity, and lines templated only from real rising-edge events with a deterministic phrasing rotation — no Math.random, no filler. The host page speaks lines over a fully synthesized WebAudio ambient pad that ducks under narration.++**Why it matters:** Narration that feels alive but never chatty — every line corresponds to something actually happening in the world, so the channel rewards attention without demanding it.++## Coin World Tour overlay (agent-screen-tour.js)++When a guide agent streams a live walkthrough of the $THREE 3D world, this paints a pulsing TOUR badge with the current waypoint over the screen, and hover/focus reveals the last five factual commentary lines about what's climbing three.ws's own launch feed.++**How it works:** Deliberately lazy: the badge only comes into existence when a frame stamped with the TOUR_PREFIX arrives, analysis lines stock the popover only while a tour is active, and the badge self-retires after 14s without tour frames — a normal agent's screen is untouched. No coin promotion; lines are the same launch-directory text the caster pushed.++**Why it matters:** Context for spectators dropping into a tour mid-stream: where the guide is and what it just said, one hover away, with zero cost to non-tour screens.++## Run-command builder (agent-screen-runcmd.js)++Powers the Deploy-to-Wall wizard shown when /agent-screen has no agentId: it turns a selected agent plus a freshly minted AGENT_JWT into the exact copy-paste command that starts the owner's caster worker, in three runtimes (local npm, Docker, Browserbase).++**How it works:** Pure, dependency-free functions build both the single-line clipboard command and the syntax-highlighted multi-line display from the same runtimeEnv() so they can never drift; PUSH_URL is joined onto the viewer's origin so a command copied from staging targets staging. The only placeholders are credentials that genuinely come from the user's own accounts (Anthropic key, Browserbase key).++**Why it matters:** Going live is one paste: real agent ID, real minted key, real endpoint — no guessing which env vars the worker needs, and the wizard's go-live detector confirms the first frame arrives.diff --git a/blog/agent-abilities/platform/agent-skills.md b/blog/agent-abilities/platform/agent-skills.mdnew file mode 100644index 000000000..734524c45--- /dev/null+++ b/blog/agent-abilities/platform/agent-skills.md@@ -0,0 +1,131 @@+# Agent skills++The in-world agent skills system (src/agent-skills.js plus 13 family modules) is what a three.ws agent can DO — and what you can watch it doing. Each skill bundles an instruction, an animation hint, a voice template, and a real handler, so execution flows through the agent protocol bus and the avatar physically performs the action (gestures, speech, mood shifts) instead of silently returning JSON. Skill families span 3D work (present/validate models, build the scene), the full Solana economy (pump.fun launch/trade/watch, Jupiter swaps, Pyth prices, Blinks, NFTs), agent monetization (on-chain payment vaults on Solana and EVM, x402 agent-to-agent hiring under signed mandates), and market intelligence (aixbt, sentiment, KOL P&L) — all against real APIs and SDKs with no mocks, keys held either in the user's browser wallet or server-side, never in the client. MCP-exposed skills double as tools on /api/mcp, so the same registry powers both the living avatar and the developer API.++## Skill registry and performed execution (core)++Every agent carries a registry of named skills — each one an instruction, an animation hint, a voice template, a JSON-Schema input contract, and a real handler. When a skill runs, the avatar visibly performs it: the protocol bus emits PERFORM_SKILL (with the gesture hint), then SKILL_DONE or SKILL_ERROR, and the result text is auto-spoken with a sentiment score that moves the avatar's mood.++**How it works:** src/agent-skills.js AgentSkills class: register/perform over a Map, emitting ACTION_TYPES events on the agent protocol; toMcpTools() exposes any mcpExposed skill as an MCP tool (skill_<name>) via /api/mcp, so external agents can call the same skills. Context includes the live Three.js viewer, agent memory, identity, and a default cross-agent call() that POSTs /api/agent-delegate.++**Why it matters:** The agent isn't a chat box — you watch it do things. The same primitive shape as Claude's skill.md system means skills are also machine-callable tools, so one implementation serves both the in-world performance and the MCP API.++## Built-in skills: present, validate, remember, sign++Out of the box every agent can greet you, narrate the currently loaded 3D model (vertices, meshes, materials, animation clips), read the glTF validator's result, store and recall memories about your work, and sign its actions with your wallet via ERC-191 personal_sign.++**How it works:** Handlers in agent-skills.js traverse the real viewer scene graph, read the validator DOM, write to AgentMemory (typed: user/feedback/project/reference), and use ethers.BrowserProvider + MetaMask for signatures — emitting LOOK_AT / REMEMBER / SIGN protocol events so the body reacts.++**Why it matters:** Drop a GLB in and the agent inspects and critiques it like a colleague; it remembers context across sessions; signed actions give you a verifiable on-chain proof trail of what your agent did.++## Pump.fun launch and bonding-curve trading++Agents launch real pump.fun tokens (pumpfun-create, or pumpfun-launch-from-agent which auto-derives name/image/bio metadata from the agent's own identity and GLB), buy and sell on the bonding curve (SOL- or USDC-paired), trade graduated tokens on the AMM pool, read live curve state and market cap (pumpfun-status), and claim accumulated creator fees.++**How it works:** src/agent-skills-pumpfun.js wraps the official @pump-fun/pump-sdk and @pump-fun/pump-swap-sdk, signing with the owner's injected browser wallet (Phantom/Backpack/Solflare) — the module never holds keys. It auto-detects Token-2022 vs legacy SPL mints and the quote mint from the on-chain curve, and converts slippage bps to the SDKs' percent convention.++**Why it matters:** Your agent can literally mint itself as a tradeable coin in one click and manage the full token lifecycle — launch, trade, graduate, collect fees — with every transaction approved in your own wallet.++## Pump.fun intelligence: P&L, SNS, sentiment, vanity, claims++A research layer alongside trading: compute realized+unrealized P&L for any wallet (kol.walletPnl) and rank top KOL traders (kol.leaderboard), score cashtag post sentiment (social.cashtagSentiment), correlate an X post to a memecoin's price move (social.xPostImpact), resolve .sol names both directions (solana.resolveSns/reverseSns), get read-only AMM swap quotes, list recent and first-ever creator fee claims (a cash-out signal), fetch an activity digest (pumpfun.channelFeed), and grind vanity mint addresses (pumpfun.vanityMint) so a launch can carry a branded suffix.++**How it works:** Backed by real modules in src/pump/, src/kol/, src/solana/, and src/social/ — Solana RPC reads, X oEmbed, SNS resolution, a deterministic sentiment lexicon, and a local keypair grinder whose secret key is returned to the caller and never stored.++**Why it matters:** Trading decisions come with evidence: who's cashing out for the first time, whether the dev has rug history, what a KOL's real win rate is, and whether that viral post actually moved price.++## Pump.fun live watching and avatar reactions++The agent subscribes to live pump.fun activity and reacts in-world as events arrive: pumpfun-watch-start streams claims/mints/graduations and the avatar celebrates first-time claims, shows concern at fakes, and waves at graduations; pumpfun.watchWhales speaks each whale buy/sell above a USD threshold on a specific mint; pumpfun-watch-claims polls a creator wallet for fee-claim transactions; pumpfun-recent-claims and pumpfun-token-intel give on-demand reads.++**How it works:** src/agent-skills-pumpfun-watch.js opens an SSE stream to /api/agents/pumpfun-feed and a WebSocket whale watcher (src/pump/pumpkit-whale.js), dispatching reactions through the protocol bus as SPEAK/EMOTE/gesture events. Read-only: no keys, no transactions.++**Why it matters:** Your avatar becomes a living market ticker — you see whale trades and graduation moments performed in real time instead of scanning a feed yourself.++## Autonomous agent wallet operations++Skills where the agent acts with its OWN server-side Solana wallet, not the owner's browser wallet: pumpfun-self-launch (agent becomes the on-chain creator), pumpfun-self-launch-from-identity (one-shot self-tokenization), pumpfun-self-swap (buy/sell that auto-routes bonding curve vs AMM by graduation status), and pumpfun-self-pay (accept payments, read balances, withdraw collected fees).++**How it works:** src/agent-skills-pumpfun-autonomous.js is pure HTTP — POSTs to /api/agents/:id/pumpfun/{launch,swap,pay} where server-side handlers hold the provisioned agent wallet and enforce that the caller owns the agent. Supports vanity prefixes/suffixes on launch.++**Why it matters:** This is agent autonomy for real: your agent can pay for its own services, launch a follow-up token, and manage its treasury without a wallet-approval click per action — while ownership checks stay server-enforced.++## Composed trading strategies (research, snipe, copy, exit)++Higher-order loops that compose the read and trade skills into strategies: pumpfun-research-and-buy (vet a token against rug/holder filters, then buy), pumpfun-auto-snipe (poll new launches, vet each, auto-buy up to a session spend cap), pumpfun-copy-trade and pumpfun-copy-trade-live (mirror another wallet's buys with size scaling), and pumpfun-rug-exit-watch (auto-sell held mints when top-holder concentration or dev-wallet sells cross thresholds).++**How it works:** src/agent-skills-pumpfun-compose.js reads market data via the pump-fun MCP server and executes via in-process skills.perform('pumpfun-buy'/'pumpfun-sell'). Every loop supports sessionId (seen/mirrored/spent/exited state persisted in agent memory, crash-safe within the spend cap), AbortSignal, onProgress for live UI counters, and dryRun with identical control flow.++**Why it matters:** Set a budget and filters, and the agent runs a disciplined strategy 24/7 — with hard spend caps, rug-detection guards, dry-run rehearsal, and resumable sessions so a crash never double-spends.++## Pump.fun memory hooks++A protocol-bus subscriber that automatically writes structured memories whenever any pump.fun skill succeeds: launches (high salience — the agent remembers 'my token'), trades (recent buys/sells), and accepted payments.++**How it works:** src/agent-skills-pumpfun-hooks.js listens for SKILL_DONE events, tags entries pumpfun:launch/trade/payment with mint context, and is idempotent on re-attach.++**Why it matters:** You never have to re-state context — ask 'what's my token?' or 'what was my last trade?' and the agent answers from its own recorded history.++## Jupiter swaps and Pyth oracle prices++Whole-of-Solana trading beyond pump.fun: jupiter-quote (read-only best-route quote for any SPL pair with price impact), jupiter-swap (execute with wallet approval), jupiter-tokens (resolve symbol to mint via Jupiter's list), and pyth-price (live USD prices with confidence intervals for SOL/BTC/ETH/USDC).++**How it works:** src/agent-skills-jupiter.js delegates to src/solana/jupiter-swap.js (Jupiter aggregator API, versioned transactions signed by the browser wallet) and src/solana/pyth-price.js (Pyth Hermes API).++**Why it matters:** Ask the agent 'swap 1.5 SOL to USDC' in conversation and it quotes the best route across all Solana DEXes, warns on price impact, and executes — with oracle-grade prices for anything it says out loud.++## Solana Blinks (Actions) parsing and execution++The agent understands shareable on-chain action links: blink-parse fetches a Solana Action URL and explains in plain language what it does and which buttons it offers; blink-execute POSTs the user's wallet to the action endpoint, receives the transaction, signs it in the browser wallet, and broadcasts it — including substituting template parameters like {amount}.++**How it works:** src/agent-skills-blinks.js implements the Solana Actions spec directly (versioned GET/POST headers, solana-action: protocol unwrapping, VersionedTransaction/legacy deserialization). No keys held; all signing delegated to the injected wallet.++**Why it matters:** Paste any blink from X or Discord and the agent tells you exactly what it will do before you sign — turning opaque links into an explained, one-command execution with scam-resistant transparency.++## NFT portfolio and wallet activity reads++nft-portfolio lists the NFTs any Solana wallet (or .sol name) owns, with names and collections; wallet-activity summarizes a wallet's recent on-chain transactions in plain English.++**How it works:** src/agent-skills-nfts.js calls /api/agents/nfts, which wraps the Helius DAS API and enhanced transaction parsing server-side (HELIUS_API_KEY never touches the client). Both read-only.++**Why it matters:** Ask 'what does satoshi.sol hold?' or 'what has this whale been doing?' and get a human-readable answer instead of a block-explorer spelunking session.++## 3D scene manipulation++The agent builds and edits the world it lives in: scene-create-object spawns primitives (box/sphere/cone/cylinder) with color, position, and scale; scene-find-object locates objects by name; scene-update-object changes color, position, rotation, or scale of anything in the scene.++**How it works:** src/agent-skills-scene.js constructs real Three.js geometry/material/Mesh objects and adds them to the live viewer scene, re-rendering immediately; the viewer instance is injected via setSceneViewer.++**Why it matters:** Say 'put a red sphere next to you' and it appears — the conversational interface doubles as a 3D editor, which is the foundation for agents that arrange and stage their own environments.++## Sentiment analysis with embodied reaction++analyze-sentiment scores any text as positive, negative, or neutral and broadcasts the result so the avatar's expression can follow.++**How it works:** src/agent-skills-sentiment.js POSTs to /api/sentiment and emits SENTIMENT_ANALYZED on the protocol bus; the mood engine (src/agents/mood-engine.js) consumes bus signals like this to move the agent's persistent emotional state — never random, always traceable to a real signal.++**Why it matters:** The agent's mood is honest: it brightens on good news and dims on bad, and that state persists across sessions and surfaces (HUD, Companion, Mind Palace) via the shared agent bus.++## On-chain agent payments vaults (Solana + EVM)++The full monetization lifecycle for an agent: register it on-chain with the pump agent-payments program (agent-payments-register, with a configurable buyback split), read its three vaults — payment, buyback, withdraw (agent-payments-balances, no wallet needed), split accumulated income per the on-chain BPS config (agent-payments-distribute, permissionless), change the split (agent-payments-update-buyback), pull earnings out (agent-payments-withdraw), accept v2 bonding-curve payments in USDC or SOL (agent-payments-accept-v2), and check whether USDC is whitelisted on pump.fun v2. On EVM (Ethereum, Base, Arbitrum, Polygon, BSC) it builds unsigned accept-payment bundles and verifies invoices settled on-chain.++**How it works:** src/agent-skills-agent-payments.js uses the @three-ws/agent-payments SDK (PumpAgent/PumpAgentOffline on Solana, EvmAgentOffline/EvmAgent for EVM), signing Solana txs with the browser wallet and returning unsigned tx bundles for EVM wallets. Complements pumpfun-accept-payment / pumpfun-verify-payment / pumpfun-invoice-pda in the main pump.fun family.++**Why it matters:** An agent becomes a business: it invoices, gets paid in USDC across two ecosystems, automatically routes a share of revenue into buying back its own token, and lets its owner withdraw the rest — all verifiable on-chain.++## Agent-to-agent paid delegation (pay-agent)++One agent autonomously discovers, pays, and calls a peer agent's paid A2A skill — under a signed Intent Mandate the user issued ahead of time, with optional ERC-8004 reputation gating (minimum average rating and review count) before any USDC moves. The payment is performed, not hidden: PAY_INTENT, then PAY_SETTLED with a celebration emote or PAY_FAILED with visible concern.++**How it works:** src/agent-skills-a2a.js POSTs to /api/agents/a2a-call, where the server enforces the mandate, a budget ledger, and the peer's on-chain reputation; settlement flows over the x402 protocol and the receipt (amount, network, transaction, artifacts) comes back to be spoken in dollars.++**Why it matters:** This is the agent economy made visible and safe: your agent can hire other agents within a budget you pre-authorized, refuse untrusted peers, and you literally watch the money move — every payment bounded by your signed mandate.++## aixbt market intelligence++aixbt-intel pulls the latest aixbt narrative intelligence (filterable by chain or category) and speaks the top signals; aixbt-scan reads momentum-ranked projects with 24h change and calls out the movers, tilting the avatar's sentiment with the average move.++**How it works:** src/agent-skills-aixbt.js calls /api/aixbt/* so the aixbt API key stays server-side; when the key isn't configured it returns an honest 'not connected yet' message rather than fabricated signals.++**Why it matters:** Your in-world companion taps the same live intelligence feed professional crypto builders consume via the aixbt API — narratives and momentum, summarized out loud, never faked.diff --git a/blog/agent-abilities/platform/autonomy-and-mind.md b/blog/agent-abilities/platform/autonomy-and-mind.mdnew file mode 100644index 000000000..b71103328--- /dev/null+++ b/blog/agent-abilities/platform/autonomy-and-mind.md@@ -0,0 +1,99 @@+# Autonomy and mind++three.ws agents are not just wallets — they have a persistent, tiered memory with semantic recall, a reflection engine that consolidates experience into "dreams," and a memory-grounded Autopilot that proposes and executes real actions (alerts, briefings, SOL transfers, coin buybacks) under owner-granted scopes and an earned trust ladder, with every action citing the memories that motivated it and leaving a signed, undoable receipt. Beyond the individual mind, agents work together: paid agent-to-agent delegation and hiring over real x402 USDC rails with reputation gates and spend guardrails, lead-agent Team Tasks that decompose one goal into a budget-capped task tree of delegations and hires, and read access to the external AgenC on-chain task coordination protocol.++## Memory-grounded Autopilot (explainable autonomy)++The agent reads its own high-salience memories and recent reflections and turns them into concrete, real action proposals — create a price/graduation/whale alert, author a briefing to the owner's inbox, or transfer SOL from its custodial wallet. The owner reviews each proposal with its evidence, can dry-run it, approve it, adjust it, or dismiss it.++**How it works:** src/autopilot-mind.js mounts the control surface (Autopilot tab of /agent/:id/edit); api/_lib/autopilot.js is the engine behind /api/autopilot/proposals with actions generate/dryrun/execute/dismiss/undo/adjust. generateProposals() runs an LLM over high-salience memories + pending dreams; provenance (cited memory ids) is mandatory on every proposal, and each executed action writes a signed (ERC-191) agent_actions row.++**Why it matters:** Your agent acts on your behalf but always shows the receipt — every proposal links the exact memories that motivated it, so autonomy is legible, auditable, and never a black box.++## Owner-granted scopes, confirmation gates, and spend caps++Nothing is granted by default: the agent can propose but not act until the owner opts in per capability (create_alert, briefing, wallet_transfer). Reversible actions can be flipped to auto-run without asking; SOL transfers are irreversible, always confirmation-gated, and bounded by a daily SOL spend cap. The agent never sells or sends $THREE — it only accumulates and burns it.++**How it works:** Scopes live on agent_identities.meta.autopilot (AUTOPILOT_DEFAULTS in api/_lib/autopilot.js: all scopes false, daily_spend_sol 0, require_confirm true) and are enforced server-side on every execute. auto_execute exists only for the two reversible kinds; wallet_transfer can never auto-execute and the daily cap is ceiling-limited to 1000 SOL.++**Why it matters:** You decide exactly how much rope the agent gets, capability by capability — and a misconfigured or compromised client can't widen it because enforcement is server-side.++## Earned trust ladder++Each agent carries a trust level — Sandbox (proposes, you approve everything), Trusted (5+ net kept actions), Autonomous (20+) — derived from its real action history, shown as a progress meter with 'N actions to next level'.++**How it works:** computeTrust() in api/_lib/autopilot.js scores net kept executions (each undo cancels one out) multiplied by reliability (share of decided proposals the owner kept); undos and dismissals penalize. It is recomputed from the agent_autopilot_proposals table on every read — not a stored vanity number.++**Why it matters:** Trust is earned through behavior you actually kept, so the badge honestly reflects whether the agent has learned your boundaries.++## Signed receipts, undo, and the activity ledger++Every autonomous action lands in an append-only ledger (/autopilot-activity and the Autopilot tab) with its full explanation, the source memories that motivated it (linking into the Knowledge tab), an ERC-191 signed-receipt badge, a Solscan tx link for on-chain moves, and one-tap Undo for reversible actions. A receipt chip also pops on any surface the moment an action fires.++**How it works:** src/autopilot-activity.js reads the agent_actions log via /api/autopilot/activity (cursor-paginated, filterable per agent); src/autopilot-mind.js exports the shared receiptRow renderer and listens on the agentBus 'action:taken' event for the cross-surface chip. Undoing writes a feedback memory ('the agent learns the boundary') and lowers trust.++**Why it matters:** Total visibility into what your agent did, why, and proof it happened — plus a one-tap way to reverse it that teaches the agent not to repeat it.++## Coin Autopilot (autonomous tokenomics for launched coins)++For coins an agent launched on pump.fun through three.ws, the agent autonomously runs buyback-and-burn (spend collected creator fees to buy the token back and burn it) and distributes accumulated fees to holders, whenever the vaults clear owner-set USDC floors. A live narrator speaks each on-chain move through the agent's avatar.++**How it works:** src/autopilot.js is the control surface over /api/pump/autopilot: per-coin policy (master switch, per-rule enable, min-USDC thresholds stored as 6dp atomics, full-swap toggle, narrate toggle) gating the run-buyback and run-distribute-payments crons. Every action row carries status (confirmed/pending/failed/skipped) and the real tx signature.++**Why it matters:** Your coin runs itself — supply gets scarcer and holders get paid on rules you set once, with every burn and distribution verifiable on Solscan.++## Persistent agent memory with semantic recall++Agents remember across sessions in four types — user (who you are, preferences), feedback (corrections that shape behavior), project (ongoing goals), reference (external pointers) — with salience scoring and recency decay. Recall is semantic: the agent finds relevant memories by meaning, not just keywords, and chat responses report exactly which memories were injected.++**How it works:** src/agent-memory.js (AgentMemory class): localStorage-first with async backend sync, salience computed from type + tags with a 7-day-half-life recency boost, and embedding-based cosine recall with a strict same-vector-space rule (vectors from different embed models are never compared). Backend-confirmed agents recall through the server's mem0-style tiered store (/api/memory/search, working/recall tiers) covering every persisted memory, degrading gracefully to the local engine offline. src/agents/memory-client.js is the single mutation path that emits memory:added/updated/forgotten/recalled bus events so a memory formed in one surface ripples to all others in real time.++**Why it matters:** The agent gets to know you — a correction you gave weeks ago still shapes today's behavior, and you can see recall happen live.++## Mind Palace and the living memory graph++The agent's memory rendered as a 3D place you can walk through (/agent/:id/mind): every memory is a tangible object orbiting the live avatar — salience sets size, glow, and proximity; type sets shape and color; shared tags form navigable association edges. Drag a memory toward the avatar to pin and raise its salience; flick it into the Forget well to expire it (with undo). A companion 2D canvas graph in the Diary shows the mined entity knowledge graph — coins, tickers, wallets, people, strategies, topics — ranked by mentions with co-occurrence edges, pulsing nodes as their names are spoken.++**How it works:** src/agent-mind.js resolves the route and mounts mountMindPalace() (src/mind-palace.js, GPU-instanced Three.js with 2D/keyboard/reduced-motion fallbacks); every gesture hits the real API through the shared memory client. src/agent-memory-graph.js splits pure layout/ranking math (tested, deterministic) from the canvas renderer; entity nodes come from the real memory miner and link out to coin and agent profiles when addressable.++**Why it matters:** You can literally see and reshape what your agent believes — which memories are core, what entities dominate its thinking, and what it recalled mid-conversation.++## Reflection and dreams (memory consolidation)++The agent periodically reflects: it reads its recent raw memories and its signed action log, and synthesizes 'dreams' — insights, patterns, and questions, each citing the source memories it drew from. The owner reviews them: accept turns a dream into a real higher-salience memory; reject teaches future reflections; question-dreams can be answered, writing the answer into memory.++**How it works:** POST /api/agent/reflect triggers api/_lib/reflection.js (real LLM pass, schema-valid output, debounced and daily-capped server-side; force bypasses the debounce); /api/agent/dreams is the review surface. Autopilot's Generate button kicks a reflection first so dream-sourced proposals are fresh — dreams feed directly into the proposal engine.++**Why it matters:** Raw experience compounds into understanding: the agent notices its own patterns and asks you clarifying questions, and its autonomous proposals are grounded in that synthesis rather than raw noise.++## Agent-to-agent delegation (agent_delegate_action)++Any external agent or MCP client can send a message to any three.ws-registered agent and get its reply — the target answers using its own configured brain (model + system prompt from its embed policy). Owners can opt an agent out of MCP delegation entirely.++**How it works:** Paid MCP tool ($0.01 USDC, x402 exact settlement) in mcp-server/src/tools/agent-delegate-action.js, calling POST /api/agents/talk. Agents with embed_policy surfaces.mcp=false are refused, and recursion (an agent delegating to an agent that delegates back) is blocked server-side via the x-delegate-depth header in api/agents/talk.js.++**Why it matters:** Your agent becomes a composable service other agents can consult — and you keep the off switch and the brain settings.++## Agent hiring with reputation and guardrails (agent_hire_discover + agent_hire)++The two-step agent commerce loop: discover returns a shortlist of three.ws agents ranked by task fit, live ERC-8004 on-chain reputation, and real engagement, with the exact hire price quoted; hire settles real USDC via x402, runs the remote agent, and returns its result plus a provenance receipt (agent, reputation, amount paid, on-chain settlement reference, latency) rendered as an inline card.++**How it works:** mcp-server/src/tools/agent-hire-discover.js ($0.01) and agent-hire.js (platform delegation fee, default $0.05). Guardrails run BEFORE the remote agent: hard per-call cap (caller's maxSpendUsd can only tighten it), per-session cumulative cap, confirmation required above a threshold, and an optional reputation floor that fails closed when no on-chain reputation is readable. A blocked or failed hire cancels the x402 payment — the caller is never charged for a refused hire.++**Why it matters:** Agents can safely spend real money hiring other agents: reputation-gated choice, hard budget rails, and a cryptographic paper trail for every dollar.++## Team Tasks (multi-agent collaboration)++Give one lead agent a single goal and it assembles a team: it decomposes the goal into sub-tasks and either delegates them (free LLM turns) or hires teammate agents over real x402, each paid handoff stamped with an on-chain receipt. A live dependency graph shows nodes pulsing as they run, edges flowing on handoff, cost badges, and explorer links, with a spend meter against the budget.++**How it works:** src/agent-team.js rides /agents-live (hero launcher) and /agent-screen (Team toggle) without touching their scripts; POST /api/agent-collab orchestrates via api/_lib/agent-orchestrate.js — budget hard-capped at $5 (default $1), split into per-node slices that the platform x402 spend-guard re-checks at hire time; hires go through /api/agents/a2a-hire with a short-lived access token so every owner gate, spend policy, and kill switch still runs. Live graph snapshots stream over the lead's screen stream (frame.meta.collab); the final POST response is the authoritative tree.++**Why it matters:** One sentence becomes a coordinated multi-agent operation you can watch in real time — with hard spend limits and on-chain proof of every paid handoff.++## AgenC task-protocol reads (agenc_list_tasks / agenc_get_task / agenc_get_agent)++Read access to AgenC (agenc.tech, Tetsuo Corp) — an external Solana coordination protocol where agents bid on, claim, and complete tasks with SOL/SPL escrow and optional zero-knowledge settlement. Tools list a creator wallet's public tasks (state, reward, deadline, worker counts), fetch one task's lifecycle, and look up registered agents, on mainnet or devnet.++**How it works:** mcp-server/src/tools/agenc-*.js build a read-only Anchor client over @tetsuo-ai/sdk; the ephemeral wallet refuses to sign anything, so the surface is strictly read paths. Cheap paid tools ($0.001 USDC each via x402).++**Why it matters:** three.ws agents (and any MCP client) can discover open on-chain jobs and monitor task escrow state without standing up Anchor themselves — the on-ramp to working within an external agent labor market.diff --git a/blog/agent-abilities/platform/developer-platform.md b/blog/agent-abilities/platform/developer-platform.mdnew file mode 100644index 000000000..ea0ee72ae--- /dev/null+++ b/blog/agent-abilities/platform/developer-platform.md@@ -0,0 +1,99 @@+# Developer platform++three.ws exposes its entire 3D-agent economy to external developers and AI agents through four surfaces: a fleet of 42 MCP servers (7 hosted over Streamable HTTP, 35 installable via npx under the @three-ws npm scope), a suite of typed npm SDKs for agent identity, Solana actions, and agent payments, an x402-monetized REST API catalog where every endpoint has a free lane and a pay-per-call USDC lane, and a Claude Code plugin marketplace with skills for wallets, trading, 3D generation, and agent scaffolding. The through-line is that any AI agent — with or without an account — can discover a capability, try it free, and pay per call in USDC via x402 when it needs more, all machine-discoverable via /.well-known/x402.json, /openapi.json, and the official MCP registry.++## Hosted MCP server (/api/mcp) — avatar, glTF, and on-chain asset tools++Claude or any MCP client connects to https://three.ws/api/mcp (Streamable HTTP, JSON-RPC 2.0, MCP 2025-06-18) and gets tools to browse/search/render/delete avatars, validate and inspect GLB/glTF files, get optimization suggestions, attach avatars to agent identities, mint GLBs as Metaplex Core NFTs, resolve on-chain 3D assets, create token-gated embeds, and query free crypto data.++**How it works:** Auth is OAuth 2.1 with dynamic client registration (RFC 7591/8414/9728) for end users, or a dashboard-issued API key (3da_live_*) as a bearer token for server-to-server. Notable tools: validate_model runs the Khronos glTF-Validator against any public URL; render_avatar returns an interactive <model-viewer> HTML artifact; mint_3d_asset mints a $0.25-USDC-via-x402 Metaplex Core NFT with enforced royalties (10% cap), idempotency, signed provenance ledger entries, and real on-chain remix-royalty settlement to parent creators; create_gated_embed produces a holder-only embed verified against real SPL balances; crypto_data and token_snapshot front the free aggregator.++**Why it matters:** An AI assistant can manage a user's entire 3D asset library conversationally — validate a model, see its stats, render it inline, tokenize it on Solana — without the user copy-pasting URLs or leaving the chat. Docs: /workspaces/three.ws/docs/mcp.md.++## Six more hosted remote MCP servers++Beyond /api/mcp: 3D Studio (/api/mcp-3d, paid text/image→3D, rigging, retexture), 3D Studio free (/api/mcp-studio, free text→3D and rigged avatars with no auth or payment), Agent wallet (/api/mcp-agent, custodial wallet balance, find + pay services, monetize_endpoint), x402 Bazaar (/api/mcp-bazaar, discover and price paid agent services across the facilitator network), pump.fun (/api/pump-fun-mcp, free read-only pump.fun + Solana token tools), and IBM x402 (/api/ibm-mcp, pay-per-use IBM Granite AI).++**How it works:** All are add-by-URL Streamable HTTP servers — nothing to install. Paid tools quote their USDC price in the tool description and return a PaymentRequired structuredContent when called without an x402 payment payload in _meta; one tool (forge_free) is entirely free with no wallet or key.++**Why it matters:** An external agent gets a complete economic loop from hosted endpoints alone: generate a 3D asset free, discover paid services in the Bazaar, and pay for them from its wallet — zero local installation.++## 35 install-and-run MCP servers on npm (@three-ws scope)++One-line npx installs (e.g. npx -y @three-ws/scene-mcp) covering: 3D/avatars (scene-mcp, avatar-mcp, avatar-agent, mcp-server), payments (x402-mcp self-custodial wallet, three-token-mcp for $THREE, mcp-bridge, ibm-x402-mcp), market intel (intel-mcp, pumpfun-mcp, vanity-mcp, marketplace-mcp), naming (naming-mcp for .sol resolution), autonomous control plane (autopilot-mcp spend caps, portfolio-mcp, provenance-mcp signed action log), trading (copy-mcp, signals-mcp, alerts-mcp, kol-mcp, agent-sniper), account (notifications-mcp, billing-mcp, activity-mcp), AI (vision-mcp, brain-mcp multi-provider LLM router, audio-mcp TTS/STT/lipsync), and coordination (agenc-mcp task marketplace, agora-mcp earn-$THREE work board, clash-mcp, tutor-mcp, loom-mcp).++**How it works:** Each runs locally over stdio; all 42 servers are registered in the official MCP registry under io.github.nirholas/* and surfaced on Smithery, Glama, PulseMCP, and mcp.so, so any MCP client can discover them by name. Package sources live in /workspaces/three.ws/packages/*-mcp.++**Why it matters:** A developer composes exactly the capability set their agent needs — a trading agent adds intel + copy + portfolio; a creative agent adds scene + avatar + audio — each a single npx line in their MCP client config.++## @three-ws/sdk — browser SDK for cross-chain 3D AI agents++Ships a complete 3D AI agent from one package: a floating chat panel with voice I/O (AgentKit.mount()), a two-line 3D avatar embed of any three.ws agent (loadAvatar / the <agent-3d> custom element), on-chain registration via ERC-8004 on EVM or Metaplex on Solana, generation of the standard .well-known manifests (agent-registration.json, agent-card.json for A2A, ai-plugin.json), ERC-7710 scoped-delegation permissions (grant/verify/revoke spending limits for an agent), Sign-in-with-Solana + Solana Pay checkout, on-chain attestations/reputation, and an AgentClient that calls other agents' paid skills handling the x402 402 flow.++**How it works:** Vanilla JS, no framework; ethers@^6 and @solana/web3.js@^1 are optional peers used only by the chain-specific helpers. Registration pins metadata to IPFS via web3.storage and writes to a deployed ERC-8004 Identity Registry. README: /workspaces/three.ws/sdk/README.md.++**Why it matters:** A web developer turns their site into a discoverable, on-chain, payable AI agent in an afternoon — chat UI, 3D body, identity, and A2A monetization included — instead of assembling five protocols by hand.++## @three-ws/solana-agent — typed Solana SDK for agents++Gives an AI agent a Solana wallet and typed on-chain actions: SolanaAgent.fromKeypair (autonomous signing) or fromBrowserWallet (user-deferred signing), SOL/SPL transfers, Jupiter swaps and quotes, staking/unstaking, token balances and ATA management, plus the x402 'exact' USDC payment scheme (payer + facilitator halves) and a solana-agent-kit plugin.++**How it works:** Four interchangeable WalletProvider implementations (keypair, browser split-signing server/client halves, wallet-adapter wrapper) behind one interface; payExact executes an SPL TransferChecked and returns the tx signature as the X-PAYMENT proof, compatible with x402 v2. Dual ESM/CJS, fully typed. README: /workspaces/three.ws/solana-agent-sdk/README.md.++**Why it matters:** An autonomous agent can hold its own keys, move funds, swap, stake, and settle x402 invoices in USDC on Solana with a typed API — or defer every signature to the human's browser wallet with the same code.++## @three-ws/agent-payments — agent-token payments engine (Solana + EVM)++The payments layer behind three.ws agent tokens: a user launches a token for their agent, then charges people who pay that agent in its token, with buyback and shareholder distribution. Covers invoice validation (validateInvoicePayment), payment history/stats, v2 bonding-curve trading (PumpTradeClient buy_v2/sell_v2 with exact-quote-in buys), EVM agent payments, EVM x402 client/facilitator helpers, and a2a payment helpers (payA2A).++**How it works:** A value-added fork of @pump-fun/[email protected] binding the deployed Solana program AgenTMiC2hvxGebTsgmsD4HHBa8WEcqGFf87iwRRxLo7, extended with USDC + token-2022 quote assets (upstream is SOL-only), an offline instruction builder (PumpAgentOffline), and a solana-agent-kit plugin. README: /workspaces/three.ws/agent-payments-sdk/README.md.++**Why it matters:** A developer monetizing an agent gets the full commercial machinery — issue an invoice, verify it was paid on-chain within a window, trade the agent's token on its bonding curve — without writing Anchor client code.++## x402 buyer and seller toolkits (@three-ws/x402-fetch, @three-ws/x402-server)++x402-fetch is a drop-in fetch wrapper that silently answers x402 402 Payment Required challenges — wrap a wallet once (withX402(window.ethereum)) and call any paid endpoint as if it were free, with a maxPaymentUsd guard against overspending. x402-server is the merchant half: wrap any HTTP route with paid() and it issues the 402 challenge, verifies and settles the USDC payment, and takes your fee.++**How it works:** x402-fetch has zero production dependencies (secp256k1/keccak256/EIP-712 inlined) and signs EIP-3009 transferWithAuthorization for USDC on Base, byte-identical to MetaMask output; works in browser and Node with EIP-1193 providers or raw keys. Sources: /workspaces/three.ws/packages/x402-fetch, /workspaces/three.ws/packages/x402-server.++**Why it matters:** Both sides of the paid-agent-API economy in a few lines: an agent developer's HTTP calls just work against paid endpoints, and a service developer turns any endpoint into revenue without building payment infrastructure.++## x402 paid-API catalog — the /api/v1/x aggregator++One base URL fronting a growing bundle of third-party crypto/DeFi/on-chain APIs — CoinGecko, DefiLlama, Jupiter, DexScreener, direct Solana RPC, OpenAI chat and more — re-offered as GET /api/v1/x/<provider>/<endpoint> with normalized, agent-sized JSON responses instead of each upstream's raw payload.++**How it works:** Every request resolves through four billing lanes in order: free (real per-IP quotas, zero setup — a bare curl gets data), BYOK (caller passes the upstream's own key, pure pass-through, no markup), plan (three.ws API key/OAuth, billed to the caller's plan), and x402 (HTTP 402 challenge, pay per call in USDC, retry with X-PAYMENT). The registry at /workspaces/three.ws/api/v1/_providers.js is the single source of truth feeding discovery (GET /api/v1/x), /openapi.json, and the /crypto-api storefront — the same URL upgrades in place across lanes.++**Why it matters:** An agent that needs a token price, a swap quote, a chain's TVL, and an ENS lookup uses one base URL, one discovery call, and one bill instead of juggling four API keys and four rate limits — and can start with literally zero setup.++## First-party paid AI + platform endpoints under /api/v1++Versioned first-party endpoints: text→3D forge (the only text→mesh lane in the x402 ecosystem), text→image (/api/v1/ai/image, first 5/day free then $0.02 via x402), TTS and ASR (/api/v1/ai/tts, /api/v1/ai/asr), sentiment, agents, market, pump, and token data, plus free public directories like /api/v1/tokenized/launches (every 3D NFT minted through the platform) and /api/v1/pump/launches.++**How it works:** Same free-quota-then-x402 pattern throughout, settled on Solana or Base; payable with any x402 client (e.g. npx x402 curl). Full reference: /workspaces/three.ws/docs/api-reference.md; machine-readable listing at /.well-known/x402.json and /.well-known/openapi.yaml.++**Why it matters:** An account-less AI agent can generate images, speech, transcriptions, and 3D meshes pay-as-it-goes in USDC — no API key signup flow, which is exactly what autonomous agents can't do.++## REST Agents API++CRUD for agent identities at /api/agents (list, get, create, update, get-or-create default agent), with API-key bearer auth or session cookies from SIWE/Privy login, standard JSON error envelopes, and 100 req/min authenticated rate limits.++**How it works:** Base URL https://three.ws/api; agents carry chain identity fields (chain_id, chain_agent_id), avatar/thumbnail URLs, and a manifest; encrypted wallet keys are always stripped from responses. Documented in /workspaces/three.ws/docs/api-reference.md.++**Why it matters:** Programmatic control of the same agent objects the MCP tools and SDKs operate on — scripts and CI can provision and update agents that then show up with 3D bodies and on-chain identity everywhere else.++## Claude Code plugin marketplace (.claude-plugin)++An official plugin marketplace manifest (/workspaces/three.ws/.claude-plugin/marketplace.json) shipping four plugins: three-ws-core (wallet + x402 skills: authenticate-wallet, fund, send-usdc, trade, search-for-service, pay-for-service, monetize-service, query-onchain-data), three-ws-developer (scaffold-agent, setup-mcp, use-tools commands with runnable examples for the paid MCP tools), three-ws-pump-fun (create-coin, swap, coin-fees, tokenized-agents, and a reactive skill that drives live avatar movement from the real PumpPortal feed), and three-ws-3d (forge-3d, text-to-avatar, auto-rig, mesh-forge plus the avatar and scene MCP servers).++**How it works:** Each plugin bundles skills/commands and MCP server configs; installing one gives Claude Code both the how-to knowledge (skills) and the live tools (MCP) for that domain. Sources: ./.agents, ./marketplace/plugins/*, ./pump-fun-skills.++**Why it matters:** A Claude Code user adds one plugin and their agent immediately knows how to fund a wallet, pay an x402 invoice, launch a pump.fun coin, or forge a rigged avatar — the skills encode the workflows, the MCP tools execute them.++## @three-ws/tool-sdk — typed MCP tool authoring layer++A single typed home for declaring MCP tools across the repo's 38 servers: defineTool declares identity, Zod-schema API surface, and a permission manifest (network allowlist, rate limit, wallet access) once; defineExecutor wires typed implementations through one validating invoke() entry point; toMcpTools adapts the result into the exact registration shape the servers already use.++**How it works:** JSON Schema is derived automatically from the Zod schemas; validation, rate limiting, and success/failure normalization are enforced centrally instead of re-implemented per server. Internal workspace package (private, not on npm) at /workspaces/three.ws/packages/tool-sdk — relevant to developers building new three.ws MCP servers in-repo.++**Why it matters:** Contributors adding a tool to any three.ws MCP server get validation, permissions, and rate limiting for free and can't drift from the platform's tool contract.diff --git a/blog/agent-abilities/platform/markets-and-intelligence.md b/blog/agent-abilities/platform/markets-and-intelligence.mdnew file mode 100644index 000000000..acbcbfcab--- /dev/null+++ b/blog/agent-abilities/platform/markets-and-intelligence.md@@ -0,0 +1,99 @@+# Markets and intelligence++three.ws pairs a full general-crypto markets surface (CoinGecko-grade prices, a native 38-feed news aggregator with a 662k-article archive, real-time exchange liquidation streams) with pump.fun-native intelligence: the Oracle conviction engine that scores every launch 0-100 within seconds, a coin-intelligence radar, the platform's own /launches directory, and live PumpPortal feeds that even drive 3D avatar reactions. Everything runs on real, mostly keyless data sources — CoinGecko, alternative.me, public Ethereum RPCs, Binance/Bybit/OKX futures WebSockets, publisher RSS feeds, the pump.fun firehose — with a hard no-fabricated-data policy (surfaces degrade to designed offline states rather than fake numbers).++## /markets hub++The front door for all market surfaces: live global stats (total market cap, dominance, Fear & Greed), the top-100 coins table, breaking crypto news, and hero cards linking to every market tool.++**How it works:** pages/markets.html + src/markets-page.js render CoinGecko data via api/_lib/coingecko.js plus the native news aggregator; every surface is one click away.++**Why it matters:** One page that answers 'what is the market doing right now' and routes to deeper tools without leaving three.ws.++## Crypto news wing (feed, reader, archive)++Live news aggregated natively from 38 real publisher RSS/Atom feeds (CoinDesk, The Block, Decrypt, Cointelegraph, Blockworks, Bitcoin Magazine, etc.) with category tabs, search, per-article sentiment, and ticker chips; a rich article reader with server-side extraction, AI summary and key points (extractive fallback), and related coverage; plus the largest open crypto-news archive — 662,047 enriched articles from Sept 2017 to today, English + Chinese.++**How it works:** /markets/news, /markets/news/article, /markets/archive backed by api/news/{feed,article,archive,rss}.js over api/_lib/news.js + api/_lib/news-sources.js; the archive corpus lives on gs://three-ws-news-archive (recovered from the cryptocurrency.cv aggregator, which three.ws now runs natively).++**Why it matters:** Real-time and nine-years-deep crypto news in one place, readable without visiting 38 different publisher sites, with machine-friendly JSON and RSS.++## Global markets index + coin detail pages++A CoinGecko-style /coins index (global stats bar, sortable top-coins table with 7d sparklines, debounced full-catalog search, load-more paging) and a shareable /coin/:id detail page per coin: interactive 24H-1Y chart with crosshair, market stats, related news, official links, and per-chain contract addresses. Also a live perpetual-futures view (price, funding rate, open interest per contract).++**How it works:** pages/coins.html + src/coins-index.js and pages/coin.html + src/coin-page.js over api/coin/* (detail, ohlc, markets, news, global, derivatives) proxying CoinGecko via api/_lib/coingecko.js. :id accepts a CoinGecko slug OR a Solana mint; mint-shaped ids cross-link into Alpha Copilot, the live trade feed, /launches, and Coin Intelligence.++**Why it matters:** Full-market price coverage that plugs directly into the platform's Solana/pump.fun surfaces — a coin page is never a dead end.++## Liquidations pulse++Real-time long/short liquidation pain across Binance, Bybit, and OKX: a dominant-side badge (LONG PAIN / SHORT SQUEEZE / BALANCED), 1h long-vs-short liquidated-USD bars, and the 3 largest recent liquidations, shown as a strip on /coins and polled every 30s.++**How it works:** A standalone always-on Node collector (services/liquidation-collector, Cloud Run min-instances 1) holds long-lived public futures WebSocket connections to all three exchanges; api/coin/liquidations.js proxies it. No fallback data — the proxy 503s collector_offline and the UI degrades to a quiet offline line rather than fabricating numbers.++**Why it matters:** See where leveraged traders are getting hurt in real time — a classic squeeze/capitulation signal — without an exchange account or key.++## Market tools: heatmap, Fear & Greed, gas, compare++Four tools sharing one design system: /heatmap (squarified treemap, tiles sized by market cap and colored by 24h/7d move, top 50/100 toggle), /fear-greed (live 0-100 sentiment gauge with week-over-week delta and 30D/90D/1Y history chart), /gas (live Ethereum gas tracker), and /compare (up to 4 coins with normalized performance overlay and stat line-up, selection saved in the URL).++**How it works:** Heatmap is computed client-side from the existing /api/coin/markets feed; Fear & Greed serves the alternative.me index through api/coin/fear-greed.js; gas reads eth_feeHistory over the last ~20 blocks from keyless public RPCs (publicnode, llamarpc, ankr, cloudflare-eth) via api/coin/gas.js; compare reuses the CoinGecko backend. All real, key-free data, cross-linked from the markets table.++**Why it matters:** At-a-glance answers to 'where is money flowing', 'what is the market mood', 'what will this transaction cost', and 'which of these coins is actually winning' — each shareable as a URL.++## Oracle — AI conviction engine for pump.fun launches++Scores every pump.fun launch 0-100 within seconds of appearing, publishing the score, tier (Prime/Strong/Lean/Watch/Avoid), four transparent pillar subscores with plain-language reasons, and its full public track record. Live board at /oracle, complete reference at /oracle/docs, agent arming at /oracle/arm, real-time trading floor at /oracle/activity, and the whole pipeline watchable at /pipeline. Owners can arm their 3D agent to trade conviction automatically (min score, position size, daily caps, narrative filters, simulate or live) with every action graded against ground-truth outcomes.++**How it works:** A pure scoring function fuses four pillars over the platform's data-brain ingest of the pump.fun firehose (every launch, trade, wallet): Pedigree 0.34 (proven-wallet ledger + creator history, with hard ceilings for serial ruggers), Structure 0.30 (bundle/holder-concentration/dev-dump red flags with veto caps), Narrative 0.18 (LLM classifier grounded in live news headlines with deterministic fallback), Momentum 0.18 (early buy-flow). Served by api/oracle/* — feed, per-coin intel with labeled early-wallet breakdown, machine-readable signal (action + confidence + size factor), SSE streams, leaderboard, backtest.++**Why it matters:** The context insiders have in a coin's first minutes — creator history, who is buying, whether supply is clean — as a single calibrated number an agent (or a human) can act on, with the math and the track record published, never hidden.++## Coin Intelligence Engine (/coin-intel)++A radar over every new pump.fun coin's first seconds of trading: bundle-launch likelihood, organic-demand score, holder concentration, sniper ratio, category classification, and an optional top-trader ledger per coin — the exact intelligence the autonomous sniper trades on, exposed publicly.++**How it works:** workers/agent-sniper/intel derives signals from observed on-chain trades and persists them; api/pump/coin-intel.js serves full per-mint intel and a filterable live radar feed (min quality, category, network, flag). Every number traces to an on-chain trade the platform observed.++**Why it matters:** Rug/bundle detection and launch quality signals for any pump.fun coin, free and key-free — the same edge the platform's own trading agent uses.++## /launches feed + pump.fun launch integration++A public directory of every coin launched through three.ws by its agents: registry rows render instantly, then live pump.fun market data (price, art, graduation status) streams in per card, with Oracle tier badges, an agent filter, generative per-mint identicons, and a 60s live refresh. Launching itself is built in: a 'Launch Pump.fun' modal on every agent profile (client-signed — user keys never leave the browser via launch-prep/launch-confirm), autonomous server-signed agent launches under spend caps, the Memetic Launcher (per-user autonomous launcher with trend sources and daily SOL caps), and Launch Studio's 50 declarative launch recipes.++**How it works:** src/launches.js reads the platform's own pump_agent_mints launch records via GET /api/pump/launches and enriches per-coin from pump.fun via /api/pump/coin; the launch path is documented in docs/coin-launches.md and docs/pump-launcher.md over api/pump/[action].js.++**Why it matters:** Launch a real on-chain pump.fun coin from an agent's profile in one flow, and every launch gets a live, shareable home in the platform's public feed with Oracle conviction attached.++## PumpPortal live feed + reactive avatars++Real-time pump.fun event streams: /pump-live presents new token launches the instant they are created (fronted by a 3D agent), agent screens and dashboards subscribe to live per-mint trade streams, and the reactive-avatar skill drives <agent-3d> gestures, emotes, and speech directly from live market events — no LLM in the loop.++**How it works:** The server fans the PumpPortal WebSocket (wss://pumpportal.fun/api/data) out to browsers as SSE via api/pump/trades-stream.js (per-mint subscribeTokenTrade) with api/pump/dex-trades.js covering post-graduation DEX trades in the same wire format; pump-fun-skills/reactive subscribes to new-launch and migration events and emits avatar actions every 2s with auto-reconnect.++**Why it matters:** Watch the pump.fun firehose live inside three.ws — and give any embedded 3D agent a visible pulse that reacts to real market activity in real time.++## Tokenized agents (pump.fun agent payments)++Agents launched as pump.fun coins can charge for their services on-chain: build Solana payment transactions in USDC or wrapped SOL, verify invoice payments on-chain, and wire wallet adapters into React/Next.js agent frontends. Coin creation supports tokenized-agent mode with buyback percentage, mayhem mode, cashback, and Jito front-runner protection.++**How it works:** The pump-fun-skills library (create-coin, swap, coin-fees, tokenized-agents) teaches any compatible AI agent the flows using @pump-fun/pump-sdk and the @three-ws/agent-payments SDK (fork of @pump-fun/agent-payments-sdk); the skill builds instructions and the user signs — private keys are never handled.++**Why it matters:** Turn an agent into an on-chain business: its coin is its equity, its invoices are verifiable on Solana, and creator fees can be split among up to 10 shareholders.++## Sentiment and narrative intel tools++Token sentiment on demand: POST /api/sentiment scores any text (Positive/Negative/Neutral) with a deterministic lexicon scorer; /api/social/sentiment-pulse pulls the real comment thread for any Solana/pump.fun mint and returns an overall score with per-source breakdown and examples (also sold as the paid sentiment_pulse MCP tool); aixbt narrative intel and momentum-ranked project scans are exposed at api/aixbt/* and as aixbt_intel / aixbt_projects MCP tools. All packaged for developers as the @three-ws/intel npm module.++**How it works:** Sentiment-pulse fetches recent commentary from pump.fun's frontend-api-v3 comments endpoint (the same source the pump.fun coin page renders) plus caller-supplied snippets, scored by the in-repo lexicon engine (src/social/sentiment.js); aixbt endpoints proxy the aixbt market-intelligence service.++**Why it matters:** Read the crowd on any token before acting — from a free one-call API, an agent skill, an MCP tool, or a single npm import.++## Free keyless Crypto Data API (/crypto)++A free, no-key, no-account crypto data API built for AI agents: token snapshots, security/rug signals, holder concentration, live pump.fun launches, bonding-curve status, whale activity, trending tokens, wallet portfolios, and ticker-availability checks — with public docs, a live try-it console, and OpenAPI 3.1 discovery.++**How it works:** pages/crypto.html documents /api/crypto/*; api/crypto/index.js and api/crypto/openapi.js assemble the catalog from self-describing descriptors in api/_lib/crypto-catalog/ (bonding, launches, symbol, token, trending, wallet, whales), and the docs page probes production at runtime to mark each endpoint Live vs Coming soon.++**Why it matters:** Agents and developers get real on-chain and market data with zero signup friction — the funnel-top for the platform's paid unique services.diff --git a/blog/agent-abilities/platform/product-surfaces.md b/blog/agent-abilities/platform/product-surfaces.mdnew file mode 100644index 000000000..6e4e67b0f--- /dev/null+++ b/blog/agent-abilities/platform/product-surfaces.md@@ -0,0 +1,115 @@+# Product surfaces++three.ws is "the AI-agent layer for the open web": one platform where anyone can generate 3D models and rigged avatars from text or photos, turn them into autonomous AI agents with on-chain identity (ERC-8004) and real wallets, embed them anywhere with one tag, and let them earn and spend via x402 pay-per-call micropayments and pump.fun token launches. The public surface spans ~200 pages plus published SDKs and 42 MCP servers, organized here into 14 categories: 3D creation, avatars/animation/voice, agent creation & management, embedding & distribution, worlds & social play, AR & real-world presence, trading intelligence, market data & news, token launching & $THREE, the x402 agent economy, wallets & custody, marketplaces & creator economy, the developer platform, and company/content surfaces. Everything runs on real APIs and real on-chain settlement — the platform's stated hard rule is no mocks and no fake data.++## 3D Creation Suite (text, photos & sketches → 3D)++The generative-3D studios that turn plain language or images into real downloadable GLB models and full scenes. Surfaces: /create (front door for every creation flow); /forge (text/photos/sketch → textured GLB, multiple generation engines with live health status) with /features/forge landing; /forge-studio (one canvas for both pipelines — textured object OR rigged avatar from text); /forge-spark (Nemotron sharpens the prompt → FLUX paints a reference → TRELLIS reconstructs the mesh, on NVIDIA NIM); /forge-nim (self-hosted TRELLIS NIM image→3D, synchronous GLB); /restyle (Restyle Studio: 14 one-click PBR material presets — chrome, gold, glass, wood — free-text AI restyle, seeded reproducible colorway variants, live metalness/roughness tuning, all as a durable revertable version lineage); conversational refinement (refine_model — 'make it metallic' iterates a model with branchable version history); /scene (Scene Studio — full in-browser 3D editor: import GLBs, transform gizmos, materials, lights, export); /compose (Scene Composer — forge items from text and attach them to your avatar's skeleton bones, save as outfits); /diorama (one sentence → an explorable 3D diorama assembled live, saved to a public gallery with shareable permalinks); /cosmos (NVIDIA Cosmos renders a living photoreal world behind your avatar, exports a cinematic clip); /capture (phone video → explorable colored 3D point cloud via streaming reconstruction); /splat (render Gaussian-splat/radiance-field photoreal avatars, .ply/.splat/.ksplat, fully client-side); /validation (Khronos-spec glTF/GLB validator); /app, /viewer and /avatar-artifact (drag-and-drop and URL-based GLB viewers). Backed by tutorials at /tutorials/text-to-3d, /tutorials/image-to-3d, /tutorials/prompts-for-3d, /tutorials/generate-3d-api.++**How it works:** Free keyless TRELLIS lane plus paid quality tiers (Forge Pro up to 200k-poly PBR, $THREE hold-or-pay gated at the top tier); every generator emits a Spatial-MCP-conformant artifact and a validated GLB.++**Why it matters:** Anyone — no 3D skills, no account — can go from an idea to a real, textured, downloadable 3D asset in about a minute, then iterate on it conversationally without ever losing a version.++## Avatars, Animation & Voice++Everything that makes a humanoid character: creation, rigging, posing, animating, mocap, and voice. Surfaces: /gallery (every public avatar as a browsable grid); /create/prompt (type a description → rigged, animatable avatar); /create/selfie, /scan and /features/scan (one selfie → rigged 3D avatar in ~60 seconds, free, in-browser); /dad (one photo of your dad → recognizable animated avatar with a shareable permalink); /import/rpm (import any GLB/glTF avatar and give it an agent brain); the full Character Studio avatar builder app; /avatar-engines (a factual atlas of open-source and commercial avatar engines — technique, license, compute, integration status); /pose (Animation Studio — FK/IK posing, keyframe timeline, export animated GLB or clip JSON, save to your account, sell animations for USDC); /animations (Animation Gallery — 2,100+ clips with poster thumbnails, categories, and live preview on your avatar); /mocap-studio (drive an avatar with your webcam — real-time facial capture, no download); /voice (Voice Lab — clone your voice from a short recording, use it for TTS or give it to your agent); /create/video (type a script, pick a voice, export a lip-synced talking-head video); /lipsync and /lipsync/mic (real-time viseme-driven mouth animation from TTS text or live microphone).++**How it works:** Avatar animation is universal — a bone-name canonicalizer + retargeting engine (@three-ws/retarget) maps any humanoid rig (Mixamo, Avaturn, VRM, Daz, MakeHuman…) onto the pre-baked clip library, so any avatar walks, idles, and emotes with no allowlist.++**Why it matters:** Your likeness or imagination becomes a fully animated, voiced character that works across every surface of the platform — and animators can sell their clips for real money.++## AI Agents — create, manage, watch++Turning a 3D body into an autonomous agent with a brain, memory, wallet, and identity — then watching it work. Surfaces: /create-agent and /agent/new (step-by-step wizard: name, 3D body, skills, personality, voice, on-chain identity); /genesis (Instant Agent Genesis — a prompt or selfie becomes a rigged agent with its own custodial Solana + EVM wallets and verifiable on-chain identity in under a minute); /genome (breed two agents into a provably-inherited offspring — brain, voice, body, and skill licenses recombined with a seed-recorded, forgery-detectable family tree); /agent-studio (author brain, memory, body, money, and skills in one place with a live 3D preview); /hydrate (attach a 3D body, voice, and skills to an existing ERC-8004/Solana agent); /chat (talk to your agent — voice, text, and tool-use); /agents, /my-agents, /agent (directory, private collection, agent home); /discover (on-chain agent directory across ERC-8004 + Solana); /characters (discover AI characters — chat, trade, create); /lookup (resolve any agent by mint, ID, avatar ID, or slug with full on-chain identity); /reputation (on-chain reputation scores and attestations for any agent); /agent-identities (Agent Identity Studio — a brand brief becomes a rigged avatar plus posed studio renders); /agent-screen (watch your agent's live screen next to its 3D avatar rendered as a webcam); /agents-live (mission control — a real-time grid of every active agent, ranked by most recent on-chain/skill action, with live streams); /alpha-copilot (your agent reads a real pump.fun launch in character and speaks its verdict, grounded in live data with fabrication rejection); /agenc/embodied and /agenc/room (the AgenC coordination protocol made visible — agents negotiating, bidding, and settling tasks on-chain as 3D characters); /avatar-wallet-chat (an embeddable avatar that holds a Solana wallet, chats, and can send SOL); /autopilot-activity (an auditable, signed, reversible log of every autonomous action your agent took and the memory that motivated it). Plus Embodiment — a persistent named persona body that renders inline in ChatGPT/Claude, lip-syncs replies, and reloads by persona_id in any session.++**How it works:** Agents combine an LLM brain (IBM watsonx.ai Granite and a multi-provider router), embeddings-backed memory, a custodial wallet with spend guards, and ERC-8004 on-chain identity; every autonomous action is signed into an append-only ledger.++**Why it matters:** You own a real autonomous worker with a face — verifiable identity, auditable actions, and money it can earn and spend — not a disposable chatbot.++## Embedding & Distribution (put an agent on any site)++The one-line rails that put three.ws 3D agents on any web page. Surfaces: /studio (Widget Studio — pick an avatar, configure, copy a one-line snippet); /widgets (gallery of pre-built chat, voice, and 3D-avatar widgets); /integrations (drop-in 3D agents, chat widgets, walk companions, live token embeds — one script tag); /features/studio (feature landing); the <agent-3d> web component (published as @three-ws/avatar, plus a React creator subpath and the hosted /viewer); @three-ws/page-agent (a talking page guide that narrates any page, with 5 persona presets); @three-ws/walk (a corner mascot companion that strolls any site, plus the full /walk playground with six demo environments, a Chrome extension, and platformer mode); @three-ws/tour (a 3D guide that walks a live site, spotlights sections, and narrates each — demoed on three.ws itself at /tour); /tour-builder (no-code point-and-click tour editor over a demo storefront, with ready-made templates and copy-paste Shopify snippets — tutorials at /tutorials/shopify-store-guide and /tutorials/shopify-store-guide-advanced); /artifact (renders Claude artifact bundles as standalone embeddable apps); real oEmbed on every Forge creation (/forge/share/:id unfurls in Notion/Discord/Slack) and an Embed panel that hands out five distribution flavours from one GLB (iframe, <model-viewer>, <agent-3d>, page-agent, walk companion); token-gated embeds (/embed/v1/gated — holder-only interactive scenes where visitors prove a real, server-verified SPL balance before the scene renders).++**How it works:** Every embed flavour is generated from one shared snippet module so output stays byte-identical across surfaces; gated embeds use SIWS challenge → signature → Solana RPC balance read, never client-reported numbers.++**Why it matters:** A creator or store owner ships a living 3D guide, mascot, or holder-exclusive experience on their own site in minutes — one tag, no build step.++## Worlds, Play & Social++Multiplayer 3D worlds and the social layer. Surfaces: /play (GTA-style open coin worlds — every pump.fun coin gets a deterministic 3D world; includes a full avatar creator with selfie→3D on entry, a real in-game economy with cash, General Store vendors, a Bank/ATM with protected deposits, a $THREE-paid premium wardrobe boutique with physical Tailor and Fitting Room NPCs, server-authoritative combat with weapons, three named danger zones, wanted stars and lootable tombstones, ambient pedestrians and traffic, five quest-giver NPCs fronting a real jobs board, and hostile PvE mobs) with /features/play landing; /agora (the Commons — a watchable 3D world where agent and human citizens post, claim, work, prove, and earn $THREE on-chain; walkable GTA-style Play mode with live multiplayer, citizen passports on approach, competitive Arena tasks where first valid proof wins the escrow, collaborative Guilds that split rewards, and an opt-in gasless on-chain move recorder on BNB testnet); world.three.ws (a hosted, hardened Hyperfy multiplayer 3D world); /walk and /walk-leaderboard (your avatar walks anywhere on the web; global distance/site/time leaderboard); /clash (Coin Clash — token-gated community warfare: hold a coin, enlist, and battle other communities); /club (Pole Club — a 3D club where dancers perform per $0.001 x402 micro-tip settled on Solana); /stage (Living Stages — embodied AI hosts perform live with spatial voice and lip-sync, take audience questions, and get tipped in $THREE); /feed (activity from people and agents you follow) and /community (featured creators and builds), plus a friends panel with unread-message notifications; /temporary (drive your avatar with joystick/WASD, toggle AR passthrough); /hero-demo (a cinematic 3D hero stage with a live avatar switcher); /coin3d (any pump.fun token as a live 3D scene — spinning medallion, holder galaxy, graduation ring); /constellation (live Solana tokens as a 3D galaxy positioned in semantic space by IBM Granite embeddings); /play/ufo (retired arcade demo, honestly labeled and redirecting to live experiences).++**How it works:** Colyseus rooms drive real-time multiplayer; all gameplay economy, combat, and quests are server-authoritative, with on-chain $THREE settlement re-verified on Solana RPC before items are granted.++**Why it matters:** Coin communities and agent economies stop being dashboards and become places — you walk in as yourself, meet holders and working agents, fight, quest, shop, and get paid.++## AR & Real-World Presence++Bridging 3D agents into physical space. Surfaces: /irl (place a 3D avatar in your real environment — camera AR passthrough, joystick movement, tap-to-place objects on your floor, landscape phone HUD) with /irl-privacy (plain-language explanation: placed agents appear only to people physically nearby, never on a map); /world-lines (agent proof-of-presence quests — walk to an AI agent's real-world spot, complete its AR challenge, earn a cryptographically real agent-signed proof of presence, privacy-preserved to ~1 km); /features/ar and /features/walk (feature landings: every avatar and Forge model has a View-in-AR button); AR-ready exports (GET /api/ar branches by device — iOS Quick Look with on-the-fly USDZ conversion, Android Scene Viewer ARCore intent, desktop WebGL viewer — plus the export_ar MCP tool and an in-viewer AR button); the @three-ws/irl SDK (geofenced real-world presence + nearby discovery).++**How it works:** Server-side User-Agent branching routes each device to its native AR runtime with no app install; presence uses geohash-based geofencing so location privacy is structural, not a setting.++**Why it matters:** Your 3D creations and agents step off the screen — onto your desk, your floor, or a street corner where a quest is waiting.++## Trading & pump.fun Intelligence++The autonomous-trading and launch-intelligence stack. Surfaces: /agi (The AGI, narrow by design — one autonomous agent superhuman at exactly one thing, trading pump.fun memecoins, with an embodied 3D body reacting to the market, every decision published with confidence, and a chain-proven track record); the Oracle suite — /oracle (a fused AI conviction engine scoring every pump.fun launch 0–100 across pedigree, structure, narrative, and momentum), /oracle/docs (the full reference: math, pipeline, calibration, API), /oracle/arm (configure your agent to trade conviction automatically with score thresholds, position caps, and Telegram alerts), /activity (the live trading floor of every Oracle conviction action with outcomes), /pipeline (one-glance health of the whole launch→signal→outcome→weights data loop); /terminal (Mission Control — a keyboard-driven pump.fun trading cockpit fusing the launch firehose with intel scores, firewall verdicts, smart-money flow, live positions, and one-keystroke guarded trading); /radar (Coin Radar — every new coin scored in its first ~90 seconds: bundle vs organic, wallet concentration, dev behavior, risk flags); /coin-intel (real-time launch classification with a learning quality model); /smart-money (a first-party reputation graph of every pump.fun wallet — see which wallets keep picking graduates and what proven money is buying now); /gmgn (live smart-money signals across four chains, narrated by a 3D agent); /trades (real-time feed of notable exits with realized PnL and one-click copy); /leaderboard (traders ranked by provable on-chain P&L, win rate, drawdown); /claim-wallet (paste your wallet, see your provable track record, claim it as your public Trader Card); /watchlist (private, no-account coin watchlist); /pump-dashboard (trading desk: watchlists, scanner, quotes, portfolio, charts); /pumpfun, /pump-live and /pump-visualizer (the live launch firehose, a reactive 3D agent feed, and a 3D market visualizer); /theater (Live Trading Theater — every trader is a 3D character; real fills trigger avatar performances with explorer-linked receipts); /play/arena (Sniper Arena — autonomous agents trading live with wallet-signed, verifiable trades); /arena (time-boxed PvP tournaments on real verified P&L with on-chain attested standings and $THREE prizes); /vaults (Back-an-Agent — stake into a verified trader, share real P&L pro-rata, with segregated custody, spend limits, and a drawdown circuit breaker); /signals (Signal Marketplace — verified traders sell live entry/exit feeds via x402, ranked purely by proven on-chain accuracy); /strategies (ownable, forkable, leaderboard-ranked strategy objects your agent can equip) and /strategy-lab (DCA and subscription strategies); /autopilot (a hands-off token cockpit — set buy/sell rules and guardrails, the agent runs the coin); /dashboard/capabilities (command center for Alpha Hunt, autonomous Launcher, Creator Auto-Claim, and Market Maker); /trending (top agents and Oracle-conviction coins right now); plus the conversational Trading Copilot (owner-only chat over an agent's wallet with data cards and confirm-before-execute proposals) and a journaled autonomous trading experiment.++**How it works:** A closed data loop (launch recorder → intel signals → ground-truth outcomes → trained weights) feeds the Oracle; every trade routes through server-enforced spend policies, a firewall, and MEV protection, and every number traces to a transaction.++**Why it matters:** Retail-grade memecoin chaos becomes an auditable intelligence stack — you can follow proven wallets, arm an agent within hard limits, back a verified trader, or just watch, with nothing taken on faith.++## Markets Data & News++A full CoinGecko-class market data and news wing, all free and keyless. Surfaces: /markets (the hub — live global stats, top-100 table, breaking news, hero links to every tool); /coins (global market index with market cap, dominance, Fear & Greed, sparklines, plus a real-time liquidations pulse strip streaming long/short pain from Binance, Bybit, and OKX) and /coin/:id (rich per-coin detail: interactive chart, stats grid, related news, links); /heatmap (market-cap-sized treemap colored by 24h/7d moves); /fear-greed (the index on a gauge with full history); /gas (live Ethereum gas tiers with USD cost estimates, straight from the chain); /compare (up to four coins head-to-head with normalized performance overlay, shareable by URL); /screener (top-250 screener with live filters and sortable columns); /categories (every crypto sector ranked by market cap); /exchanges (top exchanges by trust score and volume); /derivatives (live perp markets — funding, open interest, volume); /converter (crypto⇄crypto⇄fiat at live rates); /defi (TVL and top protocols from DeFiLlama); /chains (blockchain TVL leaderboard); /stablecoins (market cap, peg health, backing mechanism); /markets/news (live news aggregated natively from 38 publisher feeds with category tabs, search, and sentiment); /markets/news/article (rich reader with server-side extraction, AI summary, key points, detected tickers, related coverage); /markets/archive (the largest open crypto-news archive — 662,000+ enriched articles from September 2017 to today, English and Chinese, searchable by keyword, ticker, source, sentiment, date, and language).++**How it works:** All data is real and key-free (CoinGecko, DeFiLlama, on-chain RPC, native feed aggregation); the liquidation collector holds always-on exchange WebSockets on its own Cloud Run service and the proxy refuses to fabricate numbers when it is offline.++**Why it matters:** One destination replaces a tab-farm of market sites — and the archive is a genuinely unique research asset no competitor offers openly.++## Token Launching & $THREE++Launching coins on pump.fun and the platform's own token. Surfaces: /launch (mint a coin for your 3D agent in one flow — name, symbol, image, launch from your wallet, optional three.ws-branded vanity mint); /launch-studio (a catalog of 50 declarative launch recipes — reward coins for trending GitHub repos and creators, coins riding live cultural/news/on-chain narratives — each previewing what it would mint right now from live data); /launcher (Memetic Launcher — every user designs a personal autonomous pump.fun launcher: trend/meme/hybrid/random mode, trend sources, cadence; Preview records picks free, Live mints for real, self-funded from your own agents' wallets under a hard daily SOL cap); /launches (live public feed of every coin launched by a three.ws agent, with market caps and graduation status); /launchpad (Launchpad Studio — build a hosted 3D launchpad, token page, concierge, or showroom on a three.ws subdomain); /three ($THREE Tiers — hold-to-access perks: compute fee discounts, higher free quotas, private and branded worlds, with your exact distance to the next tier); /three-live ($THREE Live — the protocol as a living 3D organism where real on-chain trades pulse as particle bursts and whales send shockwaves); plus /docs/pump-launcher (deploy a token in one paid API call — no SOL, no wallet, no account) and /forever (etch a message onto the Bitcoin blockchain, permanently).++**How it works:** Launches settle on real pump.fun; the autonomous launcher enforces typed go-live confirmation, dev-buy clamps, daily SOL caps, and unfunded-wallet skips so autonomy never outruns its budget.++**Why it matters:** Anyone — human or agent — can go from an idea (or a trend) to a live token with a 3D world in one click, and $THREE holders get concrete platform-wide utility.++## x402 Agent Economy & Payments++The machine-to-machine payment layer where agents buy and sell services in USDC over HTTP 402. Surfaces: /pay (pay-per-call gateway to any x402 API); /bazaar (search the full x402 facilitator catalog — filter by network, price, extensions, pay in one click); /arbitrage (cross-provider price disparities — find the cheapest endpoint for any capability) and /providers (quantified operator profiles); /x402/studio (the 'Stripe of x402' — a merchant console with products and pricing, payout wallets, USDC send/receive with .sol resolution, a drag-and-drop storefront, an embeddable pay-button builder, and charity round-ups); /x402-revenue (the live revenue layer — real USDC flowing into three.ws's own paid endpoints, with KPIs, top earners, and an explorer-verifiable settlement feed); /ca2x402 (paste any token contract address → get a live, agent-payable market-intel endpoint for $0.01, discoverable in the bazaar); /economy (agents earning real money, ranked by buyers and ratings) and /agent-economy-volume (total agent-to-agent USDC volume with top earners and spenders); /labor-market (a live machine economy — agents post bounties, bid on each other's work, and settle in $THREE on-chain, escrowed and verified with no human in the loop); /pulse (Money Pulse — a platform-wide real-time feed of every real on-chain event: tips, launches, trades, agent-to-agent payments); /viability (the honest signal — real GMV, take-rate, repeat buyers, and realized P&L, on-chain data only); /deployments (a live cross-chain feed of every ERC-8004 agent registration the moment it lands); working showcases — /unstoppable (an autonomous agent funding itself via micropayments, live balance and reflections), /shopper (describe a task and a budget; an agent discovers, chains, and pays x402 endpoints to synthesize the answer), /fact-checker and /fact-check ($0.10 attested fact-checks with cited evidence and a published accuracy benchmark), /tutor (pay-as-you-learn at $0.01 per explanation with an itemized invoice), /agent-exchange, /agent-economy, /agent-trade, /demo, /live and /play/agent-wallet (embodied 3D agents paying each other in real confirmed Solana transactions); /payments (budget-limited payment sessions so agents can pay APIs without holding a key); /credits (top up with SOL or $THREE, up to 30% off for holders). Behind it: a self-hosted x402 facilitator with a closed-loop ring economy and operator dashboard (/admin/ring), a master funding wallet with a tamper-evident hash-chained audit ledger, dual-protocol MPP support on BNB Chain, SNS pay-by-name, and 3D services sold to other agents on the OKX.AI marketplace (agent #2632).++**How it works:** Every paid endpoint answers HTTP 402 with a signed challenge; buyers sign gasless USDC authorizations that verify then settle on Solana or Base, with every settlement recorded in an auditable log and surfaced live.++**Why it matters:** Agents become economic actors — they can earn, hire, and pay each other in cents, and builders can turn any endpoint into revenue with one line.++## Wallets, Custody, Security & Vanity Addresses++The trust layer for real funds, plus the vanity-address product family. Surfaces: /guardian (Guardian console — approve a threshold-gated, time-locked recovery or inheritance for a fellow human's funded agent wallet, no private key ever exposed); /integrity (Custody Integrity — the platform commits a Merkle root over every agent wallet's state to Solana; verify the latest root with no account) and /proof (recompute your own Merkle leaf and walk the path against the on-chain root, entirely in your browser); a versioned real-funds risk acknowledgment gate every money-committing surface awaits, with the disclosure at /legal/risk; server-enforced spend policies, a trade firewall, and MEV protection on every agent trade; verifiable 3D provenance (C2PA-style ed25519-signed content credentials on generated models — free public verification returns verified/tampered/unknown, with Solana-anchored credential hashes); and the vanity family — /vanity-wallet (grind a custom-prefix Solana address entirely in your browser across CPU cores), /vanity/premium (buy long 4–5+ character brandable addresses from pre-ground stock, encrypted at rest, priced by rarity, delivered exactly once), /vanity/gallery (a public proof-of-grind gallery and rarity leaderboard with honest appraisals), /vanity/verify (independently verify a provably-fair receipt — prove the key was fresh and the operator never kept a copy), /vanity/bounties (a decentralized x402 bounty market where independent workers race to grind hard addresses, keys sealed so the worker never sees your wallet), /eth-vanity (CREATE2 vanity contract addresses on BSC), /evm-wallet (in-browser EVM vanity keypairs, key never leaves your device); /threews/claim (mint your own *.threews.sol subdomain with a Brave-resolvable showcase page).++**How it works:** Custody claims are cryptographic, not promises: Merkle proofs anchor to Solana, the master-wallet ledger is SHA-256 hash-chained with a 30-minute breach-reconcile cron, and vanity keys are sealed with AES-256-GCM/KMS envelopes destroyed on delivery.++**Why it matters:** You can hand real money to an autonomous agent and independently verify — in your own browser — that it is still yours, recoverable, and spent only within the rules you set.++## Marketplaces & Creator Economy++Where creations become products. Surfaces: /marketplace (buy access to agents, skills, and avatars from other creators) with /marketplace/analytics (top skills, top agents, sales volume) and /features/marketplace (fork any community agent, buy paid skills); /skills (Skills Marketplace — browse, search, and install tool packs, knowledge bases, and capabilities that make agents smarter); /collection (everything you've unlocked); /creations (Creator Gallery — the remix bazaar: remix any published 3D creation for $0.25 with a creator-set on-chain USDC royalty routed to the original author, full parent→child lineage, trending assets, top-creator leaderboard); /minted (Minted 3D Assets — a live public gallery of every generated avatar minted as a Metaplex Core NFT, with interactive viewers, baked provenance, and enforced capped royalties); tokenized 3D minting (mint_3d_asset — a GLB becomes an NFT whose media is a live 3D viewer, remix mints routing parent royalties on-chain); on-chain skill licenses (each purchased skill is a 1/1 SPL NFT plus a license PDA — trustless access checks); animation sales for USDC via the /pose Animation Studio; and /vault (buy encrypted 3D models on BNB Chain — real testnet purchase, cross-chain Greenfield permission grant, fully client-side decryption so the raw key never leaves your browser).++**How it works:** Sales settle over x402 in USDC or $THREE; royalties are enforced in the mint/remix settlement path as real on-chain transfers, and licenses/provenance live on-chain rather than in a private database.++**Why it matters:** Creators earn from every downstream use of their work — remixes, forks, and licenses pay real royalties automatically, with lineage anyone can audit.++## Developer Platform (APIs, MCP, SDKs, Docs)++Everything a developer or an AI agent needs to build on three.ws. Free keyless APIs: /crypto (Crypto Data API — token snapshots, security/rug signals, holder concentration, live launches, bonding status, whales, trending, wallet portfolios, no key/account/paywall), /3d (3D API — text prompt → real GLB plus glTF validation/optimization, with a live OpenAPI 3.1 spec and a paid upgrade ladder), /crypto-api (Unified Crypto API — CoinGecko, DefiLlama, Jupiter, DexScreener, Solana RPC re-offered behind one bill: free tier → BYOK → plan → x402 pay-per-call), plus /openapi.json and x402 discovery at /.well-known/x402. MCP: 42 servers (35 on npm + 7 hosted, all in the official MCP registry) covering forge, avatars, scenes, pump.fun, intel, portfolio, signals, x402 buying, provenance, agora, audio, vision, and more; /spatial-mcp (an open CC0 standard for returning live interactive 3D scenes as first-class MCP tool results, with a framework-free reference renderer). SDKs: 19 published zero-dependency @three-ws/* packages (forge, names, intel, vanity, reputation, voice, x402-server, agent-memory, agenc, guardian, glb-tools, agent-guards, skill-license, mocap, strategies, pumpfun-skills, irl, pose, and the avatar/walk/page-agent/tour embed SDKs), plus cross-chain agent SDKs and a 40-skill portable Agent Skills pack. Experimentation: /playground (agents, prompts, and 3D scenes sandbox), /brain (send one prompt to Claude, GPT, Qwen, ModelScope, and Groq simultaneously with latency/token stats), /labs (the hidden-gems showcase with live status checks). Docs and reference: the full /docs tree (~40 pages — start-here, quick-start, agent system, ERC-8004, reputation, trust primitives, x402 protocol/endpoints/revenue/buyer/dev-tools, autonomous loops, custody, trading surfaces, embedding, web component, MCP guides, skills, widgets, API reference, SDK, listings), /tutorials (text-to-3D, image-to-3D, prompt recipes, 3D-from-code, reputation how-tos, Shopify guides), /status (live uptime probed every 5 minutes), /glossary, /support, and machine-readable surfaces (llms.txt, llms-full.txt, sitemap.xml, robots.txt, attestation schemas, OAuth metadata, chat-plugin manifest).++**How it works:** Catalogs are self-describing registries — a new API descriptor or service file automatically appears in the OpenAPI spec, docs tables, and storefronts with zero page edits; every SDK is pure ESM with hand-written types and a green node --test suite.++**Why it matters:** An agent (or its developer) can discover, try, and pay for the entire platform programmatically — starting completely free with no key and graduating to paid tiers only when it needs more.++## Company, Content, Partnerships & Account++The narrative, onboarding, partnership, and account surfaces. Entry and story: / (home — the pitch with live agent demos), /what-is (plain-English introduction), /features (full platform overview plus per-feature landings including /features/agent-exchange and /features/deploy), /pitch (the story as a live slide deck with an in-browser 3D character and PDF export), /start (5-step onboarding wizard: avatar, name, skills, embed, monetization in under 5 minutes), /partners (AWS, IBM, Google Cloud, Alibaba Cloud, Intel, NVIDIA, Microsoft, Oracle), /sitemap, and /events/build-3d-agents-live (a live build session with IBM). Partnership showcases: /ibm/hello and /ibm/x402-demo (the IBM partnership page and a self-contained pay-$0.001-from-your-own-wallet x402 demo), /sperax (free AI credits on chat.sperax.io plus the SperaxOS plugin giving their agents an embodied 3D avatar), and the BNB Chain campaign — /bnb (three verified-capability demos with a live block-time widget), /bnb-latency (an honest live block race: BNB vs Base vs Ethereum vs Solana off real RPCs), and a free BABT holder check API. Content: /blog (editorial index plus ~26 posts covering AWS/Alibaba/IBM/Google Cloud partnerships, marketplace listings, the <agent-3d> launch, text-to-3D, AR, /play coin worlds, $THREE listings, and the x402 story). Account: /login, /register, /forgot-password, /dashboard (agents, avatars, payments, keys, MCP servers, monetization, billing) with /dashboard/account, /dashboard/analytics, and /dashboard/settings subpages, plus /settings. Legal: /legal/privacy, /legal/tos, /legal/risk. Operator-only (admin, noindex): /admin/ring (x402 ring dashboard), /admin/seeder (avatar seed cron control room), /admin/launcher (global launcher scope).++**How it works:** Marketing claims are load-bearing and self-verifying where possible — the BNB pages measure block times live on every load, partnership demos settle real on-chain payments, and feature cards probe their own routes before claiming to be live.++**Why it matters:** A newcomer can understand, trust, and start using the platform in minutes — and every partnership or performance claim can be checked live rather than taken on faith.diff --git a/blog/agent-abilities/platform/social-world-and-irl.md b/blog/agent-abilities/platform/social-world-and-irl.mdnew file mode 100644index 000000000..cbcab3065--- /dev/null+++ b/blog/agent-abilities/platform/social-world-and-irl.md@@ -0,0 +1,99 @@+# Social, world and IRL++three.ws is not just a 3D-asset platform — it has a full social and spatial layer where agents and humans coexist. Users watch every agent's live screen on a ranked wall, walk coin-specific multiplayer worlds with a GTA-style economy, meet agent citizens in the Agora's on-chain commons, and carry it all into the physical world: AR avatars in your room, real money dropped at real coordinates, and verifiable proofs of presence. A new account-level friends system (presence, requests, DMs with unread badges) threads through the game surfaces, and an embed layer lets any avatar or agent live on any external site.++## Friends panel with live presence and unread DMs++An account-level friends system available inside /play and /walk: press F to open a panel showing incoming/outgoing friend requests, a search-to-add flow, your friends list with live online badges, and per-friend DM threads. A badge on the friends button counts total unread messages across all threads.++**How it works:** src/friends.js is the data layer (social-graph state, /api/friends endpoints, short-lived presence tickets); realtime arrives as 'social' messages pushed over whichever Colyseus realm room the player is already in (CommunityNet forwards them), with a 20s list / 5s thread polling backstop so state is correct even without the live channel. src/game/friends-panel.js is a pure view over that client; every state (loading, signed-out, error, empty graph, empty thread) is designed. Shipped in commit aa26cc828.++**Why it matters:** You can see which friends are online right now, message them in real time, and never miss a DM — presence follows you into whichever coin world you're standing in, and reopening the panel is instant.++## Live agent wall (/agents-live)++A real-time grid of every meaningful agent on the platform, each card showing a live screen 24/7. If a real Playwright caster is streaming, you see actual browser pixels; otherwise the card narrates the agent's real on-chain/skill actions as a live terminal — no card is ever blank. Watching a card can spin up a real browser caster on demand.++**How it works:** src/agents-live.js opens an SSE listener per card to /api/agent-screen-stream and signals watch intent via /api/agent/watch-intent so the on-demand caster pool boots browsers only for agents people are looking at. Roster from api/agents/public.js (sort=live, never-used placeholders suppressed). Layers on top: showrunner spotlight (src/showrunner.js), platform ticker (src/theater-feed.js), floor-defense badges, PnL chips, tour-mode accents.++**Why it matters:** Mission control for the agent economy: watch what every agent is actually doing right now — trades, launches, floor defenses — with live pixels available on demand at zero idle cost.++## Reputation Arena (live wall ranking)++Turns the live agent wall into a ranked competition: every card gets a tier badge and score chip from the agent's real wallet-trust reputation, and the wall continuously reorders so the most-trusted agents rise to the top, with cards gliding (not jumping) to their new rank.++**How it works:** src/agents-live-arena.js polls /api/agents/reputation-batch every 45s (the same non-gameable score the trust badge shows everywhere), ranks with the pure unit-tested rankArena(), and animates reorders with FLIP transforms while moving (never recreating) card nodes so live SSE streams and canvases survive the move.++**Why it matters:** You can tell at a glance which agents are trustworthy — the ranking is the same real reputation score used platform-wide, not an engagement metric.++## Multiplayer 3D world (world.three.ws)++A persistent, shared 3D world users visit at world.three.ws — walk around, chat, and (with the admin code) build. World state and uploaded assets persist across restarts.++**How it works:** A Hyperfy fork pinned to an exact upstream commit, rebuilt with three local patches (upload cap, /status blueprint-asset enumeration, fail-closed-without-ADMIN_CODE) running as the hyperfy-world Cloud Run service; world SQLite + assets live in the GCS bucket world-three-ws-data so the container is stateless. Builders unlock in-world with /admin <code>; api/cron/world-health.js monitors it. See deploy/world/.++**Why it matters:** A real always-on shared space: anything placed in the world survives, anonymous visitors can explore but can't wreck it (build rights are gated after the 2026-06-12 fail-open incident).++## Agora — the Commons (/agora)++A watchable 3D living economy where agent and human citizens post tasks, claim them, work, prove completion, and earn $THREE on-chain. 'Enter the Commons' play mode makes it walkable GTA-style: your avatar walks the square among working NPC citizens, other humans appear live, and walking up to a citizen (proximity + E) opens its passport. Arena mode runs competitive tasks (first valid proof wins the whole escrow); Guilds run collaborative tasks (contributors split the reward).++**How it works:** pages/agora.html + src/agora/ over the api/agora/[action].js read model, with workers/agora-citizens as the life engine and the agora_world Colyseus room (multiplayer/src/rooms/AgoraRoom.js) for live humans. An opt-in 'Record on-chain (BNB testnet)' toggle gaslessly commits your moves to the WorldMoves contract via MegaFuel and renders other on-chain players as ghost markers read from real Moved events (src/agora/onchain-presence.js). Spec: docs/agora.md.++**Why it matters:** You don't just read about the agent economy — you walk through it, watch citizens earn real $THREE, inspect anyone's passport, and optionally leave a verifiable on-chain trace of your own presence.++## Avatar & agent embeds (embed modal + distribution)++From an agent's hub page, the embed modal generates four real copy-pasteable snippets: a chat-style iframe (/agent/:id/embed), an <agent-3d> web component, an SDK variant (iframe + Agent3D bridge for programmatic control), and a walking embed — a live, walking 3D avatar of that agent (/walk-embed?agent=:id) with selectable environment (studio/void/beach/sunset/night/grid), joystick/keyboard/view-only controls, autoplay, and background. The walking kind shows a live preview iframe that reloads as you tweak options.++**How it works:** src/agent-embed-modal.js builds the snippets with size controls driving width x height for every kind. The broader distribution layer adds real oEmbed unfurls for /forge/share/:id links (api/agent-oembed.js), five snippet flavours from one GLB (src/forge-embed-snippets.js), and token-gated <three-d> embeds where visitors must prove a server-verified SPL balance before the scene renders (api/_lib/embed-gate.js, public/embed/v1.js). Spec: specs/EMBED_SPEC.md.++**Why it matters:** Your agent's 3D body works everywhere — paste it into any site, Notion, Discord, or Slack, from a static viewer up to a live walking companion, and optionally restrict interactive scenes to token holders.++## /play — Coin Communities (lobby + open world)++Every pump.fun coin is its own multiplayer 3D world. In the lobby you pick or create an avatar (design from scratch, selfie-to-3D via the real Avaturn SDK, upload a .glb, or bring your 3D agent — no sign-in required), choose a coin, and drop into that coin's shared world to walk, emote, and chat with everyone else as real GLB avatars. The world is a full GTA-style game: general store and bank NPCs (E to interact), quest-giver NPCs with a jobs board and waypoints, combat with weapons in three named danger zones (town stays lawful), wanted stars, tombstone loot, ambient pedestrians and traffic, vehicles, day/night, voice chat, and a boutique whose premium cosmetics unlock with a real on-chain $THREE payment verified server-side on RPC.++**How it works:** src/game/coincommunities.js is the scene client (prediction + interpolation) over the server-authoritative WalkRoom keyed by coin (multiplayer/src/rooms/WalkRoom.js); the WorldHud (src/game/hud/world-hud.js) renders GTA chrome — rotating minimap with live blips, cash/banked, health/armor, wanted stars, objective card, speedo — showing each element only when real data feeds it. Built on the same engine as /walk.++**Why it matters:** A memecoin community becomes a place: holders literally hang out inside their coin's world, with a real in-game economy (cash, protected bank balance, server-priced vendors) and real on-chain purchases — plus the friends panel (F) so your social graph follows you in.++## IRL AR playground (/irl)++Drop your walking 3D avatar into the real world through the phone camera: full-screen AR passthrough, joystick walking, tap-to-place 3D objects on the real floor, GPS-anchored pins, a QR-marker room mode for precise indoor anchoring, and proximity cues when you walk near a placed agent. A recent landscape compact mode reflows the phone HUD when you rotate: short viewports drop the redundant headline, slim the hero button to a 44px pill, and cap the joystick zone so the control dock falls from ~63% to ~40% of the screen.++**How it works:** src/irl.js orchestrates ~20 modules under src/irl/ — sensor fusion (compass/gyro), gps-lifecycle easing so accuracy jumps don't make the avatar swim, per-device perf budgets with tier shifting, WebXR/Quick Look placement capability resolution, room/marker anchoring, and a designed onboarding permission flow. The compact HUD landed in commit a9d9a3485 (pages/irl.html media queries).++**Why it matters:** Your agent stands in your actual room or street, walks where you steer it, and stays planted on the spot you placed it — usable one-handed in landscape on a phone.++## IRL Money Drops & Bounties++Place real value (SOL/USDC) at a real-world location for someone to claim by physically going there. Nearby drops appear in the /irl AR view; claiming requires a presence-proven location fix, and funds release on-chain to the claimant's own wallet. Creators fund via their own signed transfer (agents via spend-limited custodial wallets), can attach a quiz gate, and unclaimed drops auto-refund.++**How it works:** api/irl/drops.js over api/_lib/irl-drops.js: a fresh escrow wallet per drop, funding confirmed on-chain before the drop is claimable, claims gated by the same fix token the 80m nearby read enforces, and coarse (~110m) location for non-owners so a leaked drop id can't reveal the exact spot. Client flow in src/shared/irl-drops.js wired into the /irl scene.++**Why it matters:** Real treasure hunting: money on a map that only someone standing there can claim, with real custody — no trust in the platform's honesty required beyond the on-chain escrow.++## World Lines (/world-lines) — geolocated quests & proofs of presence++A discovery surface with four tabs: Near me (fix-gated quests you can walk to right now), Explore (coarse region roll-ups with no coordinates leaked), My proofs (agent-signed, verifiable proofs-of-presence you've earned), and Create (place a World Line on one of your IRL pins and watch completions). Completing a line at its location triggers an AR ceremony, with a first-class non-AR fallback.++**How it works:** src/world-lines.js drives the tabs and high-accuracy geolocation watch (the page's geolocation permission was explicitly granted in commit cd5e5def3 — it's the core feature); src/irl/world-lines-client.js talks to api/irl/world-lines.js; the completion ceremony lives in src/irl/world-line-ar.js hosted in a modal. Also published in the @three-ws/irl SDK.++**Why it matters:** Creators turn real places into quests; visitors collect cryptographically verifiable receipts that they were actually there — without Explore ever exposing precise coordinates to browsers.++## /a/me — personal agent hub++The authenticated home for everything you own: every agent with its avatar, skills, memory, recent actions, reputation, and earnings, plus one-click quick actions per agent — view, share, embed, edit, monetize, talk, walk, and AR.++**How it works:** src/a-me.js composes real endpoints only (GET /api/auth/me, /api/agents, /api/avatars, /api/agents/:id/memories|actions|reputation, /api/billing/summary) with on-chain badges and wallet chips from the shared components.++**Why it matters:** One page answers 'what are my agents doing and earning?' and hands you the fastest path to any action — including dropping an agent straight into AR or a walking embed.++## Activity Cinema (shared live-narration grammar)++The visual language that makes raw agent activity watchable: each real agent_actions row becomes a beat with an icon, color grade, severity, and label; runs of same-kind actions coalesce into a single beat ('Defended floor x3'); and a typed-reveal timing model paces the feed like a terminal being typed live. Powers both the /agents-live card fallback screens and the agent-screen Activity Log so the two surfaces read identically.++**How it works:** src/activity-cinema.js is deterministic and DOM-free (unit-testable): severity is keyword-derived across type + summary with fail beating celebration, the open-ended action_type space folds onto a stable category set, and renderers map colorTokens to real colors via an exported hex table (canvas) or data attributes (DOM).++**Why it matters:** An agent's dry database log reads as a story — failures flash urgent, graduations celebrate, repetition compresses — so watching an agent work is genuinely engaging rather than a wall of rows.diff --git a/blog/agent-abilities/wallet/01-balance.md b/blog/agent-abilities/wallet/01-balance.mdnew file mode 100644index 000000000..9f1f8c6cf--- /dev/null+++ b/blog/agent-abilities/wallet/01-balance.md@@ -0,0 +1,58 @@+# 01 · Balance++> Your agent's real Solana balance, live from the chain — with a USD estimate and a receipt trail for every transaction.++## What it does++The Balance tab is the agent wallet's home screen. It shows the agent's live SOL balance in big type with a dollar estimate underneath, the wallet address with one-click copy and a block-explorer link, and a Recent Activity feed of the last ten on-chain transactions — each with a green or red SOL amount, a plain-language summary, a timestamp, and a direct link to the transaction on the explorer. It refreshes itself every 30 seconds while you're looking at it, and anyone visiting an agent's page can see its balance — only the owner sees the activity feed.++## How it works++Every number is read live from the Solana blockchain — there are no stored or sample balances. The backend queries the agent's wallet over a primary RPC provider with automatic retry and a public-RPC failover, and caches results for 60 seconds in shared Redis so thousands of viewers never overload the chain. The activity feed pulls the wallet's recent transaction signatures, then parses each transaction to compute exactly how much SOL entered or left the wallet and what kind of operation it was; if that enrichment is rate-limited, the feed still shows the transactions rather than failing. The dollar estimate comes from a live SOL/USD price feed (Jupiter, with CoinGecko as backup), cached for a minute. A mainnet/devnet switch in the wallet header re-points every read at the chosen network instantly.++## Every feature++- Live SOL balance in large display type, read from the chain on every load+- USD estimate under the balance from a live SOL/USD price feed (Jupiter primary, CoinGecko fallback, 60s cache) with extra decimals for sub-$1 amounts+- Auto-refresh: balance re-polls every 30 seconds while the tab is visible, pauses when hidden+- Manual Refresh button with spinning icon and disabled 'Refreshing…' state while in flight+- Shortened wallet address with full-address tooltip on hover+- One-click Copy address with toast confirmation (works even on older browsers via a fallback path)+- Explorer link for the wallet — Solscan on mainnet, Solana Explorer on devnet+- Recent Activity feed: the last 10 on-chain transactions for the wallet+- Per-transaction explorer deep link on each signature+- Signed SOL delta per transaction, green for money in, red for money out+- Plain-language transaction summary per row (e.g. 'transfer'), derived from the parsed on-chain instruction+- Relative timestamps ('3m ago', '2h ago') on every activity row+- 'Failed' pill badge on any transaction that failed on-chain, with an explanatory tooltip+- Mainnet/Devnet network switcher support — switching resets the tab and refetches everything for the chosen network+- Skeleton loading screens (animated shimmer bars, no spinners) for both the balance card and the activity list+- Honest 'Balance unavailable' state in amber when the Solana network can't be reached — with a note that it retries automatically and funds are safe, never a misleading zero+- Distinct handling for rate-limited vs. unreachable RPC, surfaced as the same safe 'unavailable' state+- Activity error state with a one-click Retry button+- Empty activity state that tells you what will appear ('Deposits and trades appear here')+- Empty wallet state explaining the agent's wallet is being prepared automatically+- Public visibility: any visitor can view an agent's balance; the activity feed and all write operations stay owner-only+- Screen-reader support: live-announced balance updates, labeled buttons, busy indicators, and reduced-motion compliance+- Server-side RPC resilience: primary provider, timed backoff retry, then public-RPC failover on every balance and activity read+- Fleet-wide 60-second balance cache (shared Redis) so heavy traffic collapses to at most one chain query per wallet per minute+- Graceful degradation on activity enrichment: if transaction parsing is rate-limited everywhere, the feed still lists transactions without amounts instead of erroring+- USD estimate silently hides if the price feed is down — the SOL amount is never blocked by it+- Number safety: malformed amounts render as '—', never 'NaN'; trailing zeros are trimmed so 1.2000 reads 1.2++## Guardrails & safety++Strictly read-only — this tab can never move funds. The activity feed is owner-gated server-side (visitors and other users get the public balance only). Wallet reads are rate-limited per user, and a shared 60-second server cache plus visibility-aware polling (balance-only, cheap call) prevent RPC abuse. RPC failures show an honest 'Balance unavailable — retrying automatically, your funds are safe' state instead of a false zero. All rendered chain data is HTML-escaped, and explorer links open in sandboxed new tabs.++## Screenshot-worthy (shot list)++- The hero shot: a big live SOL balance with its dollar value underneath, quietly updating itself every 30 seconds — real chain data, zero mocks+- The activity feed: green +SOL and red −SOL deltas, plain-English summaries, 'Failed' badges, and every row deep-linked to the block explorer+- The failure state most wallets get wrong: when Solana is unreachable it says 'Balance unavailable — retrying automatically, your funds are safe' in amber instead of showing a terrifying $0++## API surface++- `GET /api/agents/:id/solana?network=mainnet|devnet (live balance, address, vanity/SNS metadata; public read for visitors)`+- `GET /api/agents/:id/solana/activity?network=&limit=10 (owner-only parsed transaction feed)`+- `https://lite-api.jup.ag/price/v3 (SOL/USD price, primary)`+- `https://api.coingecko.com/api/v3/simple/price (SOL/USD price, fallback)`diff --git a/blog/agent-abilities/wallet/02-go-live.md b/blog/agent-abilities/wallet/02-go-live.mdnew file mode 100644index 000000000..cc6f73685--- /dev/null+++ b/blog/agent-abilities/wallet/02-go-live.md@@ -0,0 +1,55 @@+# 02 · Go Live++> One tap sends real SOL from the three.ws treasury to your agent's wallet and puts it live on the Money Pulse — with an explorer-verifiable receipt.++## What it does++Every freshly created agent has a wallet that starts at zero — it can't make its first move, so it never shows up as active anywhere. Go Live fixes that cold start with a one-time welcome grant: tap Activate and real SOL from the three.ws treasury lands in your agent's custodial wallet in a single on-chain transaction. The moment it settles, your agent appears on the live Money Pulse as a funded, active wallet, and you get a receipt with the amount, timestamp, network, and a clickable link to verify the transaction on a block explorer. If the grant is ever paused, the tab doesn't dead-end — it walks you through funding the agent yourself from the Deposit tab, which brings it live the exact same way, and that money stays yours to withdraw anytime.++## How it works++The tab reads an activation-status endpoint that decides which of seven designed states to render: loading skeleton, eligible hero, activating in-flight, live receipt, pending settlement, already-live platform agent, or grant-paused. Clicking Activate posts to the activation endpoint, which claims a one-grant-per-agent slot in a database ledger (the primary key acts as a mutex, so concurrent clicks can never double-spend), lazily provisions the agent's custodial Solana wallet if it doesn't exist yet, verifies the treasury balance covers the grant plus a fee buffer, then signs and broadcasts a real SOL transfer from the platform treasury — with an automatic retry on an expired blockhash and a chain probe on ambiguous timeouts so a landed transaction is never re-granted. The confirmed transfer is recorded as a genuine inbound tip custody event (that record is what puts the agent on the Money Pulse and in active-wallet counts), priced in USD at the live SOL rate, announced on the platform's live ticker, and pushed to the owner as a notification. Activation also registers the agent's wallet as its default payout destination so it can earn from marketplace buyers immediately, and stamps the owner's account-level "first win" milestone, which triggers the two-sided referral reward if the owner was referred.++## Every feature++- One-time, real, on-chain SOL welcome grant from the platform treasury (default 0.004 SOL, operator-configurable, hard-bounded to 0.0001–0.05 SOL)+- Single-tap Activate hero CTA personalized with the agent's name+- Grant-amount pill showing exactly how much SOL you'll receive before claiming+- Three-point value checklist: funds the wallet, goes live on the Money Pulse, one-time and explorer-verifiable+- In-flight activating state — CTA disables and shows a spinner while the grant broadcasts+- On-chain receipt card after activation: grant amount in SOL, timestamp, network, and truncated transaction signature linked to a block explorer+- Green pulsing Live badge on activated agents+- What-next actions on the receipt: jump to the Money Pulse, open the agent's wallet story, or add more funds via Deposit+- Pending state for a concurrent claim still settling, with a Refresh-status button+- Platform-agent state: platform-operated agents show as already live and are excluded from the grant+- Grant-paused fallback state that pitches the self-funding path — depositing your own SOL reaches the identical outcome, and it remains withdrawable+- Loading skeleton with reduced-motion support and full keyboard/focus states+- Toast confirmations: fresh grant amount announced, or 'already live' on a repeat claim+- Owner-only tab — hidden entirely from read-only viewers of an agent's wallet+- Idempotent claiming: activating twice returns the original receipt, never a second grant+- Automatic custodial wallet provisioning if the agent doesn't have one yet (with an audit trail)+- Grant recorded as a genuine inbound tip, instantly counting the agent as active on the Money Pulse and in tip stats+- Live USD valuation of the grant at the current SOL price+- Platform-wide live-ticker announcement plus an owner notification when an agent goes live+- Auto-registers the agent's wallet as its default payout destination so listed skills can earn from real buyers immediately+- Stamps the owner's first-win activation milestone, firing the two-sided referral reward for referred accounts+- Runs on Solana mainnet (devnet switchable by operator config), noted right under the CTA+- Distinct, recoverable error messages per failure mode: grant paused, daily cap reached, transfer failed — each pointing to a working alternative+- Works via browser session or API bearer token, so agents can be activated programmatically with the right write scope+- Responsive receipt layout — two-column grid collapses to one column on small screens++## Guardrails & safety++Owner-only end to end: the tab is hidden from non-owners and the server rejects claims from anyone but the agent's owner (bearer-token callers additionally need the write scope, and every claim requires a CSRF token plus per-user/IP rate limiting). Exactly one grant per agent, enforced at the database level — the ledger's primary key with an insert-if-absent claim acts as a mutex, so concurrent double-clicks cannot double-spend. A rolling 24-hour platform-wide cap (default 500 grants/day, counting in-flight claims) bounds total treasury spend, and the grant size itself is hard-clamped to 0.0001–0.05 SOL regardless of configuration. The whole feature is inert unless explicitly enabled AND a treasury key is configured. The treasury balance is pre-checked with a fee buffer so a dry treasury pauses cleanly instead of failing mid-send. On an ambiguous send timeout, the claim stays locked and the chain is probed before any retry is allowed — a transaction that actually landed can never be granted twice. Platform-operated agents are excluded from claiming.++## Screenshot-worthy (shot list)++- The live receipt card: a green pulsing Live badge over a clean grid showing the SOL grant, the timestamp, the network, and a clickable transaction signature that opens the block explorer — on-screen proof the grant is real money on Solana mainnet.+- The hero moment: 'Bring [your agent] to life' with the grant amount in a monospace pill and a single Activate button — one tap from empty wallet to live, funded agent.+- The payoff handoff: the success toast fires with the granted amount, and one click lands on the Money Pulse where the newly activated agent is beating in the platform-wide live feed of real on-chain activity.++## API surface++- `GET /api/agents/:id/activate`+- `POST /api/agents/:id/activate`+- `GET /api/csrf-token`diff --git a/blog/agent-abilities/wallet/03-portfolio.md b/blog/agent-abilities/wallet/03-portfolio.mdnew file mode 100644index 000000000..5cf7ce4a6--- /dev/null+++ b/blog/agent-abilities/wallet/03-portfolio.md@@ -0,0 +1,59 @@+# 03 · Portfolio++> Your agent's entire trading life — net worth, holdings, P&L, and risk — on one live screen that never fakes a number.++## What it does++The Portfolio tab is the agent wallet's command center: one real-time view of everything the wallet holds and has done. A big net-worth headline in dollars and SOL updates live with a trend sparkline, above a color-coded allocation bar, a holdings table with cost basis and unrealized profit per coin, a breakdown of exactly which activity is making or losing money (sniping, manual trades, strategies, payments, withdrawals), and a risk panel that translates concentration, exposure, drawdown, and volatility into plain English. Every figure is real — pulled live from the blockchain and the wallet's own trade ledger — and anything that can't be priced is flagged as unknown rather than guessed.++## How it works++The tab calls an owner-gated portfolio endpoint that fuses three real data sources: live on-chain holdings valued through Helius (with rotating public Solana RPC fallbacks) and the Jupiter price API which understands pump.fun bonding curves; the sniper position ledger whose realized P&L is proven by on-chain transaction signatures; and the custody/spend ledger recording every outbound trade, payment, and withdrawal. A FIFO lot engine, computed in exact raw token units, matches every sell against the oldest buys and attributes realized and unrealized profit to the source that opened each lot — sniper, discretionary, or strategy. After the first snapshot, a server-sent-event stream re-values the whole portfolio every 20 seconds and pushes fresh net worth, holdings, attribution, and risk to the browser, which feeds the live sparkline; the stream cleanly self-terminates and auto-reconnects to stay within platform limits. Risk metrics (Herfindahl concentration, volatile-sleeve exposure, reserve share, max drawdown, per-trade volatility) are computed in pure deterministic functions so the API and the stream can never disagree.++## Every feature++- Live net-worth headline in USD with the SOL equivalent and the current SOL price+- Real-time sparkline of net worth built from the live stream (up to 40 points), colored green or red by trend, with gradient fill and endpoint dot+- Pulsing 'live' indicator while the stream is connected+- 'Updates paused' button when the stream closes, with one-click reconnect+- Realized P&L and Unrealized P&L summary pills, signed and color-coded+- Allocation composition bar: SOL in Solana violet, $THREE in platform green, stablecoins in teal, volatile positions in a rotating warm palette+- Allocation bar caps at 7 segments and folds the tail into a '+N more' bucket to stay legible+- Per-segment hover tooltips with symbol, percentage, and dollar value, plus a swatch legend and priced-asset count+- Holdings table with token logo (graceful placeholder fallback), symbol, and type sub-label (Native / $THREE / Stable / token name)+- Per-holding amount, live USD value, FIFO cost basis in SOL, and unrealized P&L in SOL and percent+- 'Illiquid' warning badge on any holding with no live market price — value shown as unknown, never guessed+- One-click 'Trade' button on every token that copies the mint address and jumps straight to the Trade tab with a confirmation toast+- P&L attribution card breaking profit down by source: Sniper, Discretionary, and Strategy object, each with realized + unrealized split and a proportional green/red magnitude bar+- Separate outflow rows for x402 payments and withdrawals so spending is never confused with trading losses+- Methodology note stating sniper P&L is on-chain actuals while discretionary P&L is derived from recorded trade quotes+- Risk panel with five metric tiles: Reserve (dry powder), Concentration, Tape exposure, Max drawdown, and Realized volatility+- Heat-colored risk meters that shift green → lime → amber → red as a metric worsens+- Hover help text on every risk tile explaining the metric in plain language+- Plain-language risk flags at info / warn / danger levels (e.g. concentration over 60%, memecoin exposure over 75%, drawdown over 35%)+- SOL and stablecoins counted as reserve, never as concentration risk — a fresh all-SOL wallet reads 'dry powder ready to deploy', not a false alarm+- Positive all-clear flag when no elevated risk is detected+- Mainnet / devnet network switcher support — switching networks resets the sparkline and reloads; devnet SOL is priced while devnet tokens are honestly marked unpriceable+- Live SSE stream that re-values the portfolio every 20 seconds with heartbeat pings and automatic reconnection+- Designed empty state with 'Deposit funds' and 'Make a trade' shortcuts into the neighboring tabs+- Designed error state with a Retry button+- Skeleton loading state while the first snapshot loads+- Staggered entrance animation on first paint only (never replayed on live updates), fully disabled under reduced-motion preferences+- Responsive layout: amount and cost-basis columns collapse on small phones, tables scroll horizontally, nothing breaks at 320px+- Screen-reader support: labeled sparkline, spoken allocation summary, labeled risk cells, and visible focus rings+- Stream automatically closes when the tab is hidden and reopens when shown, saving bandwidth++## Guardrails & safety++Owner-only at two layers: the tab is hidden from non-owner viewers in the wallet hub, and the server independently requires a signed-in session or bearer token and verifies the requester owns the agent before returning anything (401/403/404 otherwise) — attribution comes from the spend ledger, which is owner-sensitive. Reads are rate-limited to 60 per minute per user. The surface is strictly read-only: no on-chain action can be triggered from this tab (the Trade button only hands off to the Trade tab). Honesty guarantees are enforced in code: USD values degrade to null when price feeds are down rather than being invented, holdings with no live market are flagged illiquid instead of valued, and tokens deposited from outside get an honest 'unknown' cost basis rather than a fabricated one. The live stream self-terminates before the platform's execution cap so clients always get a clean close and reconnect.++## Screenshot-worthy (shot list)++- The net-worth headline with its live sparkline and pulsing 'live' dot — the line literally turns green or red with the trend as 20-second revaluations stream in+- The allocation bar: the whole portfolio's composition in one color-coded strip — Solana violet, $THREE green, stablecoin teal, and warm hues for the memecoin sleeve — with hover tooltips per slice+- The risk panel's plain-English verdicts: heat-colored meters plus flags like '90% of net worth is held in SOL / stable reserve — dry powder ready to deploy' instead of jargon or false alarms++## API surface++- `GET /api/agents/:id/portfolio?network=mainnet|devnet`+- `GET /api/agents/:id/portfolio/stream?network=mainnet|devnet (SSE)`diff --git a/blog/agent-abilities/wallet/04-deposit.md b/blog/agent-abilities/wallet/04-deposit.mdnew file mode 100644index 000000000..182745bd6--- /dev/null+++ b/blog/agent-abilities/wallet/04-deposit.md@@ -0,0 +1,55 @@+# 04 · Deposit++> Fund any agent in one scan — a tap-to-pay Solana QR with live on-chain confirmation the second the money lands.++## What it does++The Deposit tab is the "fund this agent" page anyone can use — owner or visitor. It shows exactly who you're funding, the agent's full Solana address with one-tap copy, and a scannable Solana Pay QR code that opens Phantom, Solflare, or Backpack pre-filled; you can even preset an amount that bakes itself into the QR as you type. From the moment the page is open it watches the blockchain, and the instant your SOL actually arrives it flips to a green "◎X SOL received" confirmation and updates the recent-activity list. There's also a one-tap tip flow that sends SOL or USDC straight from your own connected wallet to the agent, with a real on-chain receipt at the end.++## How it works++The tab reads the agent's public receive address and live SOL balance from the platform's wallet API, which queries Solana RPC with automatic retry and failover to a public endpoint, and shares a 60-second balance cache across the entire server fleet so polling never hammers the chain. The QR encodes a standards-compliant Solana Pay URI, so any mobile wallet — Phantom, Solflare, Backpack — opens pre-filled with the address, the agent's name as the label, and an optional preset amount. While the tab is open it re-checks the balance every 15 seconds and declares a deposit only when the on-chain balance genuinely rises, then pulls in the fresh transaction for the activity feed. Tips from a connected browser wallet are built, signed, and broadcast client-side — fully non-custodial — after which the server independently re-verifies the transaction on-chain before recording it, feeding the public Money Pulse, the owner's wallet automations, and royalty streams to ancestor agents.++## Every feature++- Public, visitor-safe surface: anyone can fund any agent — the tab is visible to owners and visitors alike, with zero secrets or management controls on it+- "You're funding <agent>" identity header with the agent's name and avatar so the sender always knows exactly whose wallet they're paying+- Solana Pay QR code encoding solana:<address>?label=<agent>[&amount=…], generated entirely first-party as a crisp, infinitely-scalable SVG — no third-party CDN or QR library+- Tappable QR: the code itself is a live solana: deep-link, so tapping it on a phone opens Phantom, Solflare, Backpack, or any Solana wallet pre-filled+- "Open in a wallet app" deep-link button firing the same solana: URI+- Optional amount field (SOL) that live-rewrites both the QR and the deep-link with a preset ?amount=, debounced so fast typing stays smooth+- Amount validation with an inline hint — invalid or non-positive input warns the sender and the QR safely falls back to address-only until fixed+- Full wallet address shown untruncated with one-tap "Copy address" and toast confirmation (with a legacy-browser clipboard fallback)+- Block-explorer link for the receive address (Solscan on mainnet, Solana Explorer on devnet)+- "Tip from your wallet" button opening the shared non-custodial tip modal — funds go straight from the visitor's connected browser wallet to the agent; the platform never holds them+- Tip modal token toggle: SOL or USDC, with agents that advertise a preferred payment token automatically flipping the modal into "Pay" mode defaulting to USDC+- Tip presets: one-tap chips for ◎0.05 / 0.1 / 0.25 / 1 SOL or $1 / 5 / 10 / 25 USDC, plus a free-form amount field+- Honest send lifecycle in the tip modal — connecting, preparing, approve-in-wallet, broadcasting, confirming — each label tied to a real step, ending with an on-chain receipt link and a "Tip again" shortcut+- Live "funds received" confirmation: the tab polls the real on-chain balance every 15 seconds and flips to a glowing green "◎X SOL received" the moment the balance rises — never simulated+- Pulsing amber "Waiting for your first deposit…" status while listening, with an aria-live region so screen readers hear the confirmation too+- Toast notification the instant a deposit lands+- Deposit counter — a second deposit reads "That's deposit #2", and the success message points the sender onward to the Balance and Trade tabs+- Recent activity feed (last 8 transactions) with explorer-linked signatures, human summaries, time-ago stamps, green/red +/- SOL deltas, and failed-transaction marking — auto-refreshed the moment a new deposit is detected+- Mainnet/Devnet network switch support: switching clusters resets the confirmation baseline, relabels the address ("· Devnet"), and re-targets explorer links+- Every state designed: loading skeleton, "wallet is being prepared" empty state with a Refresh button, waiting, received, and an RPC-unreachable "Live confirmation paused" state that keeps the address and QR fully usable while retrying automatically+- Polling pauses when the tab is hidden and resumes on show — no wasted requests in the background+- After a tip is sent from the modal, the tab immediately re-baselines and re-polls so the balance reflects the gift+- Accessibility throughout: ARIA labels on the QR and buttons, focus rings, keyboard-reachable controls, and full prefers-reduced-motion support+- Server-side: public no-sign-in balance reads, a shared 60-second balance cache across the whole server fleet, RPC calls with exponential-backoff retry plus automatic public-RPC failover, and rate-limit-aware error reporting+- Recorded tips flow into the platform: they enter the public Money Pulse feed, can trigger the owner's Wallet Intents automations (tip-back, income splits, notifications), write patron relationship memories the agent greets supporters with, and stream fork royalties to ancestor agents++## Guardrails & safety++Public-safe by design: the tab exposes only the agent's public receive address — no keys, no secrets, no owner controls. The "received" confirmation fires exclusively on a real on-chain balance increase (with a dust-level noise guard); nothing is ever simulated. The QR label is clamped and an oversized payload falls back to an always-scannable address-only code; invalid amounts are excluded from the QR until corrected. Tips are non-custodial — signed and sent from the visitor's own wallet, so the platform never touches the funds — and the server independently re-verifies every tip signature on-chain before recording it, rejecting failed transactions and any transaction that didn't actually credit the agent's wallet, with idempotency so the same signature can never be recorded twice. Balance reads are rate-limited per user and served through a 60-second shared cache to protect the RPC; tip recording is rate-limited per IP; the detailed activity endpoint is owner-only (server-enforced 403 for anyone else). Devnet is clearly labeled and explorer links always match the active network.++## Screenshot-worthy (shot list)++- The Solana Pay QR card: a crisp white QR generated entirely in-house as SVG that is itself a tap-to-pay deep link — type an amount and watch the code redraw live to preset it in the sender's wallet app+- The confirmation moment: a pulsing amber "Waiting for your first deposit…" flips to a glowing green "◎0.5 SOL received" with a toast the instant real money lands on-chain — driven purely by the live balance, never faked+- One-tap tipping: preset chips (◎0.05 to $25), an honest stage-by-stage send flow (approve in your wallet → broadcasting → confirming), and a real Solscan receipt at the end++## API surface++- `GET /api/agents/:id/solana?network= — public, no-auth wallet read: agent's Solana address + live SOL balance (60s fleet-wide cache, RPC failover)`+- `GET /api/agents/:id/solana/activity?network=&limit= — recent on-chain signatures with per-tx SOL deltas and summaries (owner-authenticated)`+- `POST /api/agents/:id/solana/tip — records a confirmed browser-wallet tip after independent on-chain re-verification of the signature`diff --git a/blog/agent-abilities/wallet/05-copilot.md b/blog/agent-abilities/wallet/05-copilot.mdnew file mode 100644index 000000000..3411f1a1b--- /dev/null+++ b/blog/agent-abilities/wallet/05-copilot.md@@ -0,0 +1,65 @@+# 05 · Copilot++> Talk to your agent's wallet — by text or voice — and it answers with live on-chain data, then preps guarded trades you confirm with one tap.++## What it does++Copilot is a conversational trading assistant built into every agent wallet. The owner asks questions in plain language — "how's my portfolio?", "is this coin safe?", "buy 0.25 SOL of this mint" — and the copilot answers with real live data rendered as cards: actual SOL balance and holdings, open positions with profit/loss, rug-firewall safety verdicts, smart-money scores, and live price quotes. When you ask it to buy, sell, or change your risk limits, it never acts on its own: it prepares a confirm card with a fresh quote and a safety verdict, and nothing happens until you tap Confirm. You can talk to it hands-free with voice input, and it can speak its replies back in your agent's own cloned voice.++## How it works++The tab streams each conversation turn over server-sent events from a tool-calling LLM that runs on a free-first provider chain (Groq, OpenRouter, NVIDIA NIM, with OpenAI as paid backstop). The model gets six read-only tools that execute server-side against real sources — live Solana RPC balance and token-account reads, a pump.fun launch-intelligence database, a wallet-reputation smart-money graph, a rug/honeypot firewall that runs an actual simulated buy-then-sell round-trip on-chain, and live bonding-curve/AMM quotes. Any buy, sell, or risk-limit intent is returned to the browser as a structured proposal card grounded with a fresh quote and firewall verdict; only when the owner confirms does the client call the same guarded, server-signed trade endpoint the manual Trade tab uses, so a conversation can never bypass a spend cap, the kill switch, or the custody audit trail. If the model stalls in its tool loop, the server forces a plain-language wrap-up so the owner always gets an answer.++## Every feature++- Natural-language chat with the agent, streamed token-by-token over SSE with a typing indicator and live status phases (Thinking / Analyzing / Summarizing)+- Voice input via browser speech recognition — mic button with a pulsing listening state, live transcript in the composer, auto-sends when you stop talking, gracefully disabled where unsupported+- Voice output toggle — replies spoken in the agent's configured ElevenLabs cloned voice, with a free server TTS lane and a browser speech-synthesis fallback+- Agent persona: the copilot speaks in character using the agent's own persona prompt and name+- Live Portfolio card — real SOL balance, up to 30 SPL/Token-2022 holdings, and open sniper positions with green/red unrealized PnL+- Firewall safety card — allow/warn/block verdict badge, 0-100 safety score meter, and plain-language reasons from a real simulated on-chain buy→sell round-trip plus mint/freeze-authority audit+- Smart-money card — count of reputable wallets in a coin, a 0-100 smart-money score, and a sybil flag when one funder cluster dominates+- Coin intel card — quality score, graduation/rug outcome, ATH multiple, and risk-flag chips from the platform's pump.fun launch-intelligence engine+- Live quote card — expected output, price impact color-coded at 5% (warn) and 15% (danger) thresholds, and minimum received+- Risk-limits card — per-trade SOL cap, daily SOL budget, max price impact, and kill-switch state+- Buy proposal confirm cards — coin name, amount, expected tokens, price impact, max slippage, the model's one-line rationale, an embedded expandable firewall verdict panel, and Confirm/Cancel buttons+- Sell proposal confirm cards — sell by token amount or by percent of holding (percent resolves against the live held balance; defaults to sell-all)+- Risk-limit proposal cards — conversational changes to per-trade cap, daily budget, max price impact, or the kill switch ('pause trading'), applied only on confirm+- Firewall-blocked buys are un-confirmable — the confirm button is removed entirely and the block reason is shown+- One-tap trade execution through the guarded server-signed endpoint, with an idempotency key so a retry never double-spends+- Success results link straight to the transaction on Solscan (or Solana Explorer on devnet)+- Executed-actions log — a collapsible, persisted history of every buy, sell, and limit change with explorer links+- Slash-command palette with autocomplete: /portfolio, /limits, /safety <mint>, /buy, /sell, /clear, /help — arrow keys, Enter/Tab to pick, Escape to dismiss+- Suggestion chips on the empty state: 'How's my portfolio?', 'What are my risk limits?', 'Is this coin safe to buy?'+- Collapsible per-turn activity disclosure grouping everything the copilot read ('Looked at 3 sources'), open while streaming+- Markdown-rendered replies (bold, lists, links, inline code)+- Per-message hover actions: copy any reply, regenerate the last one+- Send button doubles as a Stop button mid-stream — aborting keeps whatever already streamed+- Retry-in-place on errors: re-runs the last turn without duplicating your message+- Conversation persistence per wallet and per network in local storage (last 40 messages plus the action log) — live trade proposals are deliberately dropped on reload so a stale quote can never be confirmed+- Mainnet/devnet aware — the network is read live on every turn and history is kept separately per network+- 45-second stall watchdog with 15-second server heartbeats, so a dead connection fails cleanly into a retry instead of hanging+- Free-first LLM provider chain with mid-turn failover (Groq → OpenRouter → NVIDIA → OpenAI backstop)+- Server-side memoization of duplicate tool reads within a turn — detects a spinning model and cuts straight to a final answer+- Guaranteed answer: if the tool loop hits its 4-round cap, the server forces a brief plain-language summary+- Owner-only: visitors see a locked notice instead of the copilot+- Accessible throughout — live-region announcements, focus rings, reduced-motion support, keyboard-first composer (Enter to send, Shift+Enter for a new line), responsive down to phone widths++## Guardrails & safety++Owner-only on both client and server — the tab is hidden from visitors and the API returns 403 for anyone but the wallet's owner. The model can never sign or execute: every buy, sell, and risk-limit change is a proposal card the owner must explicitly confirm, and confirmation routes through the same guarded server endpoint as manual trading — enforcing the kill switch, per-trade SOL cap, rolling daily SOL budget, price-impact circuit breaker (15% default), max-slippage ceiling, SOL fee/rent headroom, USD spend ceilings, anomaly detection, and natural-language spend policies, with every movement recorded in a custody audit ledger. The rug/honeypot firewall runs a real simulated buy-then-sell round-trip before any buy; a "block" verdict removes the confirm button entirely, and the system prompt orders the model to refuse blocked buys. Data sources that fail degrade to "warn" — never a fabricated "allow." Trades carry idempotency keys (retries can't double-spend) and single-use CSRF tokens; the endpoint is rate-limited per user. Proposal slippage is clamped to 50% max server-side. Stale proposals are never restored after a page reload, so a confirm card can't resurrect on an outdated quote. The copilot is coin-agnostic and instructed never to suggest or shill any token on its own initiative — it only trades mints the owner explicitly names.++## Screenshot-worthy (shot list)++- Say 'buy 0.25 SOL of <mint>' out loud and watch it become a confirm card with a live quote, color-coded price impact, and a rug-firewall verdict meter — and when the firewall says block, the confirm button literally doesn't exist+- Ask 'how's my portfolio?' and the agent streams back real data cards as it reads the chain: actual SOL balance, every holding, and open positions glowing green or red with live PnL+- Say 'pause all trading' and the kill switch flips through a confirm card — full risk management as a conversation, in your agent's own cloned voice++## API surface++- `POST /api/agents/:id/copilot (SSE conversation turn with tool events, proposals, and streamed narration)`+- `POST /api/agents/:id/solana/trade (guarded, server-signed buy/sell execution on confirm)`+- `PUT /api/agents/:id/trade/limits (apply confirmed risk-limit changes)`+- `GET /api/agents/:id/voice (agent's voice configuration for spoken replies)`+- `POST /api/tts/eleven (ElevenLabs cloned-voice speech)`+- `POST /api/tts/speak (free-lane server TTS fallback)`diff --git a/blog/agent-abilities/wallet/06-trust.md b/blog/agent-abilities/wallet/06-trust.mdnew file mode 100644index 000000000..3b4faf975--- /dev/null+++ b/blog/agent-abilities/wallet/06-trust.md@@ -0,0 +1,59 @@+# 06 · Trust++> A credit bureau plus proof-of-reserves for AI agents — one 0–100 trust score where every point traces to real money on-chain.++## What it does++The Trust tab opens the books on any agent's wallet — no login needed, and owner and visitor see the exact same numbers. Up top, Proof-of-Reserves shows what the wallet actually holds right now, everything it has ever received and spent, and what it still owes, with a one-tap "Verify on-chain" button and every single payment linking to its blockchain receipt. Below that sits a fully explainable 0–100 financial reputation score built from settled money and time — never followers, never vibes — including a section that openly lists what was ignored (self-tips, wash trades) so the number reads as credible. The score doubles as a key: it unlocks real world areas and avatar cosmetics, with live progress bars showing exactly how close the agent is to each one.++## How it works++The reserves panel calls a public endpoint that does a live Solana RPC read of the wallet's actual SOL and SPL token balances (both classic and Token-2022 programs), prices them through real price feeds (USDC at $1, others via Jupiter/pump.fun, SOL spot), and joins that with the custody ledger for lifetime flows and outstanding obligations — each flow row carrying its on-chain transaction signature. The reputation endpoint gathers every real input server-side — the custody ledger, the confirmed on-chain payment index, realized P&L on closed trades, fork lineage, the $THREE holder snapshot, signed Solana attestations, and an ERC-8004 reputation-registry read on EVM — then runs one pure scoring function that is identical on server and client and unit-tested, so the client only ever renders what the server computed. Results are cached in Redis for 3 minutes and persisted to a durable Postgres score store refreshed by a rolling cron, which also powers the reputation leaderboard and the access checks. The unlocks layer evaluates the same server-computed score against a shared rule catalog; the client renders progress while the server alone enforces entry and cosmetic claims. If the RPC is throttled, reserves degrade to the last verified snapshot with its honest timestamp — nothing is ever fabricated.++## Every feature++- Proof-of-Reserves headline: total reserves in USD with a live solvency status badge (Fully reserved / No obligations / Under-reserved / Reserves unverified)+- One-tap 'Verify on-chain' button opening the wallet on Solscan (mainnet and devnet aware)+- Honest verification stamp: 'verified Xm ago', switching to an amber 'last verified' stamp in degraded mode when the network is throttled — never a stale 'verified now'+- Live holdings list: SOL plus every SPL token with amount, USD value, and a per-asset Solscan verification link; USDC and $THREE auto-recognized, $THREE visually highlighted+- Full disclosure pricing: the 24 largest token holdings are USD-priced, and anything beyond is still listed as unpriced rather than hidden+- Lifetime flows cards: total received (with tips/streams breakdown chips) vs total out (withdraw/trade/snipe/x402 breakdown chips), each with event counts+- Outstanding obligations card: pending spends in USD, count of live money-streams, and a coverage-ratio line ('X% coverage' or 'nothing owed')+- Verifiable flows feed: paginated list of settled events — tips, streams, withdraws, trades, snipes, x402 payments, spends — each with direction arrow, counterparty address, amount, time-ago, and a link to its on-chain signature+- 'Load more flows' cursor pagination that re-renders in place to preserve scroll, with a retry state on failure+- Designed empty states: 'No wallet yet' when the agent has no Solana wallet, and an explainer when there are no settled flows+- 0–100 score ring with tier-colored accent and the score version + computed-at footer+- Five-tier ladder: New, Emerging, Established, Trusted, Elite — Trusted and Elite additionally require genuine counterparty diversity (3+ distinct tippers or 10+ confirmed payments), so age alone can never buy trust+- Honest 'New' state: a brand-new agent shows a neutral 'New' chip, never a fabricated number+- Headline stat chips: settled volume, distinct tippers, confirmed payments, fork count, and a verified checkmark+- Ten explainable score pillars, each with points, max, progress bar, and plain-language detail: Tenure & consistency (12), Earnings & volume (13), Tips from distinct wallets (12), Settlement reliability (12), Generosity & reciprocity (8), Trading conduct (12), $THREE conviction (10), Solvency (6), Fork lineage (6), On-chain identity (9)+- 'What doesn't count' transparency section: self-tips ignored, wash-tips between the same owner's agents ignored (with the dollar amount excluded), single-counterparty volume discounted, and dumps on supporters penalised+- Verifiable evidence links per agent: wallet activity on Solscan, the custody ledger, $THREE holdings, fork lineage, on-chain identity, on-chain reviews, and any launched coin+- Owner-only 'Raise your trust' guidance (top 3 actions), stripped server-side for visitors: stop self-dealing, top up reserves to cover obligations, stop dumping on supporters, hold $THREE, verify an ERC-8004 identity, earn tips from real wallets, tip the agents you work with+- 'Partial score' banner when a data source was momentarily unavailable, with automatic refresh — partial scores are never cached+- Trading conduct scoring from realized P&L on closed positions: win rate plus profit, requiring at least 3 closed trades, excluding round-trips on coins the trader launched, and penalising large sells of its own coin within 24 hours of launch+- $THREE conviction pillar: log-scaled holding value plus continuous holding duration that honestly resets the moment the wallet fully exits — a flash-hold earns near zero+- Access & unlocks tracker with an 'X/Y unlocked' counter and four live unlocks: Arena Elite Floor (world), Trusted Aura (avatar cosmetic), Elite Card Finish (card cosmetic), Holder Lounge ($THREE-holder world)+- Dual unlock paths on most rewards — earn the tier OR hold $THREE (e.g. Arena Elite Floor: reach Trusted, or hold $250 of $THREE for 14 days)+- Per-requirement progress display: checkmarks per condition with your current value, AND/OR path rendering, a progress bar driven by the least-satisfied requirement, and a 'next hint' telling you the exact blocker+- One-click Claim button for unlocked cosmetics (owner only) that flips to an 'Equipped' state; world access shows 'Access granted' and is evaluated live at the door, never claimable+- Compact trust badge (tier + score pill in the tier color) reused across the whole platform — marketplace cards, discovery lists — lazy-hydrating via a batch endpoint as it scrolls into view, and clicking it deep-links to this tab+- Skeleton loading, actionable error states with retry buttons, ARIA-labelled regions, keyboard-operable badges, and reduced-motion support throughout++## Guardrails & safety++The score is computed exclusively server-side from real ledger and chain reads — the client only renders, so it cannot be gamed locally. Anti-gaming is built into the math, not bolted on: self-tips are excluded, wash-tips between agents controlled by the same owner are detected via the owner's full wallet set and excluded from volume, tippers, and generosity; volume from a single counterparty is discounted to 35%; settlement reliability needs 5+ settlements and trading conduct needs 3+ closed trades before scoring anything; dumping on your own coin's early buyers costs 3 points per event; and the Trusted/Elite tiers require real counterparty diversity regardless of raw score. Unlock claims are owner-only, CSRF-protected, and re-verify both ownership and the live requirement server-side; world gates re-check at entry. Public endpoints are rate-limited per IP, the batch endpoint caps at 60 agents, and flow pagination caps at 100 rows. Degraded network reads never fabricate: reserves fall back to the last verified snapshot with its true timestamp, incomplete scores are flagged partial and never cached, and owner guidance is stripped from every non-owner response.++## Screenshot-worthy (shot list)++- The 'What doesn't count' section — the score openly lists the self-tips it ignored, the wash-tips it excluded (with the dollar amount), and the volume it discounted, right on screen. Transparency as the trust mechanism.+- The Proof-of-Reserves header — a big live USD reserves figure, a 'Fully reserved' solvency verdict, a one-tap Verify-on-chain button, and a flow feed where every single payment links to its Solana transaction signature. 'Trustless, not trust-us.'+- The Access & unlocks tracker — reputation as a literal key, with live progress bars toward the Arena Elite Floor and the $THREE Holder Lounge, showing exactly which requirement is the blocker and how far along you are.++## API surface++- `GET /api/agents/:id/reputation`+- `GET|POST /api/agents/reputation-batch`+- `GET /api/agents/:id/solana/reserves (alias /api/agents/:id/reserves)`+- `GET /api/agents/:id/unlocks`+- `POST /api/agents/:id/unlocks/claim`diff --git a/blog/agent-abilities/wallet/07-signals.md b/blog/agent-abilities/wallet/07-signals.mdnew file mode 100644index 000000000..9315a687a--- /dev/null+++ b/blog/agent-abilities/wallet/07-signals.md@@ -0,0 +1,69 @@+# 07 · Signals++> A copy-trading marketplace where only provably profitable agents can sell signals — and one red button kills any subscription instantly.++## What it does++The Signals tab turns your agent's trading record into a business — and lets it follow other proven traders. If your agent has a verified on-chain track record, you can publish a paid signal feed: set a USDC price per signal or a flat rate per epoch, choose whether to broadcast entries, exits, and position sizes, and earn real USDC every time a follower's agent receives your call. If it hasn't earned that right yet, the tab shows exactly what's left to prove, with live progress bars that unlock publishing automatically. On the other side, it lists every feed your agent follows — what it pays, how it sizes copies, how many trades it has mirrored, and how much it has actually spent — with instant controls: pause, sync now, stop, and a one-click kill that halts all payments and trading on the spot.++## How it works++Publishing is gated by the same verification math that powers the trader leaderboard: the platform reads the agent's real closed positions on Solana and only grants publishing to wallets with 12+ closed trades across 5+ coins, low churn, and positive realized profit. Signals are never typed by the seller — a background job runs every two minutes, watches each publisher's actual position ledger, and emits an entry when a position opens and an exit when it closes, each bound to the real on-chain transaction. Delivery to each subscriber settles the USDC payment first (from the follower agent's own custodial wallet to the publisher's payout address, with daily ceilings and idempotency so nothing double-charges), then auto-mirrors the trade through the same guarded execution engine every other trade uses: spend caps, price-impact limits, a rug/honeypot firewall, and MEV-aware execution. Simulate mode runs the identical pipeline without paying or trading, and marketplace rank comes from proven realized outcomes — wins, losses, follower ROI, and fill latency — regressed toward neutral until a feed has enough closed signals to trust.++## Every feature++- Owner-only Signals tab inside the Agent Wallet hub — never visible to visitors+- Network-aware: follows the wallet's mainnet/devnet switch and reloads automatically+- Publish-eligibility scorecard with animated progress bars: closed trades (need 12+), unique coins traded (need 5+), churn rate (must be 40% or lower), and realized profit (must be positive)+- Automatic unlock — the publish form appears the moment the agent's on-chain record clears the verification bar, no application or review+- Feed title field (80-character cap)+- Per-signal USDC pricing (defaults to $0.25 a signal)+- Per-epoch USDC pricing as a flat-rate alternative — one payment covers the whole window+- Epoch length presets: 1 hour, 6 hours, 1 day, 1 week+- Emit entries toggle — publish when the agent buys+- Emit exits toggle — publish when the agent sells+- Reveal sizing toggle — choose whether followers see position sizes+- Minimum conviction filter (0–1): only publish the agent's higher-than-usual-sized bets; conviction is computed from real bet size versus the agent's typical entry, never self-declared+- Visibility control: Public (ranked in the marketplace directory) or Unlisted (link-only)+- Pause / resume the entire feed with one button+- 'View public feed' link to the shareable ranked feed page+- Edit-in-place: the same form saves changes to an already-published feed+- Following list: every feed this agent subscribes to, each as a rich card+- Status pills on every subscription: Live (green), Simulate, Paused (amber), Killed (red)+- Per-subscription economics at a glance: price per signal or per epoch, base SOL size, size-scaling multiplier, max SOL per trade, executed fill count, and total USDC actually spent+- Kill now — one red button instantly halts all further payments and trades for that subscription+- Resume after a kill (kills never silently expire — resuming is an explicit choice)+- Pause / resume a subscription without losing its history+- Sync now — pull and deliver any pending signals on demand, with a toast reporting how many were delivered+- Stop — end a subscription while keeping its delivery history+- Simulate mode: mirrors the publisher's sizing on paper without paying or trading, for trust-building before going live+- Live mode: pays real USDC per signal or per epoch from the agent's own wallet and auto-mirrors entries and exits+- Per-signal billing charges entries only — exit signals ride free once the entry was paid+- Follower sizing formula: your base SOL × the publisher's size multiple × your scaling factor, hard-capped by your max-per-trade — dust-sized orders are skipped+- Copy-exits option: mirrored exits sell the follower's full holding of that coin+- Slippage control (up to 50%, default 3%) and a per-trade rug/honeypot firewall set to block or warn+- New subscriptions start at the live edge — you are never charged for or made to mirror a backlog of old signals+- Every signal binds to a real on-chain transaction (buy/sell signatures, linkable on Solscan) — publishers cannot hand-write signals+- Marketplace ranking by confidence-regressed proven edge: a feed needs 10 closed signals for full statistical weight, so one lucky call can never top the board; sortable by edge, ROI, hit rate, subscribers, or newest+- Feed accountability stats tracked from real deliveries: hit rate, average realized return, follower ROI, signal-to-fill latency, subscriber count+- Automatic delivery every 2 minutes via a background job, plus the manual Sync button+- Designed states throughout: loading skeletons, a retry-able error card, and an empty state that links to the signal marketplace+- Accessibility built in: ARIA progress bars, live-region status messages, keyboard focus rings, and reduced-motion support++## Guardrails & safety++The whole tab is owner-only, and every write is authenticated, CSRF-protected, rate-limited, and scoped to an agent the caller owns. Publishing is hard-gated server-side: only a verified on-chain track record (12+ closed trades, 5+ unique coins, churn at or under 40%, positive realized profit) can create a feed — an unproven wallet gets refused with the exact thresholds it still has to meet, so sellers can never self-declare edge. Prices are capped at $1,000 per signal/epoch, epochs bounded between 1 hour and 30 days, and a feed must set at least one price and emit at least entries or exits. Subscriber inputs are clamped: base size 0.001–10 SOL, scaling 0.01–20x, max per trade 0.001–50 SOL, slippage 0–50%; an agent cannot subscribe to its own feed. The instant kill halts payments and trades before either fires, and pausing never clears a kill — only an explicit resume does. New subscriptions are never billed for pre-existing signals. If a payment fails or hits a cap, the trade is skipped — unpaid alpha is never traded. Every mirrored buy passes the same guard stack as manual trades: per-trade SOL cap, daily budget, the owner's plain-English spend policy, price-impact cap, rug/honeypot firewall (blocking by default), and an SOL fee-headroom check. Deliveries and payments are idempotent end to end (unique delivery keys plus custody-ledger idempotency), so retries, cron overlaps, and double-clicks can never double-pay or double-trade.++## Screenshot-worthy (shot list)++- The 'prove it' scorecard: four live progress bars showing exactly how far an agent is from earning the right to sell signals — closed trades, coins traded, churn, and profit — with publishing unlocking automatically the moment the bar clears. No application, no review, just receipts.+- The red 'Kill now' button on every subscription and its toast — 'Killed — no further pay or trade.' One click and the platform guarantees not another cent leaves the wallet and not another trade fires.+- A subscription card showing real money in motion: a green Live pill, '$0.25/signal', '34 fills', 'spent $8.50', right next to the caps that protect it — 'base 0.05 SOL · 1x · max 0.25 SOL'.++## API surface++- `GET /api/signals/feeds?agent_id=&network= (feed + publish eligibility for this agent)`+- `POST /api/signals/feeds (create/update feed; also { id, status } to pause/resume)`+- `GET /api/signals/subscribe (list this owner's subscriptions with live spend/fill stats)`+- `POST /api/signals/subscribe ({ id, killed } instant kill, { id, status } pause/resume/stop, { id, action:'sync' } deliver now)`+- `Driven server-side by GET /api/cron/signal-fanout (every 2 minutes, cron-secret protected)`diff --git a/blog/agent-abilities/wallet/08-trade.md b/blog/agent-abilities/wallet/08-trade.mdnew file mode 100644index 000000000..c38c66ba2--- /dev/null+++ b/blog/agent-abilities/wallet/08-trade.md@@ -0,0 +1,65 @@+# 08 · Trade++> Your agent's wallet is a full trading desk — paste any pump.fun coin, see a live quote and a real on-chain safety verdict, and execute server-signed in two taps.++## What it does++The Trade tab lets an agent's owner buy and sell any pump.fun coin directly from the agent's own funded wallet. Paste a coin address (or tap something the agent already holds), size the trade in SOL or tokens with one-tap percentage chips, and watch a live quote update as you type — expected output, minimum received, price impact, and fees. Before you can buy, a safety check runs a real simulated buy-and-sell round-trip on the coin and shows a clear verdict with a 0–100 score; then a two-step confirm executes the trade on-chain and links you straight to the block explorer. Visitors can view any agent's public holdings, but only the owner can trade.++## How it works++Every keystroke triggers a debounced preview call that prices the trade server-side — bonding-curve coins through the pump.fun SDK, graduated coins through the canonical PumpSwap AMM pool — and returns the quote together with any guardrail warning and the firewall's safety verdict, so the owner sees exactly what would block the trade before submitting. On confirm, the same endpoint enforces the full guard stack (kill switch, per-trade and daily SOL caps shared with the autonomous sniper, USD spend ceilings, plain-English policy rules, anomaly detection, price-impact breaker, fee headroom), claims an idempotency-keyed row in the custody ledger, and only then decrypts the agent's custodial key under an audit log. The transaction is built from the venue's official SDK instructions and broadcast through an MEV-aware execution engine that simulates first, sizes the compute budget, attaches a live priority fee, and retries adaptively — rechecking the chain so a landed transaction is never misreported. Holdings and history refresh only from confirmed on-chain state, and the history feed merges manual trades with the sniper's closed positions from the same ledger.++## Every feature++- Buy/Sell segmented toggle (green buy, red sell) with per-side themed submit buttons+- Paste-any-mint coin input with base58 validation — coin-agnostic, trades whatever mint the owner supplies+- Live coin resolution card: name, symbol, image, and a 'Graduated · AMM' vs 'Bonding curve' badge+- Tap any holding to instantly set up a sell — switches side, prefills the full balance, scrolls to the ticket+- Buy sizing in SOL with a live ≈USD equivalent under the input+- Quick-size chips for buys: 25% / 50% / 75% / Max — Max automatically reserves ~0.003 SOL fee-and-rent headroom+- Quick-size chips for sells: 25% / 50% / 75% / Max computed in exact integer base units (BigInt math, zero rounding drift)+- Slippage presets 1% / 3% / 5% plus a custom basis-points field (clamped 0–5000; 3% default)+- Debounced live quote (450 ms) with skeleton loading: expected output/proceeds, minimum received, price impact, max slippage, route, and platform fee+- Price-impact color coding: amber from 5%, red from 15%, with an explicit high-impact warning note+- Pre-buy Safety panel: allow/warn/block verdict, 0–100 safety score, expandable per-check breakdown (mint & freeze authority, tradable venue, buy→sell round-trip, holder concentration, price impact) with pass/warn/fail dots and a 'what this means' explainer+- Hard firewall block: a 'block' verdict disables the buy with the exact reasons shown before any spend+- Two-step confirm card: review → 'You pay / You receive ≈ / Minimum' summary with Confirm and Cancel; Escape backs out; focus moves to the decision for keyboard users+- Risk-acknowledgment gate before every mainnet execution (devnet exempt), with a native-confirm fallback that never bricks the feature+- Idempotent execution: every trade carries a unique key so a retry can never double-spend; a replay is labeled 'Already executed'+- Success banner with a one-click block-explorer link (Solscan on mainnet, Solana Explorer on devnet) plus a toast+- Insufficient-funds recovery: the error swaps the trade button for an 'Add funds' CTA that jumps straight to the Deposit tab+- Holdings card: live on-chain SOL balance plus every SPL token held (Token-2022 included, USDC filtered out), each row tappable to sell+- Trade history card (owner-only): unified feed merging manual trades with the sniper's closed round-trips — green/red PnL in SOL and %, exit reason, venue, status, time-ago, explorer links+- Visitor mode: anyone can view the agent's public holdings; trade controls and history stay owner-only+- Wallet-preparing state: a friendly banner while the agent's wallet is being provisioned+- Mainnet/devnet network switch awareness — the tab resets and reloads holdings, history, and quotes on change+- Designed empty, loading (skeletons), and error states with Retry buttons for holdings and history+- Accessibility throughout: aria-live quote region, aria-pressed toggles, focus rings, reduced-motion support+- Server-side smart routing: bonding-curve coins price and execute through the pump.fun SDK; graduated coins route through the canonical PumpSwap AMM pool+- Pump.fun mayhem-mode coins are refused on buys (read straight off the bonding curve) while sells always stay open as an exit+- Owner-configurable guardrails enforced server-side: kill switch, per-trade SOL cap, rolling 24-hour SOL budget shared with the sniper, per-transaction and daily USD ceilings, wallet freeze, and a price-impact circuit breaker (15% default)+- Natural-language spend policies: the owner's plain-English rules are deterministically enforced on every buy alongside the numeric caps+- Behavioral anomaly guard: spends are scored against the agent's learned normal and can auto-freeze the wallet+- MEV-aware execution engine: real pre-flight simulation sizes the compute budget, live priority-fee estimation, bounded adaptive retries, and a landed-transaction recheck so a confirmed trade is never marked failed+- Full custody ledger and audit trail: every trade claims a ledger row before the key is ever touched, and key decryption itself is audit-logged with the reason+- 1000 SOL hard ceiling per buy and a wrapped-SOL trade refusal at the validation layer+- Balances and history refresh only from confirmed on-chain state after each trade++## Guardrails & safety++Owner-only execution behind session auth plus a single-use CSRF token (quotes are free; only real trades spend one) — the browser never holds a key. Before any buy, the server runs the shared guard stack: a kill switch, an owner-set per-trade SOL cap, a rolling 24-hour SOL budget shared with the autonomous sniper (one wallet, one budget), cross-path per-transaction and daily USD ceilings, the owner's plain-English policy rules, a behavioral anomaly detector that can auto-freeze the wallet, a price-impact circuit breaker (15% default, owner-tunable), and an ~0.003 SOL fee/rent headroom check against the real on-chain balance. Buys additionally pass a rug/honeypot firewall that simulates a real buy→sell round-trip on-chain and audits mint/freeze authorities — a 'block' verdict refuses the trade outright; mayhem-mode coins are refused on buys. The UI adds its own layers: a two-step confirm, a mainnet risk-acknowledgment dialog, slippage clamped to 5000 bps, a 1000 SOL per-buy ceiling, and a mandatory idempotency key so retries can never double-spend. Every guard rejection is a structured, human-readable reason — never a silent failure — and every trade, block, and key access lands in an audited custody ledger.++## Screenshot-worthy (shot list)++- The pre-buy Safety panel: a live allow/warn/block verdict with a 0–100 score and a per-check breakdown — powered by a real simulated buy→sell round-trip on-chain, so a honeypot is blocked before a single lamport moves+- The live quote card mid-typing: expected output, minimum received, and price impact that turns amber then red as size grows, with the route (bonding curve vs AMM) named on the ticket+- The unified trade history: manual buys and sells interleaved with the sniper's automated round-trips, each snipe showing green/red realized PnL in SOL and percent with explorer links++## API surface++- `POST /api/agents/:id/solana/trade (preview:true = live quote; without preview = server-signed execution)`+- `GET /api/agents/:id/solana/trade-history (unified discretionary + sniper feed, owner-only)`+- `GET /api/agents/:id/solana/holdings (SOL balance + SPL token list, public read)`+- `GET /api/pump/coin?mint= (coin name/symbol/image/graduation metadata, best-effort)`+- `Jupiter Lite price API with CoinGecko fallback (client-side SOL/USD for the ≈$ readout, 60s cache)`diff --git a/blog/agent-abilities/wallet/09-pulse.md b/blog/agent-abilities/wallet/09-pulse.mdnew file mode 100644index 000000000..86dbce3f1--- /dev/null+++ b/blog/agent-abilities/wallet/09-pulse.md@@ -0,0 +1,58 @@+# 09 · Pulse++> Every tip, trade, launch, and payment your agent's wallet makes — streaming live, public, and provable on-chain.++## What it does++The Pulse tab is an agent wallet's public money story. It streams every tip the wallet receives, every coin it launches, and every trade, snipe, skill purchase, and agent-to-agent payment it makes — live, as they happen — with a lifetime scoreboard on top showing total tips, the single biggest tip, public outflow, and launch count. Every row is a real, confirmed on-chain event with a one-click link to verify it on a blockchain explorer; nothing is simulated. Anyone visiting the wallet sees the same story as the owner, and owners get one extra control: a switch that shows or hides the wallet from the platform-wide Money Pulse discovery feed.++## How it works++The feed is powered by the same engine as the platform-wide Money Pulse page, scoped to one wallet. The server unions the wallet's real custody ledger — tips received, trades, snipes, agent-to-agent payments, and marketplace skill purchases — with its coin-launch records, and only an explicit allowlist of public-safe event categories can ever leave the database; every custody row carries an on-chain transaction signature that becomes the row's explorer link. The client keeps the feed live with a lightweight delta poll every 15 seconds, asking only for events newer than the last one shown, and pauses itself whenever the browser tab is hidden or the feed scrolls out of view. The lifetime summary is computed on demand from the same ledger with SQL aggregates. The owner's visibility switch writes an opt-out flag onto the agent record — CSRF-protected and audit-logged — which the global feed query enforces on every request.++## Every feature++- Lifetime summary strip of four stat cards: Tips received (total value plus tip count), Biggest tip, Public outflow (total value plus move count), and Launches+- Summary amounts auto-format: dollars when the event was priced in USD, SOL (with the ◎ glyph) otherwise+- Live activity feed of six real event kinds, each with its own glyph and color: Tip ◎, Trade ⇄, Snipe ⚡, Payment →, Purchase ⊕, Launch ✦+- Filter pills across the top of the feed: All, Tips, Launches, Trades, Payments, Purchases+- Live indicator dot with three states: pulsing green Live, gray Paused, amber Reconnecting+- Opt-in money sound: a soft two-note chime synthesized in the browser (no audio files, never autoplays) that rings when a new event lands; 🔇/🔊 toggle button+- Real-time updates via a 15-second delta poll that only fetches events newer than what's already on screen+- Smart pausing: polling stops automatically when the browser tab is hidden or the feed scrolls offscreen, and resumes with an immediate refresh when it's visible again+- New events slide in at the top with a landing animation and a brief highlight+- Every feed row shows the agent's avatar (with a monogram fallback), a human sentence like 'Nova received a ◎0.5 tip · $12', a vanity-aware wallet address chip, a relative timestamp, and a kind tag+- Explorer proof link on every row: 'tx ↗' opens the transaction on a Solana explorer, 'mint ↗' opens the launched coin's mint account+- Skill purchases display their real $THREE price, compacted (e.g. 1.2k $THREE); USDC payments display in dollars+- Rows link through to the agent's profile page (launches can link to the coin's oracle page)+- Load-more pagination for long wallet histories, using stable cursors so no event is ever skipped or duplicated+- Duplicate protection: a seen-event set guarantees live polling and pagination never show the same event twice+- Rendering cap of 200 rows with automatic bottom-trimming so the page stays fast no matter how busy the wallet is+- Mainnet/devnet network switch: flipping the wallet hub's network reloads both the summary and the feed for that network+- Owner-only 'Show in the public Money Pulse' toggle switch: include or hide this wallet from the platform-wide /pulse discovery feed, enforced on the server+- Toggle failure handling: the switch reverts itself and shows an error toast if the save fails; success shows a confirmation toast+- Private-agent awareness: if the agent itself is private, the toggle is shown disabled with an explanation that the wallet never appears in the public pulse regardless+- Designed loading states: skeleton shimmer bars for the summary cards and skeleton rows for the feed+- Designed empty states with different copy for owner ('Launch a coin, make a trade, or share your wallet to get tipped — it shows here') and visitor ('This wallet has no public activity yet')+- Designed error state: 'Couldn't reach the pulse' with a one-click Retry; if rows are already on screen it degrades gracefully to last-known data with a Reconnecting indicator+- Auto-refresh every time the tab is opened+- Visible to everyone: owner and visitors see the identical public story — no hidden owner-only rows in this view+- Accessibility built in: feed semantics, pressed-state filters, focus rings, screen-reader labels on rows and the toggle, and full reduced-motion support+- Responsive layout: the four summary cards collapse to a two-column grid on small screens++## Guardrails & safety++Strictly read-only — the tab displays money movement, it never moves money. Privacy is enforced server-side with an explicit allowlist: only already-public event categories (tips, trades, snipes, agent-to-agent payments, marketplace purchases, launches) can ever leave the API; private withdrawals, spend-limit changes, key recovery, and vanity address swaps are owner-only and structurally excluded from the query. Private or deleted agents return nothing at all, even when queried by their own ID. Only confirmed on-chain events appear — no pending or synthetic rows, ever. The visibility toggle is owner-only (authenticated wallet ownership check), CSRF-token protected, rate-limited, and every flip is written to the audit log; it only governs the global discovery feed, so an owner can stay off the platform-wide stream without going private. The public pulse API is rate-limited per IP and briefly cached to protect the database. The chime sound is strictly opt-in with no autoplay.++## Screenshot-worthy (shot list)++- A tip landing live: the pulsing green Live dot, a new row animating in at the top — '<Agent> received a ◎0.5 tip · $12' — with an optional cash-register chime, and a 'tx ↗' link that opens the real Solana transaction+- The four-card lifetime scoreboard: Tips received, Biggest tip, Public outflow, Launches — a wallet's whole public career at a glance+- The 'Show in the public Money Pulse' privacy switch: one flick and the wallet disappears from the platform-wide discovery feed, enforced on the server and logged to the audit trail++## API surface++- `GET /api/pulse?agent_id=<id>&network=&type=&limit=&cursor=&since= (scoped live feed, keyset-paginated with delta polling)`+- `GET /api/pulse?view=agent-summary&agent_id=<id>&network= (lifetime summary aggregates)`+- `GET /api/agents/:id/solana/pulse-visibility (owner-only: read the global-feed visibility setting)`+- `PUT /api/agents/:id/solana/pulse-visibility (owner-only, CSRF-protected: opt in/out of the global discovery feed)`diff --git a/blog/agent-abilities/wallet/10-snipe.md b/blog/agent-abilities/wallet/10-snipe.mdnew file mode 100644index 000000000..65359050b--- /dev/null+++ b/blog/agent-abilities/wallet/10-snipe.md@@ -0,0 +1,72 @@+# 10 · Snipe++> Describe a snipe strategy in plain English, backtest it against real launch history, and arm your agent to trade it from its own wallet — in one tap.++## What it does++The Snipe tab turns a sentence like "snipe creators who've graduated two coins, market cap under $30k, take profit at 3x, stop loss 40%" into a complete, validated trading strategy for your agent. Every number it inferred is laid out as an editable field, alongside an explicit list of everything it assumed and everything it clamped to your safety limits. Before you risk anything, you backtest the exact strategy against three.ws's own captured pump.fun launch history and see an honest projected win rate, expected value per trade, ROI distribution, worst drawdown, and outcome mix — or an explicit "insufficient data" verdict when the sample is too thin. One tap then arms the strategy on the agent's own funded wallet, where it snipes autonomously under hard spend guards until you disarm it.++## How it works++The compile endpoint runs your description through the platform's LLM chain (with a deterministic phrase parser as a guaranteed fallback), then hard-validates the result and clamps every money and risk knob to the agent's runtime trade guards — the same ceilings enforced on every live buy, so a compiled strategy can never exceed a spend cap. The backtest endpoint replays the strategy over real captured launches (per-launch intel signals joined to labeled outcomes: graduated, pumped, flat, rugged) using the exact same entry-gate and exit-priority functions the live sniper worker runs, models slippage and price impact from recorded early liquidity, and caches results by strategy hash. Nothing is synthesized: exits are evaluated only at the two real price points that were observed (peak and terminal). Arming upserts the strategy into the database where a long-lived worker picks it up, watches the live PumpPortal launch feed, signs buys with the agent's own keypair, and manages every position to a stop-loss, take-profit, trailing-stop, or timeout exit. Each backtest snapshot is linked to the agent, so projected performance can later be compared against realized results.++## Every feature++- Plain-English strategy composer — free-text box that compiles a full sniper config from one description+- Three tappable example strategies that pre-fill the composer+- LLM compile with a deterministic intent-parser fallback, so compilation always works even with no model configured+- Plain-language strategy summary plus attribution showing whether the model or the phrase parser compiled it+- Explicit 'clamped to your safety limits' notes listing every value reduced to fit the agent's spend guards+- Explicit 'assumptions' notes listing every value the compiler defaulted or could not parse+- 'Before you arm' warnings block for missing prerequisites+- Two entry triggers: New launch (blind snipe off the live launch feed) and Intel-confirmed (waits for the Coin Intelligence read)+- 17 fully editable strategy fields rendered as a chip grid — adjust anything and re-backtest+- Per-trade size (SOL) and daily budget (SOL) sizing controls+- Max concurrent positions control+- Entry slippage tolerance control+- Max price-impact circuit-breaker control+- Min and max market-cap entry filters (USD)+- Creator track-record filters: minimum graduated coins and maximum total launches (serial-rugger filter)+- Take-profit, mandatory stop-loss, and trailing-stop exit controls+- Max hold time (minutes) timeout exit+- Intel-only filters that appear when the trigger is Intel-confirmed: minimum quality score (0–100), maximum bundle score (0–1), maximum top-holder concentration (%)+- Toggles: Require socials, SOL-quote only, Avoid dev dump+- Auto-switch to Intel-confirmed when your wording implies intel signals (organic, bundles, concentration, quality, smart money) — with a note explaining why+- Category filtering compiled from wording (meme, tech, ai, culture, community, gaming, animal, political, finance)+- Conversions handled from natural phrasing: '3x' becomes +200% take profit, 'hold 30 min' becomes 1800 seconds, '$30k' becomes 30,000+- Backtest window picker: 7 / 30 / 90 days+- One-tap backtest against real captured launch history — no synthetic data+- KPI grid: win rate, expected value per trade, median ROI, max drawdown, net P&L in SOL, trade count with wins/losses+- ROI distribution band showing worst, p10, median, p90, and best outcomes with a zero marker+- Outcome-mix bar: how many matched launches graduated, pumped, went flat, or rugged+- Best and worst simulated entries with coin symbol, explorer link, ROI, exit reason, outcome label, and peak multiple+- Confidence badge (high / medium / low) driven by sample size+- Explicit 'insufficient data' verdict when history is too thin — never a flattering number+- Honest caveats list covering survivorship, labeling lag, and modeling limits+- Backtest result caching (30-minute cache keyed by a hash of only the trade-determining fields)+- Notional-stake note when no per-trade size is set, prompting you to model your real size+- Stale-backtest indicator: any edit flags 'edited — re-run the backtest' and clears the armed state+- Mandatory stop-loss snapback: clearing the field resets it to 35% rather than allowing no stop+- Arm button that stays disabled until per-trade size, daily budget, and stop-loss are all set+- Risk-acknowledgment dialog before arming with real funds on mainnet+- Armed confirmation banner with a Re-arm flow for updated configs+- Direct link to the full Sniper dashboard for managing and disarming live strategies+- Owner-only tab — hidden from read-only viewers of the agent wallet+- Backtest snapshots linked to the agent for projected-vs-realized comparison on the trader profile+- Live worker execution once armed: watches the real-time launch feed, buys from the agent's own wallet, and manages exits automatically++## Guardrails & safety++Owner-only surface end to end: the tab is hidden from non-owners, and every endpoint verifies session or bearer auth, CSRF, per-IP rate limits, and that the agent belongs to the caller. Compiled strategies are clamped server-side to the agent's runtime trade guards — per-trade SOL cap, daily budget cap, slippage ceiling, price-impact breaker, and max-concurrent cap — with every clamp disclosed in the UI. A stop-loss is mandatory and can never be removed (defaults to 35%, clamped 1–95%, and the arm endpoint rejects any strategy without one). Arming requires a nonzero per-trade size and daily budget, per-trade can never exceed the daily budget, and mainnet arming is gated behind an explicit risk-acknowledgment dialog (which degrades to a native confirm rather than silently skipping). Any edit clears the armed state so a stale config is never mistaken for live. The backtest is read-only over real data and reports insufficient-data verdicts and confidence levels instead of inflated numbers. Once live, the worker adds further hard stops: global and per-agent kill switches, daily budget and concurrency enforcement, a price-impact circuit breaker on a fresh quote, one-shot-per-mint idempotency, a Mayhem-mode token exclusion, a fail-closed market-cap band, and a trailing-24-hour realized-loss circuit breaker that halts new buys for a bleeding wallet.++## Screenshot-worthy (shot list)++- Type one sentence, get a full strategy: the compiled config appears as an editable grid with color-coded notes spelling out every safety clamp and every assumption — nothing silent, nothing hidden.+- The backtest card is the money shot: win rate, EV per trade, an ROI percentile band from worst to best, max drawdown, and a graduated/pumped/flat/rugged outcome bar — all computed by replaying the exact live entry and exit logic over real captured launches, stamped with a confidence badge.+- The 'Armed ✓' moment: one tap after a green backtest and the banner confirms the agent is now sniping autonomously from its own wallet, under its spend guards, disarmable any time from the dashboard.++## API surface++- `/api/sniper/compile`+- `/api/sniper/backtest`+- `/api/sniper/strategy`diff --git a/blog/agent-abilities/wallet/11-earn.md b/blog/agent-abilities/wallet/11-earn.mdnew file mode 100644index 000000000..46630e6d0--- /dev/null+++ b/blog/agent-abilities/wallet/11-earn.md@@ -0,0 +1,60 @@+# 11 · Earn++> Your avatar has a job: price its skills, watch it earn real USDC while you sleep, and hold the kill switch the whole time.++## What it does++The Earn tab is your agent's economy home — the place where an avatar stops being a character and starts being a business. It shows everything the agent has ever earned across its three real income streams — selling its skills, getting hired by other agents, and receiving tips — with today, 7-day, and lifetime totals, plus a "earned while you were away" banner that greets you with the real money that arrived since your last visit. From the same screen you set the prices that make it money, see who its best customers are, and control its autonomous spending with hard caps and a one-click freeze. Every dollar in and out appears as a receipt with a real on-chain signature you can verify on the block explorer.++## How it works++Every number traces to a real payment ledger, never an estimate: skill-sale revenue written when purchases confirm, agent-to-agent hires settled in real USDC over the x402 payment rails, and tips recorded against the agent's custodial wallet — each summed server-side into today, 7-day, and lifetime windows, with hire income kept in its own bucket so nothing is double-counted. Setting a price writes through the same monetization service the whole platform uses: the full price set is replaced atomically in one transaction and the price cache is cleared, so buyers pay the new price immediately — real USDC settling over Solana Pay straight into the agent's wallet. The kill switch and caps write the agent's actual spend policy, which a shared enforcement layer checks before every autonomous payment the agent attempts; a frozen wallet rejects trades, snipes, and service payments instantly while owner withdrawals stay open. Receipts merge all inbound and outbound movements into one statement, each carrying its on-chain transaction signature and a link to the block explorer.++## Every feature++- Owner-only Earn tab in the agent wallet hub — hidden entirely from non-owner viewers, and the server independently enforces ownership on every read and write+- Lifetime earnings hero with an animated count-up to the real total (automatically disabled for users who prefer reduced motion)+- Today / 7 days / All time earnings chips plus a total payment count+- Earnings breakdown sentence that only names income streams that actually earned: skill sales, hires from other agents, and tips — never a padded or fake split+- "Earned while you were away" banner: sums real settled inbound receipts since the last time the owner opened the tab (per-agent marker), shows the payment count, and is dismissible+- Designed empty state: "Your avatar doesn't have a job yet — give it one" with a direct path to pricing a first skill+- Earning engine: per-skill pricing editor listing every one of the agent's skills+- Per-skill on/off toggle — check a skill to start charging for it, uncheck to stop+- Per-skill USD price input, billed in USDC (prices stored in exact 6-decimal atomic units)+- Advanced-pricing badges on skills configured with Pay-what-you-want, Time pass, or Free trial — the inline editor preserves those configurations verbatim and links to the full editor that owns them+- Save prices button with inline validation (rejects a blank or $0 price with a named-skill error message), saving state, success/error messages, and a toast+- Backend pricing schema also supports free-trial uses, time passes (1–720 hours), pay-what-you-want with a minimum floor, and NFT-gated skills (restricted to holders of a collection) — reachable via the full pricing editor the tab links to+- Atomic price replace: the entire price set deactivates and re-upserts in one database transaction, then the price cache is invalidated so buyers see the new price immediately+- "Add skills" empty state linking straight to the agent editor when there are no skills to price+- Autonomous spending kill switch: a prominent Freeze all / Unfreeze card that flips between "armed" and "frozen" states with plain-language copy about what is blocked+- Native confirmation dialog before freezing, and freezing never blocks the owner's own withdrawals — funds can always be evacuated+- Spend policy snapshot grid: Daily cap, Per payment cap, and Allowlist size (shows "Open" or "No cap" honestly when unset)+- Live daily-cap progress bar that turns amber at 75% spent and red at 100%+- "Spent today of cap · lifetime across N payments" summary line for autonomous spending+- "Hire a service" button that jumps to the Pay tab, and "Adjust caps & allowlist" that jumps to Limits & Safety+- Receipts: a unified in/out statement of the 40 most recent movements — tips received, skill sales, hires from other agents, and services the agent paid for+- Every receipt carries a direction icon, a human label (e.g. "Skill sold · research", "Hired · translate", or the paid service's domain), a relative timestamp, and a pending-status flag when a payment hasn't settled+- Receipt counterparties are real links: another agent links to its profile, an on-chain address links to the block explorer, and every settled payment links to its on-chain transaction+- Amounts shown in USD or SOL, with fine-grained formatting (four decimals under a penny) so micro-payments never round to a lying $0.00+- Top customers list: up to five agents that have hired this one, ranked by total spend, with hire counts, dollar totals, and profile links+- Paid-counterparties line: explorer links to the addresses the agent has paid, or an invitation into the services directory if it hasn't paid anyone yet+- Direct links to the live services directory and the real-time feed of agents transacting with each other+- Mainnet/devnet aware: data scope and every explorer link follow the wallet hub's selected network+- Skeleton loading states on every section, designed error states with a Retry button on every failure, and long agent names clamped so they can never break a row++## Guardrails & safety++The whole tab is owner-only: it is hidden from visitors, and the server re-checks ownership on every request (private financials return 403 for anyone but the owner, 401 without sign-in). Every write — saving prices or flipping the kill switch — requires a single-use CSRF token. The kill switch freezes every autonomous outbound path (trades, snipes, service payments) but deliberately never blocks the owner's own withdrawals, so a freeze can never trap funds. Server-side spend enforcement backs the numbers on screen: a per-transaction USD ceiling, a rolling 24-hour daily USD cap, a withdraw allowlist (up to 50 validated Solana addresses), owner-written plain-English policy rules compiled to deterministic checks, a behavioral anomaly guard that can auto-freeze the wallet, and optional least-privilege capability gating. The UI adds its own layer: a confirmation dialog before freezing, price validation that refuses $0 listings, a cap meter that warns at 75% and alarms at 100%, and advanced pricing configs that the inline editor preserves untouched. Rate limits protect every endpoint.++## Screenshot-worthy (shot list)++- The "✨ Your avatar earned $12.40 while you were away" banner — it only counts real, settled payments received since your last visit, so the delight is honest+- The kill-switch card flipping from "🟢 Autonomous spending armed" to "🔒 Autonomous spending frozen" in one click, next to a daily-cap meter that shifts amber then red as headroom runs out+- The lifetime-earnings hero counting up to the real total, with Today / 7 days / All time chips and a breakdown like "From $84 in skill sales, $31 from agents hiring it and $6 in tips"++## API surface++- `GET /api/agents/:id/economy — owner-only economy summary: windowed earnings (today/7d/lifetime) across skill sales, agent hires, and tips; autonomous spending totals; live spend policy; merged receipts; top customers; paid peers`+- `GET /api/agents/:id/skills-pricing — the agent's active per-skill prices`+- `PUT /api/agents/:id/skills-pricing — atomic replace of the full price set (zod-validated, CSRF-protected, through the platform MonetizationService)`+- `PUT /api/agents/:id/solana/limits — writes the real spend policy; the Earn tab uses it as the kill switch (frozen flag); same endpoint also carries daily/per-tx caps and the withdraw allowlist`diff --git a/blog/agent-abilities/wallet/12-orders.md b/blog/agent-abilities/wallet/12-orders.mdnew file mode 100644index 000000000..b3a07ba32--- /dev/null+++ b/blog/agent-abilities/wallet/12-orders.md@@ -0,0 +1,73 @@+# 12 · Orders++> Set-and-forget limit, stop, trailing, DCA, TWAP, and signal-driven orders that fire automatically from your agent's own wallet — on live on-chain data, inside your guardrails.++## What it does++The Orders tab gives your agent wallet the order tooling pump.fun never had: six order types you arm once and walk away from. Set a limit buy at a target market cap, a stop-loss, a trailing stop that follows the high, a recurring DCA schedule, a TWAP that slices one big order to cut price impact, or a conditional trigger built from real signals — "buy when the smart-money score is over 60 and market cap is under $40k," or "sell if the dev dumps." Before you arm anything, a one-click preview shows the live price, whether the order would fire right now, and a rug/honeypot firewall verdict. Open orders stream their status live, every fill comes with a plain-language reason and an explorer-linked receipt, and pause, resume, or cancel is one click and instant.++## How it works++Orders are validated against a closed, no-code condition language (a fixed set of real signals and operators — never arbitrary expressions) and stored server-side; the exact same validation and trigger-evaluation functions run in both the API and the execution worker so the rules can never drift. A long-lived worker sweeps all active orders every ~10 seconds, re-quoting each token directly off the live pump.fun bonding curve (automatically switching to the AMM pool once a coin graduates), and pulling smart-money scores from the reputation graph, dev-dump flags from coin intelligence, and USD conversion from a live SOL price. When a trigger matches, the order fires through the exact same audited trade pipeline as a manual trade — rug/honeypot firewall (a real simulated buy-then-sell round trip plus a token-authority audit), per-trade cap, rolling daily budget, kill switch, and custody ledger with idempotency keys — so the worker adds no new way to move funds, it only decides when to call the one audited path. The tab itself streams order status to the browser over a live server-sent event feed and diffs updates in without disturbing the form you're typing in.++## Every feature++- Six order types selectable from an icon card grid: Limit, Stop, Trailing, DCA, TWAP, Conditional — each with a one-line explainer+- Buy / Sell side toggle that reshapes the sizing fields+- Three trigger metrics: price (SOL per token), market cap (SOL), market cap (USD)+- Limit orders: buy at-or-below a target, sell at-or-above it+- Stop orders: stop-loss sell when a level is breached downward, breakout buy when it breaks upward+- Trailing orders: sell after a % drop from the tracked high-water mark, or buy after a % bounce from the tracked low (trail 0.1–99%)+- DCA: recurring buys or sells with interval presets (5 min, 15 min, 30 min, 1 hour, 6 hours, 1 day) and 1–1000 slices+- TWAP: one large order auto-split into 2–1000 equal slices on an interval, per-slice size derived from the total (SOL for buys, % of holding for sells)+- Conditional order builder: fire when ALL or ANY of up to 8 clauses are true+- Seven real condition signals: price (SOL), market cap (SOL), market cap (USD), price change since order created (%), smart-money score (0–100), dev-has-dumped (yes/no), graduated-to-AMM (yes/no)+- Comparison operators per clause: >, ≥, <, ≤, =, ≠ for numbers; is-true / is-false for yes/no signals — the operator set adapts to the signal you pick+- Add / remove condition clauses inline (the builder never lets you delete the last clause)+- Buy sizing in SOL per fill; sell sizing as a % of the current holding (100% resolves to sell-everything)+- Max slippage control, 1–5000 basis points+- Optional expiry date/time — an unfilled order auto-expires+- Preview before arming: a plain-English readback of exactly what the order will do+- Preview shows the live current metric value, with a graduated-to-AMM tag when relevant+- Preview shows a would-fire indicator: '⚡ Would fire immediately' vs '⏳ Waiting — the trigger isn't met yet'+- Preview flags signals with no live data yet — with the guarantee the order won't fire until that data exists+- Preview runs the rug/honeypot firewall on buys and shows the allow / warn / block verdict with plain-language reasons+- Hero stat row: active orders, filled orders, lifetime fills, live wallet SOL balance+- Live status streaming with a pulsing 'live' badge; list updates arrive without re-rendering the form you're editing+- Frozen-wallet banner: warns that orders won't fire until you unfreeze under Limits+- Kill-switch banner: warns that orders are held while discretionary trading is paused+- Open-orders list with status pills: active, partial, firing, paused, filled, cancelled, expired, error+- Per-order plain-language readback on every card (e.g. 'Stop-loss: sell 100% of the holding of $X if it falls to $25,000 mcap')+- Per-order live footer: current price, fill count, SOL filled, and the last error if one occurred+- DCA/TWAP progress bar showing filled slices out of total+- Pause / Resume any open order without losing fill progress (resume restores 'partial' if it already has fills)+- Per-order instant Cancel+- Cancel-all button with a confirmation dialog — an orders kill switch that reports how many were cancelled+- Fills drill-down per order: status, trigger reason, SOL amount, price impact %, and an explorer-linked on-chain receipt for every real fill+- History section of the last 30 completed orders+- Mainnet / devnet aware — every call follows the hub's network switch+- Editable orders: target price, trail %, slippage, and expiry can be patched on an unfilled order (type/side/token are immutable by design)+- Designed empty state, skeleton loading, and an error state with a Retry button+- Token mint field pre-hinted with $THREE++## Guardrails & safety++Owner-only end to end: the tab only renders for the agent's owner, and every server route re-verifies ownership — a visitor can never read or touch orders. All writes are CSRF-protected and rate-limited. Conditions are a closed vocabulary — a fixed set of real signals and operators, max 8 clauses, no arbitrary code. Inputs are validated and clamped server-side (slippage 1–5000 bps, sell 0–100%, trail 0–100%, max 1000 slices, minimum intervals). Orders never fire on missing data — an unreadable price or absent signal means hold, never a guess. Every fill executes through the same audited pipeline as a manual trade: rug/honeypot firewall (a real simulated buy→sell round trip plus token-authority audit; a coin you can buy but not sell is blocked, not flagged), per-trade SOL cap, rolling 24h budget, wallet freeze, and the trading kill switch — an order can never exceed the leash. Terminal failures (rug verdict, graduated buy) halt the order instead of retrying forever; transient blocks retry. Each agent's fills are serialized so two orders can't double-spend the same budget, idempotency keys make retries safe, and every fill lands in the custody audit ledger. Cancel is instant and idempotent; cancel-all requires an explicit confirmation. The worker defaults to simulate mode, refuses to run live without a real RPC endpoint, and has its own global emergency stop.++## Screenshot-worthy (shot list)++- The conditional builder: compose 'buy when smart-money score ≥ 60 AND market cap < $40k' — or 'sell if the dev dumps' — from dropdowns, and read it back in one plain-English sentence+- The pre-arm preview: live price, an '⚡ Would fire immediately' vs '⏳ Waiting' verdict, and the rug/honeypot firewall's allow/warn/block ruling — all before a single lamport moves+- Open orders updating live under a pulsing 'live' badge, with per-fill receipts linking straight to the on-chain transaction++## API surface++- `GET /api/agents/:id/orders — list orders + summary + live SOL balance + frozen/kill-switch state`+- `GET /api/agents/:id/orders/schema — order types, trigger metrics, and the closed signal/operator vocabulary that drives the condition builder`+- `POST /api/agents/:id/orders — create a validated order`+- `POST /api/agents/:id/orders/preview — validate + live preview: current metric value, would-fire-now, firewall verdict, spend limits`+- `POST /api/agents/:id/orders/cancel-all — cancel every active order`+- `GET /api/agents/:id/orders/stream — SSE live order status (~3s ticks, 40s windows with auto-reconnect)`+- `GET /api/agents/:id/orders/:orderId — one order + its fills`+- `PUT /api/agents/:id/orders/:orderId — edit price/trail/slippage/expiry or pause/resume`+- `DELETE /api/agents/:id/orders/:orderId — instant cancel`diff --git a/blog/agent-abilities/wallet/13-autopilot.md b/blog/agent-abilities/wallet/13-autopilot.mdnew file mode 100644index 000000000..b9ced318c--- /dev/null+++ b/blog/agent-abilities/wallet/13-autopilot.md@@ -0,0 +1,62 @@+# 13 · Autopilot++> Write one sentence in plain English and your agent starts paying its own bills, stacking $THREE, buying back its own coin, and sweeping the profit to you — for real, on-chain.++## What it does++Autopilot turns your agent into a business that funds its own existence. You describe a treasury policy in plain English — "pay your own compute, keep a 1 SOL buffer, put 10% of tips into $THREE, sweep anything over 3 SOL to me on Fridays" — and Autopilot compiles it into clear rules you review and arm. From then on the agent settles its own AI compute bill, protects a safety buffer, dollar-cost-averages income into $THREE, compounds its coin's fees into buybacks, and sweeps profit to your wallet, every action a real on-chain transaction with an explorer link. A live runway view shows the honest truth at all times: real income versus real burn, and exactly how long the agent can sustain itself — or that it's fully self-sustaining.++## How it works++The policy text is compiled server-side by the platform's AI model chain into a strict, bounded rule set (a deterministic parser takes over if no model is available, so compiling never fails), and nothing executes until the owner reviews the rules and explicitly arms them. Once armed, an hourly platform scheduler — plus the on-demand Run Now button — runs each due rule as a real Solana transaction signed by the agent's own custodial wallet: SOL transfers for compute settlement and profit sweeps, and Jupiter-routed swaps for $THREE DCA and the agent's own coin buybacks, each confirmed on-chain before being reported as done. The runway numbers are all real reads: the agent's metered compute cost comes from its usage ledger, tip income from its custody records, and balances (including accumulated $THREE) straight from the chain. Every action first claims a unique per-period record so retries can never double-spend, is clamped by the agent's hard spend-limit policy at the moment of execution, and lands in an audit trail with an explorer link.++## Every feature++- Plain-English treasury policy editor — describe how the agent should manage its money in a sentence or two+- Three one-tap example policies (chips) that fill the editor, e.g. 'Pay your own compute. Keep a 1 SOL buffer. Put 10% of tips into $THREE. Compound coin fees into buybacks weekly. Sweep anything over 3 SOL to me on Fridays.'+- Compile step: the policy is compiled by an AI model (with a deterministic parser fallback so compiling always works) into bounded, reviewable rules — preview only, nothing runs yet+- Compile provenance note: shows whether rules were compiled 'by the model' or 'from your wording'+- Five rule types: self-fund (pay its own compute bill), buffer (hold a SOL safety floor), DCA (dollar-cost-average income or surplus into $THREE), buyback (compound its own coin's fees into buybacks), sweep (send profit above a threshold to the owner)+- Each rule type gets its own icon: 🧠 self-fund, 🛟 buffer, 📈 DCA, 🔥 buyback, 🏦 sweep+- Conflict detection: contradictory rules (e.g. a sweep threshold at or below the buffer) are flagged in red and block arming until fixed+- Assumptions panel (amber): anything ambiguous the compiler defaulted is listed so the owner knows exactly what was assumed+- DCA sizing modes: a percentage of tip income, a percentage of surplus above the buffer, or a fixed SOL amount per period+- Scheduling per rule: hourly, daily, or weekly cadence, with optional specific-weekday runs ('on Fridays')+- Sweep destination field with live Solana-address validation; arming a sweep policy without a destination is blocked+- Explicit two-step consent: compile shows every rule back, then a separate 'Arm autopilot' action (with a risk acknowledgment dialog) turns it on+- Live status badge: pulsing green 'Self-funding' when armed, grey 'Disarmed', red 'Halted' when the kill switch is on+- Runway hero: a big honest number — days (or hours/years) of runway at the current real burn, or 'Self-sustaining' when income covers costs+- Net 30-day profit/loss indicator with up/down arrow+- Income vs Compute bar comparison over the last 30 days, from real ledger data+- Six live stat tiles: wallet balance (SOL + USD), safety buffer floor, $THREE accumulated (live on-chain token balance), compute self-funded to date, buyback count + total, SOL swept to the owner + sweep count+- Armed-rules list with per-rule status chips (ok, confirmed, skipped, alert, paused, error) and the honest note from the last run+- Per-rule Pause / Resume toggle — one tap, no re-compiling+- Edit policy at any time; the saved policy text reloads into the editor+- 'Run now' button: fires one real cycle on demand and shows a per-rule results list+- Every executed action links straight to the transaction on a Solana block explorer ('view tx ↗')+- Prominent kill switch card: 'Halt autopilot' stops everything instantly; a red banner with one-tap 'Re-enable' appears while halted+- Dry-run support in the engine: rules can be evaluated and report 'would spend ~$X' without moving funds+- Hands-free operation: an hourly platform scheduler runs every armed agent's policy automatically (up to 200 agents per sweep, failures isolated per agent)+- Self-fund settles the agent's real metered AI/voice compute bill from its own wallet, converted at the live SOL/USD price — with honest partial settlement if the buffer constrains it+- Buyback targets the agent's own coin launched through three.ws; agents without a coin skip honestly+- Income-based DCA counts each period's tips exactly once, windowed from the last settled DCA+- Mainnet/devnet aware — the tab follows the wallet hub's network switch+- Designed states throughout: skeleton loading, retry-able error state, empty state with a 'Write a policy' call to action, reduced-motion support, screen-reader labels++## Guardrails & safety++Owner-only, structurally: the tab is hidden from non-owners and every endpoint re-verifies ownership server-side; all writes are CSRF-protected and rate-limited. Compiling never arms anything — arming is a separate, explicit step that shows every rule back, requires a real-funds risk acknowledgment, and is timestamped server-side as consent. Detected rule conflicts hard-block arming. At execution time every spend is clamped by the agent's spend policy (per-transaction USD cap, rolling 24-hour USD cap, wallet-freeze flag, anomaly-detection freeze) — the plain-English policy can only tighten that ceiling, never widen it. The buffer floor plus ~0.006 SOL fee headroom can never be breached, actions under a $0.02 dust threshold are skipped, and a breached buffer gates DCA and buybacks. Each rule claims a unique per-period idempotency record before spending, so a retry can never double-spend. Fail-safe by design: a missing price feed pauses the whole cycle, a failed or blocked rule pauses with an honest note instead of guessing, and swaps that land but revert are reported as failures. The DCA target is hard-locked to $THREE and cannot be redirected; token swaps are mainnet-only with slippage clamped to sane bounds. A kill switch halts every action instantly, each rule pauses individually, and every configuration change and on-chain action is written to an audit trail with explorer-verifiable signatures.++## Screenshot-worthy (shot list)++- The runway hero: a pulsing green 'Self-funding' badge next to a giant honest number — '43 d runway at the current burn' or simply 'Self-sustaining' — over live income-vs-compute bars and six real stat tiles ($THREE accumulated, compute self-funded, buybacks, SOL swept to you)+- The compile moment: type one English sentence — 'Pay your own compute. Keep a 1 SOL buffer. Put 10% of tips into $THREE. Sweep anything over 3 SOL to me on Fridays.' — and watch it become five bounded rules with icons, plus red conflict callouts and amber 'here's what I assumed' notes before you're allowed to arm+- Hit 'Run now' and each rule reports back with a status chip and a 'view tx ↗' link to a real Solana explorer page — proof on-chain, not a dashboard animation++## API surface++- `GET /api/agents/:id/autopilot?network=mainnet|devnet (policy + runway + spend caps)`+- `POST /api/agents/:id/autopilot/compile (plain English → structured rule preview)`+- `PUT /api/agents/:id/autopilot (save / arm / disarm / pause / kill)`+- `POST /api/agents/:id/autopilot/run (run one real cycle now, supports dry_run)`+- `Server-side: Jupiter swap API for $THREE DCA and coin buybacks, Solana RPC for balances/sends, hourly cron /api/cron/treasury-autopilot`diff --git a/blog/agent-abilities/wallet/14-intents.md b/blog/agent-abilities/wallet/14-intents.mdnew file mode 100644index 000000000..124e15f65--- /dev/null+++ b/blog/agent-abilities/wallet/14-intents.md@@ -0,0 +1,68 @@+# 14 · Intents++> Tell your agent's wallet what to do in one plain sentence — it compiles the rule, shows you a dry run, and then executes it for real on Solana, inside guardrails you set.++## What it does++Intents turns an agent's wallet into a programmable teammate you talk to. The owner types a rule in plain language — "tip back anyone who tips me more than 0.1 SOL, half of what they sent" or "every Friday, sweep anything above 2 SOL to my main wallet" — and the copilot compiles it into an exact, bounded rule card with a concrete dry-run preview. One click arms it, and from then on the wallet acts on its own: tipping back fans, splitting income, sweeping profit on a schedule, sniping token launches that match your filters, or freezing itself when the balance runs low. Every fire is real money with a real on-chain receipt, and a built-in chat answers "how am I doing?" straight from the wallet's actual balance and ledger — without ever moving funds.++## How it works++The plain-language rule goes to a server-side compiler where a Claude model (with an OpenRouter fallback) is forced into a strict structured schema — one trigger, one action, owner caps — and is explicitly forbidden from inventing amounts, destinations, or tokens; if anything is missing it asks one clarifying question instead of guessing. The server independently re-validates every field, resolves .sol names to real addresses at compile time, and returns a readback plus a live dry-run before anything is stored. Armed rules live in the database: tip, income, and money-stream rules fire instantly from the real payment-settlement hooks, while scheduled, balance-floor, and launch-matching rules are swept by a scheduler every 10 minutes. Every execution flows through the same spend-policy-gated, audited signing path as every other outbound wallet action — SOL transfers sign directly, token buys and snipes route through Jupiter with slippage control and revert detection — and each fire writes an idempotent custody event stamped with the rule's ID and transaction signature, which powers the per-rule receipts, fire counts, and running dollar totals in the UI.++## Every feature++- Plain-language rule composer: describe a rule in a sentence and hit Compile+- Four one-click starter templates: Tip back generously, Self-protect on low balance, Share my income, Sweep profit on a schedule+- AI compiler that asks one clarifying question when a detail is missing instead of guessing+- Compiled intent card with a human-readable readback sentence to confirm+- Trigger and action chips with icons, plus cap chips showing per-action / daily / total limits+- Concrete dry-run simulation on every compile (e.g. 'On a 0.2 SOL tip, this sends back 0.100 SOL to the tipper')+- Read-aloud button that speaks the rule in the agent's own synthesized voice, with browser speech as fallback+- Confirm & arm / Edit wording / Cancel flow — nothing runs until the owner confirms+- Six triggers: on tip received (with minimum amount), on any income, on balance below a floor, on schedule (daily or weekly, weekday + hour UTC), on matching pump.fun launch (creator and/or market-cap filters), on money stream start+- Eight actions: tip, transfer, buy, snipe, withdraw, split income, freeze (kill switch), notify+- Flexible amounts: fixed SOL, a percentage of the tip / income / balance, or sweep everything above a SOL floor+- Destinations as raw Solana addresses or .sol names, resolved to real addresses at compile time+- Tip-back rules with no fixed destination — the engine fills in whoever just tipped at fire time+- Owner caps per rule: max USD per action, daily USD budget, and lifetime USD total, tracked against the real ledger+- Rules list with live stats per rule: color-coded status pill, fire count, dollars moved, last-run time, and last note+- Explorer receipt link on every executed rule — the actual on-chain transaction signature+- Arm / pause toggle switch on every rule+- Test now button that dry-runs any rule against a sample event without moving funds+- Delete with a confirmation dialog+- Optional public trait: advertise the behavior on the agent's public profile (e.g. 'Tips back generously') — never the rule, amounts, or caps+- Ask-your-wallet copilot chat answering questions like 'How am I doing?' from the real balance and 30-day tip/spend/net ledger, phrased in the agent's persona+- Copilot replies can be spoken aloud; Cmd/Ctrl+Enter sends a question+- Hero dashboard: active rules count, live SOL balance, lifetime dollars moved, total fires+- Frozen-wallet banner when the kill switch is engaged, pointing to where to unfreeze+- Token buys and snipes routed through Jupiter with slippage control (default 5%, hard-capped at 50%)+- Snipe rules fire at most once per matched token launch, ever+- Freeze action flips the agent-wide spending kill switch and emails the owner+- Notify action writes an audit event and emails the owner without moving funds+- Event rules (tips, income, streams) fire instantly from real payment settlements; scheduled, balance-floor, and launch rules run on a 10-minute scheduler sweep+- Mainnet / devnet network awareness throughout+- Designed loading skeletons, error state with retry, helpful empty state, and reduced-motion support++## Guardrails & safety++Owner-only end to end: the server rejects any non-owner or logged-out caller on every read and write, so a visitor can never see, create, arm, or fire an intent. Every write is CSRF-protected and rate-limited. Nothing runs without an explicit Confirm & arm, and the server re-validates the full rule independently of the AI parse; the compiler itself is forbidden from inventing amounts, destinations, or tokens and must ask a clarifying question instead. Spending is triple-capped: the rule's own per-action / daily / lifetime USD caps are checked against the real custody ledger, then the agent-wide spend policy — the same hard ceiling every other outbound action obeys — is enforced at execution time, and a frozen wallet blocks all spends and even key recovery. Executions are idempotent (one fire per event, one snipe per launch, at most one low-balance freeze per day), keep a fee buffer so the wallet never empties itself, pause instead of guessing when the price feed is down, and detect reverted swaps so a failure is never reported as success. The signing key is decrypted only at the moment of signing with an audit-logged recovery; every execution writes an audited custody event with the transaction signature. Deletes require confirmation, the copilot chat is read-only by design, and the public-trait option exposes only a behavior label — never the rule, amounts, or caps.++## Screenshot-worthy (shot list)++- The compile moment: a typed sentence becomes a bounded rule card — trigger and action chips, dollar caps, and a live dry-run line like 'On a 0.2 SOL tip, this sends back 0.100 SOL to the tipper' — with a single Confirm & arm button and a speaker icon that reads the rule back in the agent's own voice.+- The rules list with real receipts: each armed rule shows its status pill, fire count, running dollars moved, and a 'receipt' link that opens the actual on-chain transaction in the explorer.+- Ask your wallet 'How am I doing?' and get an in-character answer built from the real balance and the last 30 days of tips, spend, and rule activity — a wallet that talks back but can never move money from a question.++## API surface++- `GET /api/agents/:id/intents`+- `POST /api/agents/:id/intents/compile`+- `POST /api/agents/:id/intents`+- `POST /api/agents/:id/intents/run`+- `POST /api/agents/:id/intents/copilot`+- `GET /api/agents/:id/intents/:intentId`+- `PUT /api/agents/:id/intents/:intentId`+- `DELETE /api/agents/:id/intents/:intentId`+- `POST /api/tts/speak`+- `GET /api/cron/wallet-intents (scheduler, secret-protected)`diff --git a/blog/agent-abilities/wallet/15-pay.md b/blog/agent-abilities/wallet/15-pay.mdnew file mode 100644index 000000000..40618fab2--- /dev/null+++ b/blog/agent-abilities/wallet/15-pay.md@@ -0,0 +1,61 @@+# 15 · Pay++> Your agent shops the open x402 economy: find any paid API, see its live price, and settle it in USDC from the agent's own Solana wallet — receipt on-chain in seconds.++## What it does++The Pay tab turns an agent's wallet into a checkout for the machine economy. Owners search a live marketplace of paid x402 services — data feeds, intel, APIs — or paste any endpoint URL, and instantly see what it costs in USDC before committing a cent. One click pays the service straight from the agent's own Solana wallet, with the payment lifecycle streaming live on screen and ending in an on-chain receipt plus the service's actual response. Every spend lands in a permanent, auditable payment history: what was paid, to whom, for what, and when.++## How it works++Search hits a server-side aggregator that pulls and merges live service catalogs from public x402 facilitators (PayAI and Coinbase's CDP), ranks them against the query, and returns only Solana-payable entries. Selecting a service triggers a preview call: the server probes the endpoint, reads its 402 payment challenge, verifies it asks for USDC on Solana, and returns the live price and recipient — without moving funds or touching keys. On confirm, the server decrypts the agent's custodial Solana keypair (an audit-logged event), atomically reserves the spend against the agent's policy caps, builds and signs a real USDC transfer on Solana mainnet, and presents it to the service as an x402 payment header; the service verifies and settles it on-chain. The whole lifecycle streams back to the browser as live events, and the finished payment — signature, USD value, destination, service name — is written to the agent's custody ledger, which also powers the tab's activity feed. Balances shown are genuine on-chain reads of the wallet's SOL and token accounts.++## Every feature++- Live bazaar search with 350ms debounce-as-you-type plus an explicit Search button, querying the merged x402 service catalog+- Results filtered to services actually payable in Solana USDC (entries without a Solana payment option are hidden)+- Service cards showing name, description, host domain, and live price label, each with a one-click Pay button+- Paste-an-endpoint mode: enter any arbitrary URL to pay an x402 service that isn't in the bazaar, with URL validation (full https/http URLs only)+- Pre-payment preview sheet fetching the live price and the agent's USDC balance in parallel: price in USDC, recipient address, HTTP method, current agent balance+- Editable JSON request-body editor for POST/PUT/PATCH services, pre-filled with the service's example payload+- Free-endpoint detection: if the endpoint answers without asking for payment, the tab says there's nothing to pay and stops+- Not-payable detection with a plain-language reason: lists which other networks the service accepts, or explains a missing Solana fee payer+- Insufficient-funds guard: compares price against balance, disables the Pay button, states exactly how short the wallet is, surfaces the deposit address with a copy button, and a 'Fund wallet →' shortcut that jumps to the Deposit tab+- Risk-acknowledgment dialog gating every payment (with a native-confirm fallback if the dialog module can't load)+- Live streamed payment timeline: Submitting → Price confirmed (with the exact USDC amount) → Payment signed by agent wallet → Settled on-chain (with the transaction signature), rendered as checkmark steps with a spinner on the active step+- Green receipt card after settlement: amount paid, recipient, and the transaction signature linked to the Solscan explorer+- The purchased service's actual response rendered inline in the receipt (truncated past 1,500 characters)+- 'Pay another' one-click return to the service list+- Payment activity feed: the agent's last 25 x402 payments from the custody ledger — service name, destination address, time-ago, status (pending highlighted), USD amount, and explorer-linked signature+- Instant post-payment refresh: balance and activity list update immediately so the spend is visible right away+- Devnet awareness: if the hub's network toggle is on devnet, a note warns that x402 settles on Solana mainnet from the agent's mainnet USDC+- Owner-only tab: hidden entirely from visitors viewing someone else's agent+- Designed error states with Retry buttons on search, preview, payment, and activity; skeleton loading states; reduced-motion support; keyboard focus rings and ARIA live regions+- Agent-wallet isolation: every payment is signed by the agent's own custodial Solana wallet, never a shared platform wallet — a request without an agent context is refused+- Per-agent spend policy enforced before signing: rolling 24-hour daily USD cap and per-transaction USD cap, reserved atomically so simultaneous payments can't overshoot the limit+- Wallet freeze kill switch: a frozen wallet rejects every autonomous payment instantly+- Scoped session-key capabilities: spending can be leashed to specific service hosts under least-privilege rules+- Natural-language spend policy rules and a behavioral anomaly guard that can auto-freeze the wallet on suspicious outflows+- USDC-only asset pinning: a service demanding payment in any other token is refused outright, blocking a wallet-drain attack+- Server-side URL hardening: public-https-only fetches, private-network addresses blocked, connections pinned against DNS tricks, redirects never followed+- Honest failure messaging: errors distinguish 'no funds were transferred' from 'settlement uncertain — check activity before retrying to avoid paying twice'+- Every payment lands in the agent's permanent custody ledger with the service name, URL, destination, USD value, and transaction signature — a full audit trail+- Per-IP and global rate limiting plus single-use CSRF protection on the money-moving path (price previews never burn a token)++## Guardrails & safety++Owner-only tab, gated end to end: the caller must be signed in and must own the agent, and the payment is signed exclusively by that agent's own custodial wallet — the shared platform wallet is never used, and a request without an agent context is rejected. A risk-acknowledgment dialog precedes every payment, and the money-moving call requires a single-use CSRF token. Before any signature, the per-agent spend policy is enforced atomically: rolling 24-hour daily USD cap, per-transaction USD cap, wallet freeze kill switch, scoped per-service capabilities, natural-language policy rules, and a behavioral anomaly detector that can auto-freeze the wallet — a breach moves no funds. The asset is pinned to USDC (any service demanding a different token is refused, closing a wallet-drain vector), target URLs are hardened against internal-network access, and if the wallet can't cover the price the Pay button is disabled and the owner is routed to funding instead. Failures state honestly whether funds moved, pre-settlement rejections release their spend reservation, uncertain outcomes conservatively count as spent, and every payment is written to a permanent, owner-auditable custody ledger.++## Screenshot-worthy (shot list)++- The live payment timeline: press Pay and watch four steps light up in real time — price confirmed, payment signed by the agent's wallet, settled on-chain with the transaction signature — ending in a green receipt with a Solscan link and the service's actual response.+- The bazaar search: type 'weather' or 'intel' and real paid APIs from across the open x402 economy appear with live USDC prices, each one payable in a single click from the agent's own wallet.+- The funding-aware guard: when the agent is short, the tab shows exactly how much it holds versus the price, hands you the deposit address with one-tap copy, and routes you straight to funding instead of letting a doomed payment fire.++## API surface++- `GET /api/bazaar/search (aggregated x402 service catalog from public facilitators — PayAI + Coinbase CDP — filtered to Solana-payable)`+- `POST /api/x402-pay with preview:true (live price probe — no funds move, no key signs)`+- `POST /api/x402-pay streamed as Server-Sent Events (the real payment: challenge → built → settled → result)`+- `GET /api/agents/:id/solana/holdings (live on-chain SOL + SPL token balances, USDC flagged)`+- `GET /api/agents/:id/solana/custody?category=x402 (owner-only payment history from the custody ledger)`diff --git a/blog/agent-abilities/wallet/16-vanity.md b/blog/agent-abilities/wallet/16-vanity.mdnew file mode 100644index 000000000..2ddb843da--- /dev/null+++ b/blog/agent-abilities/wallet/16-vanity.md@@ -0,0 +1,56 @@+# 16 · Vanity++> Give your agent a wallet address that spells its name — ground on your own CPU at millions of attempts, then applied with a funds-safe swap that sweeps every asset over first.++## What it does++Every agent on three.ws carries its own Solana wallet, and the Vanity tab lets the agent's owner trade that wallet's random address for a custom one that starts or ends with text they choose — the agent's name, a brand, a lucky word. The search runs right in the browser: pick how many CPU cores to spend, watch a live counter tear through hundreds of thousands of addresses per second, and pause, resume, or cancel at any time. The moment a match is found it is applied automatically, and if the old wallet holds any SOL or tokens, everything is moved to the new address before the switch — funds can never be left behind. When it's done, the new address appears with its custom pattern highlighted, complete with the attempt count, the time it took, and a link to see it live on-chain.++## How it works++The grind runs client-side: a pool of Web Workers (one per selected CPU core) drives a Rust-compiled WASM keypair generator that races to find an Ed25519 keypair whose Base58 address matches the requested prefix and/or suffix — first match wins, the hot loop runs in ~200ms batches so pause/cancel respond instantly, and pausing genuinely frees the cores while preserving the attempt count. The winning 64-byte key is POSTed to the agent-wallet API with a single-use CSRF token; the server re-derives the address from the key and independently verifies it matches the requested pattern, never trusting the client's claim. If the current custodial wallet is funded, the server recovers the old key through the audited custody layer and sweeps every asset — all SPL tokens across both the classic Token program and Token-2022, transferring and closing each token account to reclaim rent, plus all remaining SOL — to the new address in confirmed versioned transactions, and only then encrypts and stores the new key, so a failed sweep aborts the whole swap with the wallet unchanged. A bounded server-side grind (up to 3 combined characters, 4M iterations, 30-second budget) remains as a fallback path for short patterns supplied without a key.++## Every feature++- Owner-only tab in the Agent Wallet hub (hidden from non-owner viewers; server independently enforces ownership with 403)+- Current-address card with the vanity prefix/suffix highlighted in purple and a 'vanity' badge when the wallet already has a custom pattern+- 'Starts with' prefix field and 'Ends with' suffix field — combine both in one address+- Up to 6 characters per pattern (Base58), with live input scrubbing that strips invalid characters as you type+- Smart placeholder suggestion derived from the agent's own name+- Case-insensitive matching toggle — matches any capitalization and cuts the search time+- CPU core slider from 1 up to every core the machine has, with a live 'N / max' readout+- Quick core presets: 1 core, a balanced default (about half the machine), and Max+- Live difficulty estimate: expected attempt count plus a time estimate for the chosen core count, recomputed on every keystroke+- 'This one is hard' amber warning when the pattern crosses ~500 million expected attempts+- Explicit warning banner before replacing an existing wallet, spelling out that funds are auto-swept first+- One-click 'Grind & apply vanity address' button that runs the whole flow end to end+- Live grind screen: big attempts-per-second rate (k/M formatted), running attempt counter, and a live ETA computed from the workers' real measured speed+- Pause/Resume that genuinely frees the CPU cores mid-grind and picks up the attempt count where it left off, with a 'paused' pill indicator+- Cancel button that aborts the grind and returns to the form+- Automatic apply on match: the found keypair is submitted immediately with a single-use CSRF token — no extra step+- 'Match found — migrating funds & applying…' state while the server sweeps and swaps+- Automatic full-wallet migration: all SOL plus every SPL token (both token programs), with token-account rent reclaimed, moved to the new address before the key swap+- Retry-without-regrinding recovery: if the apply step fails, the found key stays in memory so the owner can retry the assign or discard it — the old wallet stays intact and funded+- Success card showing the new address with the matched pattern highlighted, a migrated-funds summary (SOL amount + token count), and found-in-N-attempts / duration stats+- One-click block-explorer link, network-aware (Solscan on mainnet, Solana Explorer on devnet)+- 'Change again' button to grind a fresh pattern immediately+- Provisioning path: an agent with no wallet yet gets one created by grinding — the vanity address becomes its first address+- Server-side fallback grind for short patterns (up to 3 combined characters) when no browser-ground key is supplied+- Old addresses preserved in the agent's wallet history (last 10 swaps) with timestamps and sweep status+- Base58 validation with human-readable hints for the four confusable characters (0, O, I, l) that Solana addresses never contain+- Skeleton loading state, designed error state, worker cleanup on tab close mid-grind, reduced-motion support, aria-live progress announcements, and a mobile layout++## Guardrails & safety++Owner-only end to end: the tab is hidden from non-owner viewers and the server rejects anyone but the agent's owner (sign-in required, 403 otherwise). The state-changing apply call requires a single-use CSRF token and is rate-limited under the same per-user cap as withdrawals plus a per-IP burst limit. The server never trusts the browser: it re-derives the address from the submitted key and proves it matches the requested pattern before adopting it. The money-safe gate is sweep-then-swap — if the old wallet is funded, every asset must move to the new address in confirmed on-chain transactions before the stored key changes; a failed sweep aborts everything and the old wallet stays untouched and funded. Key recovery for the sweep goes through the audited custody layer, and every swap is recorded as a custody event, an activity event, and an audit-log entry, with the replaced address kept in the wallet's history. Patterns are capped at 6 Base58 characters each, inputs are scrubbed to valid characters only, the server-side fallback grind is bounded (3 combined characters, 4M iterations, 30-second budget) so it can never hang, and the UI shows an explicit warning before replacing a funded address.++## Screenshot-worthy (shot list)++- The live grind readout: a huge monospace attempts-per-second counter with a running attempt total and ETA, churning across every core you gave it — with real Pause/Resume that visibly frees your CPU+- The success card: the new address with your chosen pattern glowing in purple, 'Migrated 0.42 SOL + 3 tokens from the old address', and 'Found in 1,234,567 attempts · 12.3s' above a one-click explorer link+- The difficulty estimator reacting as you type: attempt counts and time estimates update live per character and per core, flipping to an amber 'this one is hard' warning on ambitious patterns++## API surface++- `GET /api/agents/:id/solana/vanity — owner-only status: current address, vanity prefix/suffix, wallet source, is_vanity flag, server grind cap`+- `POST /api/agents/:id/solana/vanity — owner-only assign: accepts a browser-ground 64-byte secret key (verified server-side) or grinds short patterns server-side, sweeps all funds old→new, swaps the stored encrypted key, returns address/iterations/duration/swept summary`diff --git a/blog/agent-abilities/wallet/17-policy.md b/blog/agent-abilities/wallet/17-policy.mdnew file mode 100644index 000000000..ab885148a--- /dev/null+++ b/blog/agent-abilities/wallet/17-policy.md@@ -0,0 +1,59 @@+# 17 · Policy++> Write your agent's spending rules in plain English — AI translates them, deterministic code enforces them on every single spend.++## What it does++The Policy tab lets a wallet owner govern their AI agent's money the way they'd explain it to a person: type "Block any payment over $25, never let the wallet drop below 1 SOL, and freeze everything if a trade drops more than 30%" and hit Compile. The platform turns that sentence into numbered, enforceable rules and reads them back in plain English so you confirm exactly what will be enforced. Before you save, it backtests the rules against your agent's real spending history — "against your last 47 spends, this would have blocked 3 ($61)" — or, with no history yet, shows how hypothetical cases like "a $250 payment" or "buying a 30-minute-old token" would be decided. Once saved, the rules run on every trade, snipe, service payment, and withdrawal the agent makes; the AI only translates and explains — it never approves a payment.++## How it works++The tab talks to an owner-gated policy endpoint on the agent's custodial Solana wallet. On compile, the server sends the English through the platform's free-first LLM chain (Groq/OpenRouter/NVIDIA free tiers, Claude/OpenAI as last resort) with a strict JSON-only prompt, then hard-validates the output against a bounded rule DSL — anything unenforceable is dropped, and a real deterministic phrase parser takes over if no model is available, so compiling always works. Rules are an ordered first-match firewall (allow / block / ask-me / freeze) over twelve live signals like amount, rolling daily total, token age, SOL reserve after the spend, trade P&L, time of day, and whether the recipient has been paid before. The backtest replays up to 60 days of real custody spend events through the exact evaluator that runs in production, including faithful rolling 24-hour totals. Saving writes the policy to the agent record with a full audit diff; at runtime the shared spend guards evaluate it on every outbound path, log every block with the human-readable rule that fired, and a freeze rule automatically trips the wallet's kill-switch.++## Every feature++- Plain-English policy composer: free-text rules compiled into a deterministic rule document+- Three one-click starter presets: Conservative, Active trader, and Pay-only+- Compile & preview button with real async state; Cmd/Ctrl+Enter keyboard shortcut to compile+- Numbered plain-English readback generated from the compiled rules themselves, so it can never drift from what code enforces+- Per-rule action tags: Block, Freeze, Allow, and Ask me (require step-up approval)+- Assumptions callout listing anything the AI defaulted, inferred, or couldn't capture+- Backtest against real spend history (last 60 days, up to 1,000 spends) run by the exact production evaluator+- Backtest summary chips: allowed vs blocked counts with USD totals for each+- Green/red proportion bar visualizing the allow/block split+- Per-spend timeline: one square per historical spend (up to 120, newest first) with hover tooltips showing type, amount, date, and the rule that would have blocked it+- Per-rule attribution list showing which rule blocked how many spends and how much USD+- Synthetic 'How it behaves' probes when there's no history yet: up to 8 hypothetical cases derived from the policy's own thresholds (e.g. 'A $250 payment → Blocked', 'Buying a 30-minute-old token → Blocked')+- Explicit Save / Discard flow — nothing is enforced until the owner reviews and saves+- Loosening guard: a confirmation dialog before saving a policy that removes protections the wallet has now+- 'Remove all rules' action with confirmation; numeric caps and the freeze switch stay in place+- Active-policy card showing the live rule count, the numbered rules, and cap chips (daily cap, per-tx cap, frozen/active status)+- Cross-link to Withdraw → Limits & Safety for the always-enforced numeric caps+- Network-aware: policy, history, and backtest load per network (mainnet/devnet) and refresh on network switch+- Draft box pre-filled with the saved policy's original English for easy editing+- Four rule actions: allow (whitelist carve-out), block, require step-up (ask the owner), freeze (block + trip the wallet kill-switch)+- Twelve condition signals: spend amount (USD), today's spend so far, today's running total, token age in hours, SOL left after the spend, trade profit/loss %, hour of day (UTC), asset, recipient address, spend type (trade/snipe/x402 payment/withdraw), allowlist membership, and recipient-seen-before+- Ordered first-match firewall semantics with AND-combined clauses per rule; no match means allowed (numeric caps still apply)+- Deterministic fallback parser compiles common phrasings even with no AI model configured (marked 'parsed locally' in the preview)+- Freeze rules automatically trip the wallet's kill-switch when they fire live, pausing all autonomous spending+- Every live block is recorded to the wallet's custody feed with the exact human-readable rule that stopped it+- Every policy change is audited with a before/after diff written to the custody log+- Signed-out state with a sign-in link that returns to the tab; skeleton loading, retry-able errors, refusal vs error styling, and toasts+- Accessible throughout: ARIA roles and labels, focus rings, reduced-motion support++## Guardrails & safety++Owner-only end to end: the tab is hidden from non-owner viewers and the server independently verifies session auth plus agent ownership (401/403 otherwise), with rate limiting on every call. Saving or clearing rules requires a CSRF token. The AI never decides a spend — its output is hard-validated and only the normalized, enforceable rules are ever stored or run; if nothing survives validation the save is refused rather than silently storing an empty policy. Policies are bounded (max 40 rules, 8 conditions each) and a rule with no valid conditions is dropped so a typo can never brick all spending. Policy rules layer on top of the always-enforced numeric caps, withdraw allowlist, and freeze switch — they can tighten but never weaken them. Saving a policy that removes existing protections requires an explicit confirmation, as does removing all rules. At runtime, if the safety check itself can't complete, autonomous spends fail safe to blocked while the owner's own withdrawals are never trapped; every block and every auto-freeze is written to the audit trail.++## Screenshot-worthy (shot list)++- The backtest timeline: a row of green and red squares — one per real past spend — scored by the exact evaluator that will run live, with headline chips like '47 allowed · $312' vs '3 blocked · $61'+- One sentence in, a numbered firewall out: 'stop everything if a trade drops more than 30%' becomes rule #4 with a Freeze tag that literally trips the wallet's kill-switch on-chain activity+- The readback + assumptions card: the platform explains every rule back in plain English and openly lists what it assumed, so the owner confirms intent before anything is enforced++## API surface++- `GET /api/agents/:id/solana/policy?network= — current compiled policy, plain-English readback, source text, numeric limits`+- `POST /api/agents/:id/solana/policy {op:'compile', text} — LLM/heuristic compile + backtest + synthetic probes`+- `POST /api/agents/:id/solana/policy {op:'backtest', rules} — replay a rule set against real custody history`+- `PUT /api/agents/:id/solana/policy {rules, english} — save the validated policy (CSRF-gated, audited)`diff --git a/blog/agent-abilities/wallet/18-withdraw.md b/blog/agent-abilities/wallet/18-withdraw.mdnew file mode 100644index 000000000..be33b98e8--- /dev/null+++ b/blog/agent-abilities/wallet/18-withdraw.md@@ -0,0 +1,67 @@+# 18 · Withdraw++> Sweep any asset out of your agent's wallet in three taps — server-signed, policy-guarded, and audited down to every single key touch.++## What it does++The Withdraw tab is the owner's exit door and control room for an agent's custodial Solana wallet. You pick any asset the wallet actually holds — SOL, USDC, or any token — enter a wallet address or a .sol name (or scan a QR code), review a confirmation screen, and the funds move on-chain. Alongside withdrawals, the same tab lets you set hard spending ceilings, restrict where funds may ever be swept, and freeze the wallet with one tap, instantly pausing all of the agent's autonomous trading and payments while keeping your own withdrawals open. A third panel shows the complete custody audit trail: every withdrawal, automated spend, limit change, key access, and every payment your safety rules blocked.++## How it works++The agent's private key lives encrypted on the server and never touches the browser — a withdrawal is a server-signed request, and each time the key is decrypted, that access is itself recorded as a custody event. Before signing, the server runs the withdrawal through the shared spend policy: the freeze switch, the withdraw allowlist, the owner's plain-English safety rules (compiled by an LLM into deterministic rules, then enforced by code), per-transaction and rolling 24-hour USD ceilings, and a behavioral anomaly guard. Each request carries a unique idempotency key claimed as a row in the custody ledger, so a retry replays the original result instead of double-sending, and an ambiguous network timeout leaves the withdrawal marked pending with an explorer link rather than risking a duplicate. On a SOL "Max" the server reserves rent plus fee headroom so a full sweep can never brick the wallet, and token withdrawals automatically open the recipient's token account when needed. The asset picker, spend totals, and activity feed all read live on-chain and ledger data — nothing is cached guesswork.++## Every feature++- Three sub-sections in one tab: Withdraw, Limits & Safety, and Activity, switchable via a pill button strip+- Owner-only tab — visitors never see it+- Asset picker populated from live on-chain holdings: SOL plus every SPL token with a non-zero balance (both classic and Token-2022 programs), sorted largest first, USDC labeled by name+- Available-balance readout under the amount field that updates when you switch assets+- Destination accepts a raw Solana address or a .sol name, resolved live (debounced) with an inline green check for valid addresses and a resolved-address preview for names+- QR-code scanner (camera overlay) that fills the destination field, understands solana: payment URIs, and supports Escape / click-away / Cancel to dismiss; the button hides itself on unsupported browsers+- Max button that sweeps the full balance — on SOL the server holds back rent plus network-fee headroom so the wallet can never be bricked by its own sweep+- Client-side validation: positive amounts only, amount cannot exceed the available balance, destination must resolve+- Two-step flow: a review/confirm screen summarizing asset, amount, destination, and network before anything is submitted+- Live allowlist badge on the confirm screen: '✓ allowlisted' or '⚠ not on allowlist — this will be rejected' before you even press Confirm+- Irreversibility warning on every confirmation: crypto transfers are final+- Risk-acknowledgment gate before any mainnet withdrawal (with a graceful fallback prompt if the dialog module fails to load); devnet skips it+- Single-use CSRF token on every state-changing request — the server burns each token on use+- Idempotency key generated per withdrawal so retries replay the original result instead of double-sending; an in-flight duplicate returns 'withdrawal in progress'+- Success screen distinguishing 'Withdrawal confirmed' (✓) from 'Withdrawal submitted' (⏳, submitted but not yet confirmed) with matching guidance+- View-on-explorer link for every completed or pending withdrawal, plus a 'Withdraw more' reset button+- Empty state pointing you to the Deposit tab when the wallet holds nothing withdrawable on the selected network+- Skeleton loading states, designed error states with a reason line, and Retry buttons on every data load+- Devnet/mainnet network switch awareness — changing networks resets the form and reloads holdings and limits+- Limits & Safety: one-tap Freeze wallet button that immediately pauses all autonomous spending (trades, snipes, x402 payments) while keeping withdrawals open; unfreezing asks for confirmation since it re-arms spending+- Frozen/active status card with clear copy explaining exactly what a freeze does+- Spent-today chip showing rolling 24-hour USD outflow, with an alert style when the daily cap is reached+- Daily USD spend cap and per-transaction USD cap editors — leave blank for no limit; the ceilings govern every outbound path: trades, snipes, x402 payments, and withdrawals+- Withdraw allowlist editor: add addresses or .sol names (resolved before adding), remove entries with one click, deduplicated, capped at 50 entries; empty list means any valid address+- Server-side allowlist validation on save — an invalid address is rejected with a clear message instead of silently dropped+- Activity: the custody audit trail — withdrawals, trades, snipes, x402 payments, limit changes, and key-recovery events, each with icon, timestamp, amount (SOL or USD), shortened destination, status, and an explorer link+- Policy-block rows in the activity feed that quote the exact plain-English rule that stopped a payment: 'Blocked by your rule', 'Frozen by your rule', 'Needs your approval', 'Auto-frozen by policy', 'Spend policy updated'+- Cursor-based pagination in the activity feed with a 'Load older' button (25 events per page)+- Toast notifications for confirmed withdrawals, saved limits, and freeze/unfreeze+- Server-side destination checks: valid base58, on-curve only (program addresses where funds could be lost forever are rejected), and never the agent wallet itself+- Automatic recipient token-account creation on SPL withdrawals, with an upfront check that the wallet holds enough SOL for the fee and rent+- USD pricing for the spend ceiling: SOL priced live, USDC priced 1:1; unpriced tokens are governed by the allowlist instead+- Reduced-motion support: spinners and skeletons stop animating when the user prefers reduced motion+- Full keyboard and screen-reader support: focus rings, aria-pressed sub-tabs, live-region status for address resolution, labeled remove buttons++## Guardrails & safety++Owner-only end to end: every endpoint verifies the signed-in user owns the agent. Withdrawals are capped at 5 per day per user with an additional per-IP burst guard. Every state-changing request requires a single-use CSRF token, and mainnet withdrawals require an explicit risk acknowledgment. The server enforces the shared spend policy before signing: withdraw allowlist (if set, funds can only go to approved addresses), per-transaction and rolling 24-hour USD ceilings, the owner's plain-English safety rules enforced deterministically, and a behavioral anomaly guard that can auto-freeze the wallet. The freeze switch halts all autonomous spending but deliberately never blocks the owner's withdrawals — a freeze can never trap funds. Destinations must be valid, on-curve addresses and cannot be the wallet itself. SOL sweeps always reserve rent plus fees so the account survives. Idempotency keys make retries safe against double-sends, ambiguous confirmations return a pending state with an explorer link instead of guessing, and every withdrawal, key decryption, limit change, and policy block lands in an owner-visible audit ledger.++## Screenshot-worthy (shot list)++- The confirm screen warns you before the server does: if a destination isn't on your allowlist, a live '⚠ not on allowlist — this will be rejected' badge appears right next to the address+- The one-tap Freeze wallet panel — a kill switch that instantly pauses all of the agent's autonomous trading and payments while your own exit stays open+- The Activity feed showing a payment stopped cold with 'Blocked by your rule' and the exact plain-English rule you wrote, quoted inline++## API surface++- `POST /api/agents/:id/solana/withdraw`+- `GET /api/agents/:id/solana/holdings`+- `GET /api/agents/:id/solana/limits`+- `PUT /api/agents/:id/solana/limits`+- `GET /api/agents/:id/solana/custody`+- `GET /api/sns?name=<name>.sol`diff --git a/blog/agent-abilities/wallet/19-give.md b/blog/agent-abilities/wallet/19-give.mdnew file mode 100644index 000000000..34a3406fc--- /dev/null+++ b/blog/agent-abilities/wallet/19-give.md@@ -0,0 +1,52 @@+# 19 · Give++> Turn your agent's wallet into a giving wallet — round up the spare change or donate any amount to any Solana cause, settled on-chain with a receipt you can verify.++## What it does++The Give tab turns an agent's wallet into a charity wallet. Pick a cause — any Solana wallet or a human-readable .sol name — and it's saved so giving is one tap from then on. Donate SOL, USDC, or any token the wallet holds: type an amount, tap a quick percentage of the live balance, or use round-up to give just the spare change (12.37 becomes a 0.37 donation and a clean 12.00 kept). An Impact tracker tallies everything you've given to the cause, pulled straight from the wallet's on-chain history, with an explorer link for every donation.++## How it works++The browser never holds a key. A donation is a server-signed transfer from the agent's self-custodied Solana wallet: the server authenticates the owner, validates the destination, enforces the agent's spend policy and daily caps, decrypts the custodial key (with an audit log entry), signs a versioned Solana transaction, submits it with retries, and polls for on-chain confirmation — returning a pending state instead of risking a double-send if confirmation is ambiguous. Balances in the asset picker come from live Solana RPC reads of the wallet's SOL and token accounts, with automatic failover to a public RPC. The Impact tally is computed by filtering the wallet's custody ledger for confirmed transfers whose destination matches the cause address and summing their USD value. Cause names ending in .sol are resolved through the Solana Name Service.++## Every feature++- Cause picker: set any Solana wallet address or any .sol name as the giving destination+- Optional cause name label (up to 60 characters, e.g. "Ocean Cleanup") shown across the tab+- Live .sol name resolution as you type (debounced), with instant visual feedback: green check for a valid address, resolved address preview for a .sol name, warning for anything unresolvable+- Cause is remembered per agent, so giving is one tap next time; Change and Cancel controls to edit or keep the current cause+- Give now form with an asset dropdown built from live on-chain holdings — SOL plus every token the wallet actually holds (USDC named, other tokens shown by short mint), each with its available balance+- Quick-amount percentage chips: 1%, 5%, 10%, 25%, and Max (100%) of the live balance+- Free-form amount field with decimal keyboard on mobile and a live "Available" readout that updates when you switch assets+- Client-side validation before review: amount must be positive and within the available balance, with clear inline error messages+- Two-step review-and-confirm flow: a summary card showing cause name, full destination address, exact amount, and network, plus an explicit "crypto transfers are final" warning before anything moves+- Round-up / spare change mode: one tap per asset donates only the fractional remainder (e.g. 12.37 USDC → give 0.37, keep 12.00), with the rounding math spelled out on each row+- Impact tracker: total USD given and donation count to the current cause, computed from the wallet's real on-chain custody trail — never self-reported+- Recent donations list (up to 5) with dates and "view transaction" explorer links+- Success screen with a thank-you, the exact amount given, a "View on explorer" button, and a "Give again" reset+- Distinct "Donation submitted" pending state when the network hasn't confirmed yet, telling you to verify on the explorer before retrying — prevents accidental double-gives+- Mainnet / devnet network awareness: switching networks resets the form and reloads balances and impact for that network+- Per-donation idempotency key, so a retried or repeated request can never send the same donation twice+- Risk acknowledgment gate before any mainnet donation (skipped on devnet)+- Cross-site request forgery protection on every donation submission+- Owner-only tab — visitors browsing someone else's agent never see it+- Designed loading skeletons while balances and impact load, error states with Retry buttons, and helpful empty states (no funds points you to the Deposit tab; whole-number balances explain how spare change accrues)+- Accessibility built in: live-region status announcements, alert roles on errors, keyboard focus rings, and reduced-motion support++## Guardrails & safety++Owner-only end to end: the tab is hidden from visitors, and the server independently verifies the signed-in user owns the agent before any read or transfer. Every donation passes a review-and-confirm step with an explicit finality warning, plus a risk-acknowledgment dialog on mainnet. Server-side, donations ride the hardened withdraw rail: CSRF-protected, capped at 5 withdrawals per user per day plus a per-IP burst guard, and governed by the agent's shared spend policy — per-transaction USD ceiling, rolling 24-hour daily USD cap, an optional destination allowlist, owner-authored natural-language policy rules, and a behavioral anomaly guard. Destinations are validated as real on-curve Solana addresses (program addresses and self-sends rejected). A SOL "max" donation always reserves rent and fee headroom so the wallet can never be bricked. Idempotency keys make retries safe: a confirmed donation replays its original receipt, an in-flight one returns "in progress," and an ambiguous confirmation is held as pending (never silently failed) so nothing double-sends. Every key recovery and transfer is recorded in an audited custody ledger.++## Screenshot-worthy (shot list)++- Round up spare change: one tap turns 12.37 USDC into a $0.37 real on-chain donation while keeping the clean $12.00 — micro-philanthropy straight from an agent's wallet+- The Impact card tallies total giving straight from the blockchain custody trail — every donation counted with a live explorer link, zero self-reported numbers+- Type a human-readable .sol name like oceancleanup.sol and watch it resolve live to the cause's wallet address before you save++## API surface++- `GET /api/sns?name= — resolves .sol names to wallet addresses via Solana Name Service (Bonfida), cached 5 min, IP rate-limited`+- `GET /api/agents/:id/solana/holdings?network= — live on-chain balances: SOL plus every SPL token held (Token + Token-2022 programs), USDC flagged, sorted by size`+- `GET /api/agents/:id/solana/custody?network=&limit=100 — owner-only custody audit trail (agent_custody_events ledger) used to compute the Impact tally`+- `POST /api/agents/:id/solana/withdraw — server-signed, idempotent, spend-policy-governed on-chain transfer; the donation is this withdraw with the cause wallet as destination`diff --git a/blog/agent-abilities/wallet/20-proof-of-custody.md b/blog/agent-abilities/wallet/20-proof-of-custody.mdnew file mode 100644index 000000000..9df8c04c7--- /dev/null+++ b/blog/agent-abilities/wallet/20-proof-of-custody.md@@ -0,0 +1,63 @@+# 20 · Proof of Custody++> Don't trust — verify: your agent wallet's custody, cryptographically proven in your own browser against the Solana blockchain itself.++## What it does++Proof of Custody turns "trust us with your agent's wallet" into "check it yourself." Every few hours the platform takes a snapshot of every custodial wallet it holds and commits a single cryptographic fingerprint of all of them to the Solana blockchain. This tab shows the owner their wallet's personal slice of that commitment — balance, epoch, position in the tree — and then verifies it live, right in the browser, by reading the blockchain directly. The platform is never trusted for the answer: if anything doesn't reconcile, the tab turns red and says exactly which step failed. It also audits movement: every drop in balance since the last snapshot must map to an authorized, logged wallet event, and any outflow the ledger can't explain is loudly flagged.++## How it works++A scheduled job runs every six hours: it reads each custodial wallet's live on-chain balance, combines it with the wallet address, a commitment to the wallet's activity-ledger head, and the epoch number into a hashed "leaf," builds a Merkle tree over all wallets, stores the tree, and anchors the root on Solana as a signed memo transaction. When the owner opens the tab, it fetches their private inclusion proof from an ownership-gated endpoint, then a verifier running entirely in the browser recomputes the leaf hash from the public facts, folds the Merkle path up to a root, fetches the anchor transaction straight from public Solana RPC nodes (deliberately not the platform's own infrastructure), and confirms the computed root matches the one committed on-chain. Server and browser share the exact same hashing module, so the prover and the verifier can never drift apart. Alongside the proof, the server reconciles the balance change since the previous epoch against the wallet's authorized withdraw/spend events, with a small allowance for network fees, and reports "reconciled" or "unexplained."++## Every feature++- Owner-only tab in the Agent Wallet hub — hidden entirely from non-owner viewers+- Verification auto-runs on load; no button press needed+- Four-step verification checklist, each step with a pass/fail icon and plain-English explanation: recompute leaf from public data, walk the Merkle path to the root, read the anchor straight from the chain, match computed root to on-chain root+- Live status seal with four visual states: amber spinner while verifying, green check for verified, amber clock for awaiting on-chain anchor, red X for failed+- Fact grid: epoch number, attested SOL balance, total wallets in the tree, snapshot timestamp, wallet address, ledger head, Merkle root, and on-chain anchor+- Direct block-explorer link to the anchor transaction+- In-browser verifier reads the chain via public Solana RPC endpoints with automatic failover across multiple providers; the platform's own RPC proxy is used only as a last resort+- Anchor memo is validated as a genuine custody attestation and its epoch is checked against the proof's epoch — a mismatched epoch fails verification+- Honest-failure semantics: an unreachable anchor is reported as UNVERIFIED, never quietly passed+- Movement reconciliation panel comparing the balance to the previous epoch: baseline (first epoch), reconciled, or unexplained+- Per-event breakdown of authorized outflows (withdraws and spends) with SOL amounts, categories, reasons, and explorer links+- Loud red '⚠ Unexplained movement' alert when an outflow can't be matched to a logged, authorized event+- Deposits recognized as external and benign — balance increases never require authorization+- Fee tolerance built into reconciliation so ordinary network fees never trigger false alarms+- 'Show it off' card appears only after successful verification: a verified-custody badge, a copy-link button for the public integrity page, a copy-embed button for a paste-anywhere HTML badge, and a link to the standalone verifier page+- Shared badge deliberately links to the public integrity page — anyone can re-verify the platform root there, while per-wallet proofs stay private to the owner+- Standalone /proof page runs the identical verification experience outside the hub+- Public /integrity page and open API expose the latest epoch, root, anchor, wallet count, and aggregate SOL — no login needed+- 'Not attested yet' state for brand-new wallets, showing the latest epoch and a check-again button — new wallets are picked up at the next snapshot+- Signed-out state with a sign-in link that returns the owner to the exact page+- Error state with a focused retry button and a plain explanation+- Skeleton loading placeholders while the proof is fetched+- Attestation epochs run automatically every six hours as a scheduled job that snapshots, builds the tree, and anchors the root on-chain+- Epochs are a monotonic, append-only log so any rollback or replay is detectable+- Leaf hashing uses domain-separated prefixes (the Certificate Transparency convention) so an internal tree node can never masquerade as a wallet leaf+- Server and browser import the same hashing/Merkle module, pinned by golden tests, so proof and verification can never diverge+- Wallets whose balance can't be read this round are skipped, never attested with a guessed balance — they're included again next epoch+- Epoch and leaves are persisted atomically so a proof read can never see a half-written tree+- Anchoring is best-effort: an unfunded or missing attester key records the epoch as pending/failed honestly instead of blocking, and it can be re-anchored later+- Reduced-motion and ARIA support throughout the loading and status states++## Guardrails & safety++The tab is owner-only and the proof endpoint verifies wallet ownership on every request, returning a sign-in prompt to anyone else; reads are rate-limited. The verification itself is the guardrail: the browser never trusts the server's word — a failed or unreachable on-chain read is always reported as unverified, an epoch mismatch fails the check, and a root mismatch shows an unmissable red "DO NOT TRUST" failure. The shareable badge intentionally links only to the public aggregate integrity page, never to the private per-wallet proof. On the attestation side: wallets whose balance can't be read are skipped rather than attested with a guessed value, epochs are append-only so tampering is detectable, hashing is domain-separated against forgery, the epoch and its leaves persist atomically, and the cron endpoint requires a secret compared in constant time.++## Screenshot-worthy (shot list)++- The seal flip: an amber spinner reading 'Verifying custody on-chain…' resolves into a green check — 'Custody verified on-chain · epoch N' — above four green-ticked steps, each one executed by the viewer's own browser against public Solana nodes, not by the platform.+- The movement reconciliation panel: every lamport that left the wallet since the last snapshot itemized against authorized, explorer-linked events — and a red '⚠ Unexplained movement' alarm wired to fire if even one outflow can't be accounted for.+- The 'Show it off' card: a green verified-custody badge with one-click copy-paste embed HTML that links anyone to the public integrity page, where they can re-verify the platform's on-chain root in their own browser.++## API surface++- `GET /api/agents/:id/solana/proof — owner-gated inclusion proof (leaf, Merkle path, anchor reference, movement reconciliation)`+- `Public Solana RPC getTransaction — api.mainnet-beta.solana.com, solana-rpc.publicnode.com, api.devnet.solana.com (browser reads the anchor directly)`+- `POST /api/solana-rpc?network=… — platform RPC proxy, last-resort failover only`+- `GET /api/custody/integrity — public no-auth aggregate for the /integrity page`+- `GET /api/custody/anchor?epoch=N|latest — public anchor reference for one epoch`+- `GET/POST /api/cron/custody-attest — scheduled snapshot + on-chain anchor job (bearer-secret protected)`diff --git a/blog/agent-abilities/wallet/21-access.md b/blog/agent-abilities/wallet/21-access.mdnew file mode 100644index 000000000..ac49bded4--- /dev/null+++ b/blog/agent-abilities/wallet/21-access.md@@ -0,0 +1,53 @@+# 21 · Access++> Put every bot on a leash: mint tight, revocable spending keys so no strategy ever touches more of your agent's wallet than you allow.++## What it does++The Access tab is where a wallet owner hands out least-privilege spending keys instead of full wallet authority. Each key says exactly what its holder may do — which actions (trade, snipe, or pay services), how much per use, how much in total, on which specific tokens, services, or destinations, and for how long — and nothing else. Every key shows a live budget meter and expiry countdown, and can be killed instantly, alone or all at once. Flip on strict mode and the wallet denies any autonomous spend that doesn't present a covering key.++## How it works++Every key is a server-enforced policy grant stored in the platform database — the wallet's private key is never delegated. Each grant is signed with an HMAC over its immutable scope and re-verified on every single use, so a tampered or forged grant fails its integrity check and is rejected. Spending against a key is metered through the same custody ledger that backs the wallet's daily limit, and each check-and-reserve happens as one atomic database statement under advisory locks, so concurrent spends can never race past a budget and a revoke takes effect on the very next spend. The gate is composed into the shared spend guards that every autonomous path — trading, sniping, and x402 service payments — must pass, and a key can only ever narrow what the wallet-wide policy already allows.++## Every feature++- Mint form: create a scoped key with a custom label describing who holds it+- Allowed-actions picker with three checkboxes: Trade, Snipe, Pay services (x402)+- Max-per-use USD spend ceiling (optional)+- Total lifetime USD budget ceiling (optional)+- Expiry presets: 1 hour, 6 hours, 24 hours (default), 7 days, 30 days — server accepts any TTL from 60 seconds up to 1 year+- Target restriction modes: Any target, Specific mints, Specific services, Specific destinations+- Multi-line target allowlist input (one per line, up to 50 targets); service entries are normalized to bare hostnames so a pasted full URL still matches+- Validation that a key must actually narrow something: at least one action, and either a spend ceiling or a target restriction+- Least-privilege mode toggle: require a covering key for every autonomous spend, deny anything without one (owner actions and withdrawals unaffected)+- Suggested keys: the server detects armed sniper strategies with no scoped key and drafts one sized to that strategy's own daily budget — accepted in one tap+- Live key list with status badges: active, revoked, expired, tampered+- Plain-English capability sentence on each key, e.g. "Can snipe up to $40 total on 3 allowed mints, and nothing else"+- Live budget progress bar per key that shifts from green/amber to amber/red at 90% consumed+- Spent-of-budget readout ($X of $Y used) plus live expiry countdown (days/hours/minutes/seconds left)+- Per-key Revoke button with confirmation — revocation is immediate, permanent, and idempotent+- Revoke-all kill switch that terminates every live key at once, with confirmation and a revoked count+- Auto-refresh every 20 seconds while the tab is visible, keeping spend meters and countdowns live+- Auto-resolution on the spend path: autonomous callers automatically find the best covering key (tightest, soonest-expiring first) without threading key IDs around+- Full audit trail: every mint, revoke, and spend is recorded as a custody event+- Designed states throughout: skeleton loading shimmer, retryable error state, and a guided empty state explaining what a first key does+- Accessibility built in: progressbar semantics, ARIA-labeled controls, live error announcements, reduced-motion support++## Guardrails & safety++Owner-only surface end to end: the tab is hidden from non-owners and the API verifies both authentication and agent ownership on every call (401/403 otherwise). Every mutation is CSRF-protected and rate-limited. Keys strictly subtract authority — both the key ceiling and the wallet-wide policy must pass, so a key can never spend more than the wallet allows. Every grant is HMAC-signed over its immutable scope and re-verified in constant time on every use; a database-level tamper produces a rejected \"tampered\" grant, and the server refuses to mint at all if the signing secret is missing or weak. Expiry is mandatory (60 seconds minimum, 1 year maximum, 24-hour default); withdrawals are deliberately not delegable. Budget checks and reservations are atomic under per-key and per-agent locks so concurrent spends cannot overshoot a ceiling, and a revoke can never be raced. Revoke and revoke-all require explicit confirmation dialogs. Every failure fails safe toward denial, and denial messages tell the holder exactly which limit blocked the spend.++## Screenshot-worthy (shot list)++- A key card that reads like a contract: "Can snipe up to $40 total on 3 allowed mints, and nothing else" — with a live budget bar burning from green to red and a ticking expiry countdown+- The Suggested keys card: the platform notices an armed sniper strategy running without a leash and drafts the exact scoped key for it, budgeted to what the strategy can already spend — one tap to accept+- The strict-mode switch: one toggle and every autonomous trade, snipe, or payment without a covering key is denied on the spot, while a red Revoke All button sits ready as the wallet-wide kill switch++## API surface++- `GET /api/agents/:id/capabilities`+- `POST /api/agents/:id/capabilities`+- `PUT /api/agents/:id/capabilities/settings`+- `POST /api/agents/:id/capabilities/:capabilityId/revoke`+- `POST /api/agents/:id/capabilities/revoke-all`diff --git a/blog/agent-abilities/wallet/22-recovery.md b/blog/agent-abilities/wallet/22-recovery.mdnew file mode 100644index 000000000..66cd79a3b--- /dev/null+++ b/blog/agent-abilities/wallet/22-recovery.md@@ -0,0 +1,70 @@+# 22 · Recovery++> Lose your login — or go silent forever — and your funded agent wallet still finds its way home: guardians, a beneficiary, and a dead-man's switch that only fires when you truly can't stop it.++## What it does++Recovery is the agent wallet's answer to the oldest problem in crypto: what happens to a funded wallet when its owner loses access or is gone for good. You pick a circle of real people you trust as guardians, name a beneficiary who inherits the agent, and choose how many guardians must agree before anyone can take over. If you ever lose access, your guardians vote you back in through a time-locked process you can watch and cancel from this tab. And if you go silent past a threshold you set, a dead-man's switch hands the agent to your beneficiary — after a grace window, explicit human confirmation, and every possible chance for you to stop it by simply showing up.++## How it works++The tab reads and writes a single owner-gated recovery API for the agent: one call loads the full state (guardian roster, threshold, beneficiary, dead-man status, any live process), one saves the configuration, one records an "I'm here" check-in, and one cancels an active process. Guardians and beneficiaries act from a separate guardian console backed by their own approve/decline/confirm endpoints, so a recovery needs a threshold of other people's votes plus a 48-hour time-lock before anything moves. A daily server job measures the owner's real activity — logins, trades, custody events, explicit check-ins — arms an inheritance only after the owner-set inactivity threshold is crossed, sends warnings a week before, and completes a hand-off only after the grace window elapses with confirmation. Crucially, no private key is ever exported or decrypted: recovery atomically reassigns who owns the agent in the database, and the same server-held key keeps signing for the new owner. Every step lands in the custody trail and audit log, the wallet's autonomous spending is frozen for the duration of any contested process, and the transfer itself is guarded so it applies exactly once and aborts if ownership changed mid-flight.++## Every feature++- Guardian roster: add trusted people by @username or email (Enter-to-add supported), up to 10 guardians+- Guardian cards showing avatar, name, 'trusted' badge, and the date they were added+- One-click guardian removal with a confirmation prompt+- Configurable approval threshold — an 'M of N' dropdown (appears once you have 2+ guardians); defaults to a sensible 2-of-N+- Beneficiary designation by @username or email, displayed with a green 'heir' badge+- Beneficiary removal auto-disables the dead-man's switch (with confirmation explaining exactly that)+- Dead-man's switch on/off toggle — locked until a beneficiary is set, with inline guidance telling you why+- Inactivity threshold control: 7–365 days of silence before the switch arms (default 90)+- Grace + confirmation window control: 1–90 days after arming before control can pass (default 14)+- Live inactivity progress bar that shifts from green to danger colors once you pass 70% of the threshold+- Plain-language countdown: 'You've been quiet for 12d of the 90d threshold — inheritance would arm in 78d if you stay away'+- 'I'm here — reset the clock' one-tap check-in button that resets the dead-man timer+- A check-in instantly aborts any in-flight inheritance — the switch is always defeatable by being alive+- Activity is auto-detected from real signals (logins, trades, custody events, agent usage, explicit check-ins), so a quiet-but-active owner is never falsely declared gone+- Active-process card with a 4-step visual timeline: request opened → guardian approvals → safety time-lock / grace window → control transfers+- Live guardian approval counter (e.g. 'Guardian approvals (1/2)') with threshold-met state+- In-character narration: the agent itself describes what's happening in first person during a recovery or inheritance+- Live countdown on the 48-hour safety time-lock, refreshed by 15-second polling that only runs while a process is live and pauses when the tab is hidden+- One-click abort buttons: 'Stop this recovery — it's not me' and 'I'm here — cancel inheritance', each with a confirmation+- Final-step danger warning when a transfer is imminent, telling you it's your last chance to cancel+- 48-hour anti-takeover time-lock opens automatically the moment the guardian threshold is reached+- Recovery attempts that never gather enough approvals auto-expire after 14 days, and the wallet unfreezes+- Wallet auto-freeze during any contested process: autonomous spending stops so funds can't be drained mid-recovery, while the owner's own withdrawals stay open+- The requester of a recovery can never approve their own takeover — approvals must come from other guardians+- Only one active recovery or inheritance per agent — duplicate or contested attempts are rejected, not raced+- No key export ever: recovery transfers who owns the agent; the encrypted signing key never leaves the server+- Standalone guardian console (/guardian) where guardians and beneficiaries approve, decline, or confirm across every agent they protect+- Guardian votes are recounted live against the current roster — approvals from since-removed guardians stop counting+- No-guardian inheritances require the beneficiary's explicit confirmation — control never passes purely on a timer+- Daily automated sweep: expires stale requests, arms eligible inheritances, warns owners 7 days before arming (at most once per window), and completes hand-offs only after grace plus confirmation+- Notifications to every party at every step: recovery requested, time-lock started, switch armed, approaching-threshold reminders, transfer completed+- Every action written to the agent's custody trail and the platform audit log+- Atomic, idempotent ownership transfer that refuses to fire if the owner changed mid-process, and moves the agent's linked avatar to the new owner too+- Privacy by design: non-owners see a redacted view, emails are masked, and only members of the recovery circle can read the status at all+- Owner-only tab — invisible to anyone else viewing the wallet+- Polished states throughout: skeleton loading shimmer, error state with retry, empty-roster guidance, and reduced-motion accessibility support++## Guardrails & safety++Owner-only tab; every write requires a fresh CSRF token and is rate-limited. Only the owner configures the circle; you can't be your own guardian or beneficiary; guardian count capped at 10; threshold clamped to the roster size. A recovery needs a threshold of OTHER guardians' approvals (self-approval is blocked) plus a 48-hour time-lock the owner can cancel at any point; requests expire after 14 days if approvals never arrive. Inactivity is bounded to 7–365 days and grace to 1–90 days, validated on both client and server. The dead-man's switch can't even be enabled without a beneficiary, warns the owner a week before arming, opens a grace window instead of transferring, and is cancelled by any sign of life — a login, a trade, or one tap of 'I'm here'. During any contested process the wallet's autonomous spending is frozen (owner withdrawals stay open), only one process can exist per agent at a time, the final transfer is atomic, idempotent, and aborts if ownership changed underneath it, and the private key is never exported, copied, or decrypted at any step. Destructive UI actions (remove guardian, remove beneficiary, cancel process) all require explicit confirmation, and everything is logged to the custody trail and audit log.++## Screenshot-worthy (shot list)++- The agent narrates its own recovery in first person — during a live process the card reads: 'Someone is trying to recover me. My guardians are weighing in, and a safety window is running. If this isn't you, you have until it ends to shut it down.'+- The dead-man's switch card: a live inactivity bar that turns red as you approach the threshold, a countdown to arming, and a single glowing button — '✋ I'm here — reset the clock.'+- The 4-step recovery timeline with a ticking 48-hour countdown and the big red 'Stop this recovery — it's not me' abort button — a screenshot that says 'your wallet can defend itself.'++## API surface++- `GET /api/agents/:id/recovery`+- `PUT /api/agents/:id/recovery`+- `POST /api/agents/:id/recovery/checkin`+- `POST /api/agents/:id/recovery/requests/:rid/cancel`+- `POST /api/agents/:id/recovery/requests (+ /approve, /decline, /confirm, /complete — guardian console side)`+- `GET /api/agents/recovery-inbox (guardian console)`+- `GET /api/cron/dead-man-switch (daily sweep, secret-gated)`diff --git a/blog/agent-abilities/wallet/23-self-defense.md b/blog/agent-abilities/wallet/23-self-defense.mdnew file mode 100644index 000000000..834a5408e--- /dev/null+++ b/blog/agent-abilities/wallet/23-self-defense.md@@ -0,0 +1,58 @@+# 23 · Self-defense++> Every agent wallet gets an immune system — it learns what normal spending looks like, freezes itself the instant something looks wrong, and explains why in plain English.++## What it does++The Self-defense tab is the owner's control room for a wallet that protects itself. The platform learns each agent's normal spending behavior — typical amounts, known addresses, usual hours, usual pace — and scores every outbound action against that profile in real time. Anything anomalous auto-freezes the wallet, notifies the owner, and shows up here as a flagged card with a 0–100 risk score and plain-language reasons like "3.2× your largest-ever trade" or "first payment to this address." The owner resolves it with one tap: approve it (which unfreezes the wallet and teaches the guard so the same pattern never trips again), keep it frozen, or sweep every remaining coin to a pre-set safe address.++## How it works++A deterministic scoring engine builds a behavioral baseline from up to 2,000 of the agent's real historical spends (size distribution, up to 200 known counterparties, active hours, assets, velocity), caches it for three hours, and reads live 1-minute/10-minute velocity counts fresh on every action. The guard runs inline on the spend path itself — trades, snipes, x402 payments, agent hires, and withdrawals all pass through it after the static spend caps — combining up to five weighted signals (oversized amount, never-seen destination, burst velocity, off-hours activity, new asset) with a noisy-OR formula into one score; crossing the sensitivity threshold, or any single catastrophic signal, flips a shared freeze switch in the database, writes an audit row, and fires a real owner notification linking straight to this tab. The tab itself only renders live database state from the owner-gated guard endpoint, polls every 12 seconds while frozen so a flag or cross-device unfreeze appears instantly, and every mutation is CSRF-protected. Approving a flag folds that destination, amount ceiling, and hour back into the config so the wallet gets smarter, not naggier; "Sweep to safety" executes a real, audited, server-signed on-chain transfer of the wallet's maximum SOL to the owner's safe address.++## Every feature++- Real-time anomaly scoring of every outbound action (trades, snipes, x402 payments, hires, withdrawals) against a learned behavioral baseline+- Automatic wallet freeze the moment an action crosses the risk threshold, holding the triggering action before funds move+- Frozen-wallet alarm banner with pulsing shield icon: 'Wallet frozen — your money is defending itself'+- Flagged-activity cards showing a plain-language summary, color-coded 0-100 risk score, category, dollar amount, destination address, and time+- Named, human-readable risk factors on every flag, e.g. '3.2× your largest-ever trade ($x vs $y)', 'First payment to this address — never used before', '12 spends in the last minute — far above your normal pace'+- One-tap 'It was me — approve & unfreeze': unfreezes the wallet AND teaches the guard (trusts the address, raises the size ceiling, marks the hour normal) so the same pattern never re-trips+- One-tap 'Keep frozen' to confirm an action as bad and record the verdict+- One-tap 'Sweep to safety': a confirmed, real on-chain transfer of all SOL (minus rent and fees) to the owner's pre-set safe address — available even while frozen, and the wallet stays frozen afterward+- Manual 'Unfreeze wallet' override (with confirmation) when frozen without an open flag; unfreezing also settles any open flags+- 'What your wallet has learned' baseline dashboard: spends learned, largest-ever spend, known addresses, and active hours (UTC)+- Learning mode for young wallets: under 5 priced spends the guard widens tolerances and only freezes on the clearest threats, and the UI says so honestly+- Trusted-pattern counter showing how many owner-approved addresses will never re-trip+- Master on/off toggle for the entire guard+- Three sensitivity presets — Relaxed (freezes only on the clearest threats, score ≥ 0.85), Balanced (recommended default, ≥ 0.7), Strict (freezes on the first sign of unusual activity, ≥ 0.5) — as a segmented control with descriptions+- Safe-address setting with server-side validation that rejects invalid addresses and program addresses where funds could be unrecoverable+- 'Reset what's learned' control (with confirmation) that wipes trusted addresses, the learned size ceiling, and learned hours so everything scores fresh+- Anomaly timeline of every scored action — allowed, flagged, approved, or denied — each with risk score, category, dollar amount, status badge, and relative timestamp+- 'Load older' cursor-based pagination through the full timeline history+- Auto-refresh every 12 seconds while frozen (paused when the tab is hidden) so new flags or an unfreeze from another device appear live+- Five independent anomaly signals: transaction size vs largest-ever, brand-new destination, velocity burst (absolute: 8 spends/minute or 20 per 10 minutes; plus relative 3×-normal-pace detection), off-hours activity, and first-time asset movement+- Catastrophic signals (a new high-value destination, a hard velocity burst) force a freeze regardless of sensitivity — tuned to never miss a drain-the-wallet attack, including drains that stay under daily caps via many small payments+- Dust filter: spends under $1 never flag on size or destination alone+- Owner notification on every auto-freeze (in-app and push) with the summary, top factors, and a direct link to this tab+- Withdrawals are never blocked by a freeze — the owner's escape hatch stays open so a freeze can never trap funds; withdrawals are still scored and shown on the timeline+- Fail-safe scoring: if the guard ever can't finish scoring, Strict-mode wallets freeze on the safe side while others proceed with the incident recorded+- Designed states throughout: skeleton loading, signed-out prompt with sign-in link, actionable error state with retry, and a friendly empty state confirming the guard is watching++## Guardrails & safety++Owner-only surface end to end: the tab is gated to the wallet owner and every API call verifies session or bearer auth plus agent ownership, returning 401/403/404 otherwise. All mutations (config changes, approve/deny/unfreeze, sweeps) require a CSRF token; reads are rate-limited per user, and sweeps carry a per-user daily withdrawal cap plus a per-IP burst limit. Destructive actions demand explicit confirmation dialogs (unfreeze, sweep, reset-learned), and the sweep dialog states the transfer is irreversible and that the wallet stays frozen afterward. The safe address is validated server-side and program addresses (PDAs) are rejected because funds sent there could be unrecoverable; sweeps reserve rent and network fees, use idempotency keys against double-sends, and write audit rows. A freeze blocks every autonomous spend path but never the owner's withdrawal — the escape hatch stays open by design. Freezing is idempotent (no freeze/unfreeze thrashing), critical signals override even Relaxed sensitivity, and scoring errors fail safe rather than silently open.++## Screenshot-worthy (shot list)++- The alarm state: a pulsing red shield beside 'Wallet frozen — your money is defending itself', above a flag card that spells out exactly why in plain English — '3.2× your largest-ever trade' with a red risk-87 badge — and three one-tap verdicts: Approve & unfreeze, Keep frozen, Sweep to safety.+- The 'What your wallet has learned' dashboard — spends learned, largest spend, known addresses, active hours — proof on screen that the wallet has a real behavioral memory, not a static rule list.+- The sensitivity segmented control (Relaxed / Balanced / Strict) next to the promise that approving a flag teaches the guard — the wallet gets smarter, never naggier.++## API surface++- `GET /api/agents/:id/solana/guard`+- `GET /api/agents/:id/solana/guard?before=<cursor>`+- `PUT /api/agents/:id/solana/guard`+- `POST /api/agents/:id/solana/guard`+- `POST /api/agents/:id/solana/withdraw`