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.

8 min read • View on GitHub • More from solana-clawd

An AI agent reaches toward three tool slots labeled by shape rather than text, while a sealed wallet sits behind a locked glass wall. A narrow channel carries a signed transaction packet toward a Solana-like ledger, showing that the agent can act only through constrained steps. The image explains the repo’s central idea: autonomy is useful only when it is boxed in by local custody and explicit rails.
The plugin does not hand an agent a wallet and call it a day. It gives the agent a narrow path from observation to action, with the private key kept local.

OpenClaw Solana Wallet Plugin - Add Solana wallet capabilities to any OpenClaw agent

solana-clawd, Maintainer/Author · solana-clawd on GitHub
Key Takeaways

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.

A hedcut-style portrait of the repository maintainer, rendered from the public GitHub avatar. It gives a human face to the plugin’s maintainer and signals that the project comes from a single clearly identifiable author.

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.

The plugin is really two systems in one. The tool layer gives the agent a vocabulary for Solana. The monitor loop turns that vocabulary into a persistent trading behavior.

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 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.

A close-up scoring ledger shows three token candidates arranged like runners at a starting line. One candidate is stamped with a high score, one is crossed out for overheating, and one sits in the middle with balanced metrics. The image explains how the repo turns noisy market signals into a simple decision score before any trade happens.
The plugin’s most distinctive move is not execution. It is translating messy market inputs into a single ranked signal before the agent can act.
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);
ModelWhat it can doMain trade-off
Manual wallet useFull human control over every moveSlow, brittle, and not autonomous
Generic agent with no scoringCan call tools and act on promptsActs, but does not know what deserves action
This pluginLocal keys, ranked opportunities, and constrained swapsNarrower 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.

BehaviorAd hoc toolingMonitor-driven system
StateEphemeralPersistent in workspace files
Risk handlingDepends on prompt qualityHardcoded exit rules
AttentionOnly when calledContinuous and stateful
Failure modeForgets positionsActively 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.