repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources15d ago| #1 | # Solana Clawd Agent Creation Guide |
| #2 | |
| #3 | ## Overview |
| #4 | |
| #5 | Agents on **Solana Clawd** are specialized AI assistants designed to handle specific tasks across the Solana DeFi, trading, NFT, and SPL-token ecosystem. This guide shows you how to create, publish, and deploy agents into our hub at [/agents](https://www.x402.wtf/agents) so other builders can install and run them. |
| #6 | |
| #7 | Every agent you publish becomes: |
| #8 | |
| #9 | - 🪐 **Discoverable** via our JSON API and manifest |
| #10 | - 🔌 **Installable** into any MCP client (Clawd Desktop, Cursor, ClawdOS, etc.) |
| #11 | - 🎨 **Mintable** as an on-chain MPL Core asset on Solana (optional, via `/agents-mint`) |
| #12 | - 🗣️ **Addressable** through our A2A (agent-to-agent) endpoint at `/api/agents/a2a` |
| #13 | - 📈 **Trackable** in the hosted registry at `/agents-registry` |
| #14 | |
| #15 | --- |
| #16 | |
| #17 | ## Agent Anatomy |
| #18 | |
| #19 | ### Basic Structure |
| #20 | |
| #21 | ```json |
| #22 | { |
| #23 | "author": "your-github-or-solana-handle", |
| #24 | "config": { |
| #25 | "systemRole": "Your detailed system prompt here...", |
| #26 | "openingMessage": "Optional welcome message", |
| #27 | "openingQuestions": ["Suggested first question?"] |
| #28 | }, |
| #29 | "identifier": "unique-agent-id", |
| #30 | "meta": { |
| #31 | "title": "Agent Display Name", |
| #32 | "description": "Clear, concise description (max 200 characters)", |
| #33 | "avatar": "🤖", |
| #34 | "tags": ["solana", "defi", "trading"], |
| #35 | "category": "defi" |
| #36 | }, |
| #37 | "schemaVersion": 1, |
| #38 | "createdAt": "2026-04-16" |
| #39 | } |
| #40 | ``` |
| #41 | |
| #42 | ### Key Components |
| #43 | |
| #44 | **identifier**: URL-safe name (lowercase, hyphens, no spaces). Used as the JSON filename and in API routes. |
| #45 | |
| #46 | - Good: `solana-jupiter-router`, `pump-fun-sniper` |
| #47 | - Bad: `My Agent!`, `Pump.Fun Agent v2` |
| #48 | |
| #49 | **title**: Display name shown in [/agents](https://www.x402.wtf/agents). |
| #50 | |
| #51 | **description**: Short summary shown in the agent card (160–200 chars optimal). |
| #52 | |
| #53 | **avatar**: Single emoji that represents the agent's function. |
| #54 | |
| #55 | **tags**: 3–8 keywords. Common Solana tags: `solana`, `spl`, `jupiter`, `raydium`, `pumpfun`, `meteora`, `drift`, `marginfi`, `kamino`, `nft`, `mpl-core`, `metaplex`, `priority-fees`, `mev`, `validator`, `stake`. |
| #56 | |
| #57 | **category**: One of `defi`, `trading`, `nft`, `analytics`, `security`, `dev-tools`, `education`, `governance`. |
| #58 | |
| #59 | **systemRole**: The core prompt that defines agent behavior. |
| #60 | |
| #61 | --- |
| #62 | |
| #63 | ## Writing Effective System Prompts |
| #64 | |
| #65 | ### Structure Template |
| #66 | |
| #67 | ```text |
| #68 | You are [ROLE/IDENTITY on Solana] |
| #69 | |
| #70 | CAPABILITIES: |
| #71 | - [What the agent can do] |
| #72 | - [Key specialization — which Solana programs, DEXs, or SDKs] |
| #73 | - [Tools/knowledge available] |
| #74 | |
| #75 | GUIDELINES: |
| #76 | - [How to approach tasks] |
| #77 | - [Response format] |
| #78 | - [Constraints/limitations — e.g. priority fee ceilings, slippage caps] |
| #79 | |
| #80 | WORKFLOW: |
| #81 | 1. [Step-by-step process] |
| #82 | 2. [How to handle specific scenarios] |
| #83 | |
| #84 | EXAMPLES: |
| #85 | [Optional: Demonstrate desired behavior] |
| #86 | ``` |
| #87 | |
| #88 | ### Solana DeFi Agent Example |
| #89 | |
| #90 | ```json |
| #91 | { |
| #92 | "systemRole": "You are a Solana Yield Optimization Specialist focused on the Kamino, MarginFi, Drift, and Meteora ecosystems.\n\nCAPABILITIES:\n- Analyze yield opportunities across lending, LP, and staking protocols on Solana\n- Calculate net APY factoring in borrow rates, LP fees, and reward emissions\n- Monitor priority fees and suggest optimal transaction timing via Helius/Triton RPC\n- Compare concentrated liquidity ranges on Meteora DLMM vs Orca Whirlpools\n\nGUIDELINES:\n- Always include risk assessments (high/medium/low) with reasoning\n- Factor priority fees (lamports/CU) and Jito tips into net return math\n- Flag programs with recent audits and known incidents\n- Never promise outcomes; this is analysis, not financial advice\n\nWORKFLOW:\n1. Ask for capital size, risk tolerance, and time horizon\n2. Check current market conditions (SOL price, funding rates, TVL moves)\n3. Compare 3–5 opportunities with pros/cons table\n4. Provide specific Jupiter routes or program instructions\n5. Include warnings on smart contract, oracle, and peg risks\n\nFORMAT:\nProtocol | APY | TVL | Risk | Priority Fee | Recommendation" |
| #93 | } |
| #94 | ``` |
| #95 | |
| #96 | --- |
| #97 | |
| #98 | ## Best Practices |
| #99 | |
| #100 | ### Do's |
| #101 | |
| #102 | ✅ Be specific about which Solana programs/DEXs the agent understands |
| #103 | ✅ Use accurate Solana terminology (CU, priority fees, Jito tips, PDAs, CPIs) |
| #104 | ✅ Provide structured, scannable output (tables, bullets) |
| #105 | ✅ Mention audit status (OtterSec, Neodyme, Sec3, Halborn) when relevant |
| #106 | ✅ Include disclaimers about rug risks on pump.fun / new SPL tokens |
| #107 | ✅ Use clear step-by-step workflows referencing real tool calls |
| #108 | |
| #109 | ### Don'ts |
| #110 | |
| #111 | ❌ Make financial guarantees or price predictions |
| #112 | ❌ Conflate Solana with EVM concepts (there's no "gas" — use "priority fees" / "compute units") |
| #113 | ❌ Ignore program audit status or track record |
| #114 | ❌ Recommend interacting with unverified programs without warnings |
| #115 | ❌ Copy prompts from other agents verbatim |
| #116 | |
| #117 | --- |
| #118 | |
| #119 | ## Agent Categories on Solana Clawd |
| #120 | |
| #121 | ### 🪙 DeFi & Finance |
| #122 | |
| #123 | Jupiter routing, Kamino vaults, MarginFi lending, Drift perps, Meteora DLMM, Orca Whirlpools, Sanctum LST, stablecoin peg monitoring. |
| #124 | |
| #125 | ### 📈 Trading & Analysis |
| #126 | |
| #127 | Pump.fun sniping, Raydium LP analysis, Phoenix orderbook making, MEV/sandwich detection, whale tracking via Helius webhooks, on-chain flow via Bitquery/Flipside. |
| #128 | |
| #129 | ### 🎨 NFT & MPL Core |
| #130 | |
| #131 | Tensor/Magic Eden floor analysis, MPL Core asset minting, compressed NFT (cNFT) workflows, royalty enforcement, collection bootstrapping. |
| #132 | |
| #133 | ### 🛠️ Dev & Security |
| #134 | |
| #135 | Anchor program auditing, Solana Playground helpers, Squads multisig review, IDL explainers, priority-fee estimators, transaction simulation via LiteSVM/Mollusk/Surfpool. |
| #136 | |
| #137 | ### 📚 Research & Education |
| #138 | |
| #139 | Solana fundamentals, SVM internals, validator economics, stake delegation, governance (Realms, SPL-Governance), tokenomics for SPL launches. |
| #140 | |
| #141 | --- |
| #142 | |
| #143 | ## Testing Your Agent |
| #144 | |
| #145 | Before submitting to the [/agents](https://www.x402.wtf/agents) hub, test thoroughly: |
| #146 | |
| #147 | 1. **Role adherence**: Does it stay on Solana topics? |
| #148 | 2. **Edge cases**: How does it handle a non-Solana question? |
| #149 | 3. **Error handling**: Does it gracefully decline out-of-scope tasks? |
| #150 | 4. **Response quality**: Accurate compute unit estimates? Correct program IDs? |
| #151 | 5. **Consistency**: Same tone and format across conversations? |
| #152 | |
| #153 | ### Test Prompts |
| #154 | |
| #155 | ```text |
| #156 | "What's the best SOL-staking yield right now, net of fees?" |
| #157 | "Compare providing liquidity on Meteora DLMM vs Orca Whirlpool for SOL/USDC" |
| #158 | "Calculate impermanent loss for a ±5% DLMM range on JLP/USDC" |
| #159 | "Is program ID <PROGRAM_ID> safe to interact with?" |
| #160 | "Explain how Jito tips affect transaction landing rates" |
| #161 | ``` |
| #162 | |
| #163 | --- |
| #164 | |
| #165 | ## Localization |
| #166 | |
| #167 | Agents are automatically translated into 18 languages when merged. Tips for translation-friendly prompts: |
| #168 | |
| #169 | - Use clear, standard English |
| #170 | - Avoid idioms and colloquialisms |
| #171 | - Keep sentences concise |
| #172 | - Use consistent terminology (don't alternate "SOL" and "Solana native token") |
| #173 | - Define technical terms on first use |
| #174 | |
| #175 | --- |
| #176 | |
| #177 | ## Submission Checklist |
| #178 | |
| #179 | - [ ] Unique, descriptive identifier |
| #180 | - [ ] Clear title and description |
| #181 | - [ ] Appropriate avatar emoji |
| #182 | - [ ] 3–8 relevant Solana tags |
| #183 | - [ ] Category assigned |
| #184 | - [ ] Well-structured system prompt with real Solana references |
| #185 | - [ ] Tested with at least 10 prompts |
| #186 | - [ ] No copyrighted or proprietary content |
| #187 | - [ ] JSON validates correctly (`bun run build`) |
| #188 | |
| #189 | --- |
| #190 | |
| #191 | ## Publishing to the Solana Clawd Hub |
| #192 | |
| #193 | Three ways to publish: |
| #194 | |
| #195 | ### 1. PR into the repo (recommended) |
| #196 | |
| #197 | ```bash |
| #198 | git clone https://github.com/clawdsolana/OpenClawd.git |
| #199 | cd openclawd/defi-agents |
| #200 | cp agent-template.json src/your-agent-name.json |
| #201 | # edit your agent |
| #202 | bun run format && bun run build |
| #203 | # open a PR |
| #204 | ``` |
| #205 | |
| #206 | Once merged, your agent appears at: |
| #207 | |
| #208 | - `https://www.x402.wtf/agents` (gallery) |
| #209 | - `https://www.x402.wtf/{your-agent-name}.json` (API) |
| #210 | - 18 localized variants auto-generated |
| #211 | |
| #212 | ### 2. Mint as on-chain MPL Core asset |
| #213 | |
| #214 | Visit [/agents-mint](https://www.x402.wtf/agents-mint) to register your agent as a Metaplex Core asset. This gives it a transferable Solana identity, optional royalty rails, and an entry in the on-chain [/agents-registry](https://www.x402.wtf/agents-registry). |
| #215 | |
| #216 | ### 3. Host externally, register via A2A |
| #217 | |
| #218 | Expose your agent over our A2A protocol at `POST /api/agents/a2a` (see [API.md](./API.md)) and submit the registration endpoint — your agent stays on your infra but is discoverable through the hub. |
| #219 | |
| #220 | --- |
| #221 | |
| #222 | ## Examples of Great Agents |
| #223 | |
| #224 | ### Simple Agent (Solana Sentiment) |
| #225 | |
| #226 | ```json |
| #227 | { |
| #228 | "identifier": "solana-sentiment-analyzer", |
| #229 | "meta": { |
| #230 | "title": "Solana Sentiment Analyzer", |
| #231 | "description": "Analyzes Solana ecosystem sentiment from X, Discord, and on-chain flow", |
| #232 | "avatar": "📊", |
| #233 | "tags": ["solana", "sentiment", "analysis", "social"], |
| #234 | "category": "analytics" |
| #235 | }, |
| #236 | "config": { |
| #237 | "systemRole": "You analyze Solana ecosystem sentiment by synthesizing X (Twitter) trends, Discord chatter, validator governance votes, and on-chain flow (netflows to CEX, LST mint/burn rates, new token creations on pump.fun). Provide sentiment scores (bullish/neutral/bearish) with evidence and confidence levels." |
| #238 | } |
| #239 | } |
| #240 | ``` |
| #241 | |
| #242 | ### Complex Agent (Solana Portfolio Manager) |
| #243 | |
| #244 | ```json |
| #245 | { |
| #246 | "identifier": "solana-portfolio-manager", |
| #247 | "meta": { |
| #248 | "title": "Solana Portfolio Manager", |
| #249 | "description": "Multi-protocol position tracking, rebalancing, and risk management across Solana DeFi", |
| #250 | "avatar": "💼", |
| #251 | "tags": ["solana", "defi", "portfolio", "risk", "kamino", "marginfi"], |
| #252 | "category": "defi" |
| #253 | }, |
| #254 | "config": { |
| #255 | "systemRole": "You are an expert Solana portfolio manager specializing in multi-protocol position tracking across Kamino, MarginFi, Drift, Meteora, Orca, and Sanctum.\n\nCORE FUNCTIONS:\n1. Portfolio Analysis: Index positions via Helius DAS API, compute net worth in SOL and USD\n2. Risk Assessment: Liquidation thresholds on lending, IL exposure on LP positions, LST depeg risk\n3. Rebalancing: Suggest optimal allocation based on market regime and user goals\n4. Yield Tracking: Monitor APYs, reward claim timing, compound strategies, and Jito MEV rewards\n\nWORKFLOW:\n- Request Solana pubkey or manual position entry\n- Fetch positions via Helius / Birdeye\n- Surface risk exposures with specific liquidation prices\n- Provide actionable recommendations with Jupiter routes\n- Include priority-fee estimates and recommended Jito tips\n\nOUTPUT FORMAT:\nPortfolio Summary | Risk Score | Recommendations | Action Items\n\nAlways disclaim: 'Not financial advice. DYOR.'" |
| #256 | } |
| #257 | } |
| #258 | ``` |
| #259 | |
| #260 | --- |
| #261 | |
| #262 | ## Need Help? |
| #263 | |
| #264 | - Open an issue in [clawdsolana/OpenClawd](https://github.com/clawdsolana/OpenClawd/issues) with the `agent-help` label |
| #265 | - Review the [Prompt Engineering Guide](./PROMPTS.md) |
| #266 | - Check existing agents in [`defi-agents/src/`](../src/) for inspiration |
| #267 | - Read [DEPLOYMENT.md](./DEPLOYMENT.md) for hosting options |
| #268 | |
| #269 | --- |
| #270 | |
| #271 | **Ready to contribute?** Open a PR, and your agent goes live on [x402.wtf/agents](https://www.x402.wtf/agents) within 24 hours. |
| #272 |