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 | # Model Parameters Guide for Solana Clawd Agents |
| #2 | |
| #3 | Tuning model parameters is how you control an agent's personality — deterministic vs creative, terse vs exploratory. This guide walks through every knob and recommends settings for the five most common Solana Clawd agent archetypes. |
| #4 | |
| #5 | The Solana Clawd hub currently routes agent calls through OpenRouter, which supports most major models. Anything set in `config.modelParameters` on your agent JSON gets passed through on every call. |
| #6 | |
| #7 | --- |
| #8 | |
| #9 | ## Core Parameters |
| #10 | |
| #11 | ### Temperature (0.0 – 2.0) |
| #12 | |
| #13 | Controls randomness. |
| #14 | |
| #15 | - **Low (0.0 – 0.3)** → deterministic. Same input → same output. Best for code, calculations, protocol lookups. |
| #16 | - **Medium (0.4 – 0.7)** — default. Balanced creativity and consistency. Best for analysis and general conversation. |
| #17 | - **High (0.8 – 2.0)** → creative, unpredictable. Best for brainstorming, name generation, narrative takes. |
| #18 | |
| #19 | **Example — explaining a Solana concept:** |
| #20 | |
| #21 | ```text |
| #22 | Temperature 0.0: |
| #23 | "Priority fees are lamports paid per compute unit to increase the likelihood of inclusion..." |
| #24 | [Same answer every time] |
| #25 | |
| #26 | Temperature 0.7: |
| #27 | "Priority fees work like a tip to validators..." |
| #28 | [Slight phrasing variation] |
| #29 | |
| #30 | Temperature 1.5: |
| #31 | "Picture Solana's mempool as a crowded bar — priority fees are how you get the bartender's attention..." |
| #32 | [Creative analogies, different every call] |
| #33 | ``` |
| #34 | |
| #35 | ### Top P (0.0 – 1.0) |
| #36 | |
| #37 | Alternative to temperature. Controls diversity by cumulative probability. |
| #38 | |
| #39 | - **0.1 – 0.5** → very focused, conservative |
| #40 | - **0.6 – 0.9** → balanced (default: 0.9) |
| #41 | - **0.95 – 1.0** → maximum diversity |
| #42 | |
| #43 | ⚠️ **Don't tune both temperature and top_p.** Pick one. |
| #44 | |
| #45 | ### Presence Penalty (-2.0 to 2.0) |
| #46 | |
| #47 | Penalizes words that already appeared (any frequency). Reduces topic repetition. |
| #48 | |
| #49 | - Negative → encourages repetition (good for reinforcing key terms) |
| #50 | - Zero → natural, default |
| #51 | - Positive → forces vocabulary diversity (good for creative writing) |
| #52 | |
| #53 | ### Frequency Penalty (-2.0 to 2.0) |
| #54 | |
| #55 | Penalizes words based on **how many times** they've appeared. Stronger anti-repetition than presence penalty. |
| #56 | |
| #57 | **Difference:** |
| #58 | |
| #59 | - **Presence** = did the word appear? (yes/no) |
| #60 | - **Frequency** = how often? (count) |
| #61 | |
| #62 | ### Max Tokens |
| #63 | |
| #64 | Response length cap. Scale to the agent's job: |
| #65 | |
| #66 | - Quick answers / tooltips: 500–1000 |
| #67 | - Analysis / recommendations: 1000–2000 |
| #68 | - Full reports: 2000–4000 |
| #69 | |
| #70 | ### Reasoning Effort (Claude Sonnet 4.5 / Opus 4.6) |
| #71 | |
| #72 | - **low** — fastest, basic chain-of-thought |
| #73 | - **medium** — default, good for most Solana agents |
| #74 | - **high** — deep analysis, slower, more tokens — use for audit/risk agents |
| #75 | |
| #76 | --- |
| #77 | |
| #78 | ## Recommended Settings by Solana Agent Archetype |
| #79 | |
| #80 | ### 1. DeFi Analyst (Kamino picker, yield scanner) |
| #81 | |
| #82 | ```json |
| #83 | { |
| #84 | "model": "anthropic/claude-sonnet-4-5", |
| #85 | "temperature": 0.3, |
| #86 | "top_p": 0.8, |
| #87 | "presence_penalty": 0.2, |
| #88 | "frequency_penalty": 0.3, |
| #89 | "reasoning_effort": "medium", |
| #90 | "max_tokens": 2000 |
| #91 | } |
| #92 | ``` |
| #93 | |
| #94 | Consistent, factual, number-driven. |
| #95 | |
| #96 | ### 2. Memecoin / Pump.fun Screener |
| #97 | |
| #98 | ```json |
| #99 | { |
| #100 | "model": "anthropic/claude-sonnet-4-5", |
| #101 | "temperature": 0.2, |
| #102 | "top_p": 0.8, |
| #103 | "presence_penalty": 0.0, |
| #104 | "frequency_penalty": 0.1, |
| #105 | "reasoning_effort": "medium", |
| #106 | "max_tokens": 1500 |
| #107 | } |
| #108 | ``` |
| #109 | |
| #110 | Low temperature so scoring is reproducible — two users pasting the same token should see the same verdict. |
| #111 | |
| #112 | ### 3. Anchor / Program Auditor |
| #113 | |
| #114 | ```json |
| #115 | { |
| #116 | "model": "anthropic/claude-opus-4-6", |
| #117 | "temperature": 0.1, |
| #118 | "top_p": 0.9, |
| #119 | "presence_penalty": 0.0, |
| #120 | "frequency_penalty": 0.0, |
| #121 | "reasoning_effort": "high", |
| #122 | "max_tokens": 4000 |
| #123 | } |
| #124 | ``` |
| #125 | |
| #126 | Deterministic, deep reasoning, long context — finds edge cases. |
| #127 | |
| #128 | ### 4. Trading Strategy / Alpha Hunter |
| #129 | |
| #130 | ```json |
| #131 | { |
| #132 | "model": "anthropic/claude-sonnet-4-5", |
| #133 | "temperature": 0.4, |
| #134 | "top_p": 0.85, |
| #135 | "presence_penalty": 0.1, |
| #136 | "frequency_penalty": 0.2, |
| #137 | "reasoning_effort": "medium", |
| #138 | "max_tokens": 2000 |
| #139 | } |
| #140 | ``` |
| #141 | |
| #142 | Slightly higher creativity to surface non-obvious correlations, still grounded. |
| #143 | |
| #144 | ### 5. Memecoin Name / Narrative Generator |
| #145 | |
| #146 | ```json |
| #147 | { |
| #148 | "model": "anthropic/claude-sonnet-4-5", |
| #149 | "temperature": 0.9, |
| #150 | "top_p": 0.95, |
| #151 | "presence_penalty": 0.5, |
| #152 | "frequency_penalty": 0.6, |
| #153 | "reasoning_effort": "low", |
| #154 | "max_tokens": 800 |
| #155 | } |
| #156 | ``` |
| #157 | |
| #158 | Max creativity, strong anti-repetition so each suggestion is distinct. |
| #159 | |
| #160 | ### 6. Solana Onboarding / Educator |
| #161 | |
| #162 | ```json |
| #163 | { |
| #164 | "model": "anthropic/claude-sonnet-4-5", |
| #165 | "temperature": 0.5, |
| #166 | "top_p": 0.9, |
| #167 | "presence_penalty": 0.3, |
| #168 | "frequency_penalty": 0.3, |
| #169 | "reasoning_effort": "low", |
| #170 | "max_tokens": 1500 |
| #171 | } |
| #172 | ``` |
| #173 | |
| #174 | Warm, varied phrasing without sacrificing accuracy. |
| #175 | |
| #176 | --- |
| #177 | |
| #178 | ## Model Recommendations |
| #179 | |
| #180 | | Use case | Recommended model | |
| #181 | | -------------------------------------------- | ---------------------------------------- | |
| #182 | | Anchor audits, complex reasoning, long docs | `anthropic/claude-opus-4-6` | |
| #183 | | Everyday Solana DeFi analysis | `anthropic/claude-sonnet-4-5` | |
| #184 | | Fast memecoin screeners, low-latency chats | `anthropic/claude-haiku-4-5-20251001` | |
| #185 | | Open-source / cost-sensitive | `meta-llama/llama-3.3-70b-instruct` | |
| #186 | | xAI-native agents (built on OpenClawd runtime)| `x-ai/grok-4-fast` | |
| #187 | | Solana-aware reasoning + 256K context | `xai/grok-4.20-beta` | |
| #188 | | Agentic tool-use + long-context workflows | `moonshot/kimi-k2.6` | |
| #189 | |
| #190 | You can also set `"fallback_models"` to let OpenRouter retry on provider outages — handy for mainnet congestion spikes. |
| #191 | |
| #192 | --- |
| #193 | |
| #194 | ## Tuning Tips |
| #195 | |
| #196 | ### Start Conservative |
| #197 | |
| #198 | Begin with defaults, then increase only when outputs are too rigid: |
| #199 | |
| #200 | 1. Test with `temperature: 0.3` |
| #201 | 2. If too rigid, bump to `0.5` |
| #202 | 3. Keep going in `0.1` steps until it feels right |
| #203 | |
| #204 | ### Single Variable |
| #205 | |
| #206 | Change **one parameter at a time**. Otherwise you can't tell which change caused the improvement. |
| #207 | |
| #208 | ### Context Matters |
| #209 | |
| #210 | - Short prompts → lower temperature (prompt can't anchor output, model needs focus) |
| #211 | - Long, detailed prompts → you can push temperature higher |
| #212 | - Ambiguous queries → lower temperature, ask clarifying questions |
| #213 | - Creative tasks → temperature 0.8+ |
| #214 | |
| #215 | ### Monitor Quality |
| #216 | |
| #217 | After shipping, track across the `/agents-registry`: |
| #218 | |
| #219 | - Consistency (same input → similar output?) |
| #220 | - Accuracy (does it get Solana program IDs and APY math right?) |
| #221 | - Creativity (does the output feel fresh or canned?) |
| #222 | - Token usage (is max_tokens cutting off answers?) |
| #223 | |
| #224 | --- |
| #225 | |
| #226 | ## Parameter Interactions |
| #227 | |
| #228 | - **Temperature + Top P**: don't tune both — use temperature for intuition, top_p for fine-grained control |
| #229 | - **Presence + Frequency**: can combine (typical combo: `presence: 0.3`, `frequency: 0.5`) |
| #230 | - **Reasoning Effort + Temperature**: independent — you can pair `reasoning: high, temperature: 0.2` for deep *and* consistent analysis (best for auditors) |
| #231 | |
| #232 | --- |
| #233 | |
| #234 | ## Context Window by Model |
| #235 | |
| #236 | | Model | Context window | |
| #237 | | ------------------------------ | -------------- | |
| #238 | | Claude Opus 4.6 (1M context) | 1,000,000 | |
| #239 | | Claude Sonnet 4.5 | 200,000 | |
| #240 | | Claude Haiku 4.5 | 200,000 | |
| #241 | | Grok-4-fast | 256,000 | |
| #242 | | Llama 3.3 70B | 128,000 | |
| #243 | |
| #244 | For Anchor audits or long on-chain transcripts, prefer Opus. For quick swap quote explanations, Haiku is faster and cheaper. |
| #245 | |
| #246 | --- |
| #247 | |
| #248 | ## Troubleshooting |
| #249 | |
| #250 | | Problem | Try | |
| #251 | | -------------------------------- | --------------------------------------------------------- | |
| #252 | | Too random / inconsistent | Lower temperature (0.3), lower top_p (0.8) | |
| #253 | | Too repetitive | Raise `presence_penalty` (0.5–1.0), `frequency_penalty` | |
| #254 | | Too boring / generic | Raise temperature (0.7–1.0), raise top_p (0.95) | |
| #255 | | Off-topic responses | Lower temperature; sharpen the system prompt | |
| #256 | | Answers cut off | Raise `max_tokens` | |
| #257 | | Too verbose | Raise `frequency_penalty`; add "be concise" to prompt | |
| #258 | | Wrong program IDs / hallucinated | Switch to Opus; lower temperature; add prompt evidence | |
| #259 | |
| #260 | --- |
| #261 | |
| #262 | ## Testing Methodology |
| #263 | |
| #264 | 1. **Baseline** — test with defaults |
| #265 | 2. **Hypothesis** — "Lower temperature will make price-impact answers more consistent" |
| #266 | 3. **Test** — run same Jupiter quote prompt 5× at `temperature: 0.2` |
| #267 | 4. **Measure** — rate consistency, accuracy, token usage |
| #268 | 5. **Compare vs baseline** |
| #269 | 6. **Iterate** — change one parameter, repeat |
| #270 | |
| #271 | Keep a lightweight eval suite in `defi-agents/tests/` with real Solana prompts so regressions are visible. |
| #272 | |
| #273 | --- |
| #274 | |
| #275 | ## Resources |
| #276 | |
| #277 | - [OpenRouter model catalog](https://openrouter.ai/models) |
| #278 | - [Anthropic parameter docs](https://docs.anthropic.com/claude/docs/models-overview) |
| #279 | - [OpenRouter parameter playground](./openrouter.md) (local doc) |
| #280 | |
| #281 | --- |
| #282 | |
| #283 | **Default heuristic for Solana Clawd agents**: start at `temperature: 0.3`, `reasoning_effort: medium`, Claude Sonnet 4.5. Tune from there based on whether outputs are too rigid or too loose. |
| #284 |