openclaw-solana-plugins: The Plugin That Gives an AI Agent Hands on Solana
A tiny TypeScript extension turns OpenClaw into a constrained trading agent with local key custody, Jupiter-powered swaps, and a built-in momentum score that encodes a very specific kind of crypto judgment.

OpenClaw Solana Wallet Plugin - Add Solana wallet capabilities to any OpenClaw agent
- The plugin matters because it turns OpenClaw from a conversational interface into a constrained actor that can observe markets, rank opportunities, and trade.
- Its most distinctive idea is not swap execution, but the opinionated scoring layer that codifies a degen-style view of momentum into code.
- Local signing and hardcoded risk rails keep the agent powerful without letting the private key or the exit logic drift into the cloud.
- The repo points to a broader pattern in agent tooling: narrow, stateful adapters are more practical than raw, general-purpose autonomy.
The wallet is not the point. The constraints are. This plugin gives OpenClaw the ability to see market data, score candidates, and execute swaps, but only through a narrow path that keeps the private key local and the trading logic opinionated.
What the plugin actually adds to OpenClaw
The codebase is small, but the split is revealing. index.ts wires the plugin into the host agent, src/tools.ts exposes JSON-schema tools, src/wallet.ts handles local key management, and src/swap.ts wraps Jupiter. Then the skills/solana-trader scripts add a second layer: a trading loop that behaves more like a system than a library.
export const solanaTools = {
solana_scan: {
description: 'Scan Solana tokens for opportunity',
schema: ScanTokenSchema,
run: scanToken,
},
solana_swap: {
description: 'Execute a local swap',
schema: SwapSchema,
run: executeSwap,
},
};
- The TypeScript core keeps the plugin type-safe and explicit.
- The JavaScript skill scripts make the trading loop easy to tweak.
- Tool schemas narrow what the agent can ask for before any money moves.
- The workspace state files let the system remember positions across runs.
The interesting trick: it scores momentum before it trades
The center of the repo is calculateOpportunityScore. It looks like a helper, but it is really a strategy encoded as weights. Low FDV gets a bonus. Strong volume relative to liquidity gets rewarded. Buy pressure helps. Overextension gets punished. That is not neutral infrastructure. It is a point of view about what a good trade looks like.
function calculateOpportunityScore(token) {
let score = 0;
if (token.fdv < 500000) score += 30;
if (token.volumeToLiquidity > 5) score += 15;
if (token.buyPressure > token.sellPressure) score += 20;
if (token.priceChange5m > 30) score -= 25;
return score;
}
That logic matters because it changes the agent’s behavior before a trade ever gets near execution. The plugin is not just giving OpenClaw hands. It is teaching those hands what to prefer.
How a Jupiter swap stays local
The swap path is careful. The plugin asks Jupiter for a quote, gets back a base64 transaction, deserializes it into a VersionedTransaction, signs it locally, and sends it out. The key never leaves the machine. That is the difference between a convenience API and a custody boundary.
const quote = await getQuote(inputMint, outputMint, amount);
const txB64 = await getSwapTransaction(quote);
const tx = VersionedTransaction.deserialize(Buffer.from(txB64, 'base64'));
tx.sign([wallet.payer]);
await sendTransaction(tx);
| Model | What it can do | Main trade-off |
|---|---|---|
| Manual wallet use | Full human control over every move | Slow, brittle, and not autonomous |
| Generic agent with no scoring | Can call tools and act on prompts | Acts, but does not know what deserves action |
| This plugin | Local keys, ranked opportunities, and constrained swaps | Narrower by design, but much safer and more legible |
Why the monitor script matters more than the tools
The monitor loop is where the repo becomes a system. skills/solana-trader/scripts/monitor.js tracks positions in ~/.openclaw/workspace, watches open trades, and applies take-profit, stop-loss, and trailing-stop rules. The tools let an agent trade. The monitor makes it persistent.
const TAKE_PROFIT_PCT = 25;
const STOP_LOSS_PCT = 10;
const TRAILING_STOP_PCT = 8;
if (profitPct >= TAKE_PROFIT_PCT) {
closePosition();
} else if (lossPct <= -STOP_LOSS_PCT) {
closePosition();
} else if (trailPct <= -TRAILING_STOP_PCT) {
closePosition();
}
That is the real safety story. The agent does not need perfect judgment. It needs bounded judgment, plus a loop that keeps the downside from expanding forever.
| Behavior | Ad hoc tooling | Monitor-driven system |
|---|---|---|
| State | Ephemeral | Persistent in workspace files |
| Risk handling | Depends on prompt quality | Hardcoded exit rules |
| Attention | Only when called | Continuous and stateful |
| Failure mode | Forgets positions | Actively manages them |
This is a niche because the market is still a niche
Most agent frameworks stop at chat, tasking, or generic tool use. Most Solana trading tools stop at wallets, swaps, and dashboards. This repo sits in the overlap, which is exactly why it feels unusual. It is an adapter for on-chain financial agency inside an AI agent stack, not a standalone bot trying to do everything.
That niche matters because the broader ecosystem is moving toward specialization. The likely future is not one omnipotent agent. It is a network of narrow adapters that each know a domain, a risk model, and a state boundary.
What this repo suggests about the next wave of agent tooling
The strongest design idea here is not Solana support. It is the shape of the support. The plugin wraps an agent in opinionated primitives, keeps the keys local, and makes strategy visible in code. That is a useful template for any domain where action is valuable, but unbounded autonomy is not.
In other words, this repo shows how agents become practical: not by getting freer, but by getting narrower in all the right places.





