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 sources16d ago| #1 | --- |
| #2 | description: Orchestrate multi-bot trading swarms on Pump.fun with persona-driven agents |
| #3 | --- |
| #4 | |
| #5 | # Swarm Orchestrator |
| #6 | |
| #7 | Manage multi-bot trading swarms with agent personas, epistemological memory, and cross-bot event routing. |
| #8 | |
| #9 | ## Prerequisites |
| #10 | |
| #11 | - SolanaOS core installed |
| #12 | - `TELEGRAM_BOT_TOKEN` for Telegram gateway (optional) |
| #13 | - `HELIUS_RPC_URL` configured |
| #14 | |
| #15 | ## Quick Start |
| #16 | |
| #17 | ```bash |
| #18 | # Start the swarm orchestrator |
| #19 | npm run swarm |
| #20 | |
| #21 | # Start SolanaOS agent orchestrator |
| #22 | npm run claw |
| #23 | npm run claw:dev # with hot reload |
| #24 | ``` |
| #25 | |
| #26 | ## Agent Roles |
| #27 | |
| #28 | | Role | Description | Auto-Actions | |
| #29 | |------|-------------|-------------| |
| #30 | | `sniper` | Snipe new token launches | Monitor → Buy on launch | |
| #31 | | `monitor` | On-chain event watcher | Observe → Alert | |
| #32 | | `fee-claimer` | Claim creator fees | Check → Claim automatically | |
| #33 | | `analyst` | Price/curve analysis | Observe → Report | |
| #34 | | `momentum` | Momentum-based trading | RSI+EMA → Execute | |
| #35 | | `graduation` | Target near-graduation tokens | Monitor progress → Buy | |
| #36 | | `market-maker` | Provide liquidity | Buy/sell oscillation | |
| #37 | | `launcher` | Create new tokens | Build → Launch | |
| #38 | | `channel-feed` | Telegram channel updates | Events → Post | |
| #39 | | `outsider` | Call tracking + leaderboards | Track → Score | |
| #40 | |
| #41 | ## Persona Assignment |
| #42 | |
| #43 | Every agent can be born with one of 43+ DeFi personas: |
| #44 | |
| #45 | ```bash |
| #46 | # Via Telegram |
| #47 | /spawn analyst --persona whale-watcher |
| #48 | /spawn sniper --persona alpha-leak-detector |
| #49 | /personas # Browse all personas |
| #50 | /personas trading # Filter by category |
| #51 | ``` |
| #52 | |
| #53 | ### Persona Categories |
| #54 | |
| #55 | | Category | Count | Examples | |
| #56 | |----------|-------|---------| |
| #57 | | 🪙 Crypto | 6 | Whale Watcher, Alpha Detector | |
| #58 | | 🏦 DeFi | 14 | Yield Farmer, Flash Loan Analyst | |
| #59 | | 📈 Trading | 5 | Pump SDK Expert, MEV Researcher | |
| #60 | | 🔒 Security | 6 | Smart Contract Auditor | |
| #61 | | 📚 Education | 2 | DeFi Mentor | |
| #62 | |
| #63 | ## Event Bus |
| #64 | |
| #65 | All bots communicate through a pub/sub event bus: |
| #66 | |
| #67 | | Event | Source | Description | |
| #68 | |-------|--------|-------------| |
| #69 | | `token:launch` | websocket-server | New token detected | |
| #70 | | `token:graduation` | monitor | Token completed bonding curve | |
| #71 | | `trade:buy` / `trade:sell` | swarm-bot | Trade executed | |
| #72 | | `alert:whale` | monitor | Large transaction detected | |
| #73 | | `fee:claim` | fee-claimer | Fee claimed successfully | |
| #74 | | `call:new` | outsiders-bot | New call registered | |
| #75 | |
| #76 | ## Memory System |
| #77 | |
| #78 | Each agent gets its own ClawVault with 3-tier epistemological memory: |
| #79 | |
| #80 | - **KNOWN** (60s TTL) — live market data |
| #81 | - **LEARNED** (7d TTL) — validated patterns |
| #82 | - **INFERRED** (3d TTL) — hypotheses |
| #83 | |
| #84 | ```bash |
| #85 | /memory <agent-id> # View agent's memory |
| #86 | /agents # List agents with memory stats |
| #87 | /health # Collective memory overview |
| #88 | ``` |
| #89 | |
| #90 | ## Telegram Commands |
| #91 | |
| #92 | | Command | Description | |
| #93 | |---------|-------------| |
| #94 | | `/spawn <role> [--persona <id>]` | Spawn agent | |
| #95 | | `/stop <id>` | Stop an agent | |
| #96 | | `/agents` | List active agents | |
| #97 | | `/personas [query]` | Browse personas | |
| #98 | | `/memory <id>` | View agent memory | |
| #99 | | `/health` | Swarm health dashboard | |
| #100 | | `/price <mint>` | Token price | |
| #101 | | `/quote <mint> <sol>` | Buy/sell quote | |
| #102 | | `/curve <mint>` | Bonding curve state | |
| #103 | | `/events` | Recent event stream | |
| #104 | |
| #105 | ## Bot Manager |
| #106 | |
| #107 | The bot manager handles lifecycle for sub-bots: |
| #108 | |
| #109 | ```typescript |
| #110 | import { BotManager, EventBus } from "nanosolana"; |
| #111 | |
| #112 | const eventBus = new EventBus(5000); |
| #113 | const manager = new BotManager(eventBus); |
| #114 | |
| #115 | await manager.start("telegram-bot"); |
| #116 | await manager.start("swarm-bot"); |
| #117 | |
| #118 | manager.startHealthChecks(); |
| #119 | |
| #120 | // Route events |
| #121 | eventBus.on("alert:whale", (event) => { |
| #122 | console.log("Whale detected:", event.data); |
| #123 | }); |
| #124 | ``` |
| #125 |