AI trading agents on Solana are past the demo stage. You can give an agent a funded wallet, describe a strategy in plain English, and it will research tokens, size positions and place orders, with take-profit and stop-loss exits if you ask for them. The model is the easy part. Whether it makes sensible trades depends on the stack around it: the data it sees, the venue it trades through, and the limits that stop a bad decision from getting expensive.
This guide maps the essential tools for AI trading agents on Solana, layer by layer, with a recommendation at each one. The short version: Codex for the onchain data your agent reasons over, and Moby for execution with guardrails. The rest of the post covers why, how to connect both, and what to use if you build execution yourself.
The AI Trading Agent Stack, Layer by Layer
Every trading agent, from a weekend copy-trading bot to a fund's autonomous strategy, is some variation of this stack:
Agent host -- Claude Code, OpenAI Codex, Gemini CLI, Grok
Market data -- Codex API (API key or MPP), plus Skills and Docs MCP
Execution + wallet -- Moby MCP and agent wallet
Guardrails -- Moby limits, or your own wallet policies
Custom execution -- Jupiter, Helius, Jito (if you build it yourself)
Each layer answers a different question. The host decides what to do. The data layer tells it what is actually happening onchain. The execution layer turns a decision into a transaction. Guardrails decide how much a wrong decision can cost. The sections below take them in order.
Agent Hosts: Where Your Agent Runs
The host is the model plus the harness that lets it call tools. For trading, any host that speaks MCP (Model Context Protocol) works, because that is how both the data and the execution tools plug in.
- Claude Code: Anthropic's terminal agent installs Agent Skills and connects remote MCP servers with one command each, which makes it the quickest host to wire up.
- OpenAI Codex: OpenAI's coding agent (no relation to the Codex data API) supports the same skills and MCP servers from its CLI.
- Gemini CLI and Grok: Moby has setup guides for Gemini CLI (with a paid Gemini API key or enterprise access), the Grok CLI and Grok Bot. Moby recommends Grok Bot, and its ready-made Moby Agent asks for your agent key through a secure input.
- ChatGPT: connects on Business, Enterprise and Edu workspaces that allow custom MCP servers.
Recommendation: Claude Code or OpenAI Codex if you are comfortable in a terminal. Beyond those, any MCP client that can send an Authorization header can connect to the tools below.
Market Data: What Your Agent Sees
An agent can only trade as well as it can see. A language model has no idea what launched on Pump.fun ten minutes ago, who holds a token, or whether the wallet it wants to copy actually makes money. It needs a data layer that answers those questions in one call, in a shape a model can read.
The questions a Solana trading agent asks most:
- What is trending, and what just launched? token screening and launchpad streams.
- What is the price, and where has it been? real-time prices and OHLCV charts.
- Who holds it? holder lists and top-10 holder concentration.
- Which wallets trade it well? wallet PnL, win rate and the top traders for a token.
- What is happening right now? live trade and price streams.
Codex answers all of these from one GraphQL API: real-time, enriched data for over 100 million tokens and billions of wallets across 80+ networks, Solana included, with Pump.fun and other launchpads streamed from token creation through graduation. TradingView runs its onchain data on it. For agents, getting the data and knowing how to ask for it are separate pieces:
- API key or MPP: how the agent reaches live data. Use an API key from the Codex dashboard, or MPP, where the agent pays $0.001 per request in USDC on Tempo with no Codex account or key. MPP covers queries only: WebSocket subscriptions and webhooks need an API plan. More in our MPP announcement.
- Codex Skills: an operation map, auth patterns and query templates for the whole API, so the agent writes working queries without trial and error. Setup guide.
- Codex Docs MCP: lets the agent search the API reference while it works. It looks things up in the docs; it does not run queries. Setup guide.
Installing the skills takes one command:
npx skills add Codex-Data/skills -g --yes
Then ask in plain English. A request like "find Solana tokens with real liquidity that are trending today" becomes a query along these lines:
query {
filterTokens(
filters: {
network: [1399811149]
liquidity: { gt: 50000 }
holders: { gt: 500 }
}
rankings: [{ attribute: trendingScore24, direction: DESC }]
limit: 10
) {
results {
token { address name symbol }
priceUSD
liquidity
marketCap
holders
change24
}
}
}
Codex is also listed in Moby's Agent Marketplace as a data add-on, marked "Never trades": it reads token, wallet, holder and prediction-market data and writes nothing onchain. That split is deliberate. Keep research and execution in separate tools, so the one that reads data never holds funds.
The free plan has a monthly usage allowance after a one-time $1 activation fee, which covers screening, prices, charts and trades while you build. Holder lists, wallet analytics (PnL and top traders) and every WebSocket stream need a Growth or Enterprise plan; each endpoint's reference page lists its tier, and pricing has the current plans. Get a free API key to start.
Recommendation: Codex Skills plus an API key for most agents, on Growth once you need wallet analytics or streams. MPP for agents that run on their own wallet, only query, and should not depend on a human's account.
Execution: How Your Agent Trades
Execution is where a decision becomes a transaction, and where most of the risk lives. The naive version is handing an agent a private key and a swap API. That works until the agent misreads a ticker or loops on a buy, and nothing between the model and the chain stops it.
Moby, the smart money trading app and token screener from AssetDash, is built for this layer. Your agent connects to the Moby MCP server with an agent API key (not a wallet private key) and gets 80+ research and trading tools: swaps; limit, take-profit, stop-loss, trailing-stop, bracket and DCA orders; whale, KOL and smart-money data; and a rug check. It trades Solana tokens with USDC, including memecoins, majors and tokenized stocks such as TSLAx.
Trades come out of a dedicated agent wallet, funded in USDC and separate from your main Moby wallet. Whatever you deposit is the most the agent can trade, and it has no tool to withdraw, transfer or send funds.
Connecting takes one command. Create an agent key in the Moby app's Agent tab (it starts with moby_agent_), load it into MOBY_API_KEY, then in Claude Code:
claude mcp add --transport http moby https://mcp.moby.win/mcp \
--header "Authorization: Bearer $MOBY_API_KEY" --scope user
Moby's agentic trading guide has the same setup for OpenAI Codex, Gemini CLI and Grok, and shows how to load the key without it landing in your shell history.
Moby charges 0.75% per swap ($0.90 minimum), plus onchain fees, with no subscription. At the time of writing, agents trade on Solana only, with Base, BNB Chain and Robinhood Chain listed as coming soon.
Recommendation: Moby for execution unless you need custom routing or are building a product for other traders. You get order types, a sandboxed wallet and server-side limits without writing any of it.
Guardrails: Limits Before Autonomy
The most important layer is the one that decides what happens when the agent is wrong. Models misread data, chase momentum and occasionally invent a ticker. Guardrails belong outside the model, where a prompt cannot talk its way past them.
You set your agent's max per trade, daily buy volume and market-cap range in the Moby app, and Moby checks them server-side on every buy your agent makes. It also blocks any buy of a token Moby rates red, whatever the agent asks for.
On top of those, you control the connection itself:
- Ask before every trade: an optional switch on Moby's strategy cards that has the agent name the token, contract, amount and price, then wait for your yes before each trade. Check how approvals behave in your agent host before you rely on them.
- Pause: stop the agent trading at any time.
- Key revocation: revoke the agent key and that connection stops at once.
Two habits on top. Give the agent its exits up front: agent buys have no automatic exits unless you ask, and Moby places real take-profit and stop-loss orders, including a one-call bracket. A stop-loss limits a loss but cannot guarantee its fill price, especially on thin, volatile tokens. And use the data layer as a second check before a buy: holder concentration from top10HoldersPercent and the wallets behind a token from filterTokenWallets (Growth plan) take one call each.
Recommendation: start with "Ask before every trade" on, a max per trade you are comfortable losing and a market-cap floor, and fund the agent wallet with a small amount, keeping the $0.90 minimum fee in mind. Loosen the limits as the agent earns trust.
Building Your Own Execution Layer
Moby covers execution when an agent trades for you. If you are writing a bot in code, or building a product where many users run agents, you will assemble execution yourself. These are the pieces.
Solana Agent Kit from SendAI is an open-source toolkit for connecting AI agents to Solana protocols, with 60+ actions (Jupiter swaps and Jito bundles among them) and integrations for LangChain and the Vercel AI SDK. Its quick start signs with a raw keypair, so move to a managed wallet before real funds are involved.
Jupiter's Swap API is the standard way to route a swap on Solana: a REST API that finds the best route across Solana liquidity. Quotes work without an API key, and a free key raises the rate limit.
Helius is the Solana-specialized RPC provider. For trading, the parts that matter are Sender, which routes transactions to validators and Jito at once, staked connections by default, and LaserStream for streaming blocks, transactions and account data over gRPC. The free plan includes LaserStream WebSocket for standard Solana methods; LaserStream gRPC runs on devnet from the Developer plan and on mainnet from the Business plan.
Jito bundles group up to five transactions that execute sequentially and atomically: all of them land or none do. You pay for inclusion with a SOL tip to one of Jito's tip accounts. Useful when a buy and its follow-up have to land together or not at all.
Turnkey and Privy provide secure wallet infrastructure for agents. The private key stays in a secure enclave, and the agent holds an API or authorization key that can only request signatures. The guardrails come from signing policies you configure, such as per-transaction transfer limits or an allowlist of programs, enforced outside the agent. Both policy engines deny by default, but the protection is only as good as the policies you write. This is your guardrail layer when you are not using Moby's.
For data, the same Codex API works from code through the TypeScript SDK, with WebSocket subscriptions for live prices, trades and launchpad events. Our guide to building a crypto trading bot walks through the data side end to end.
Recommendation: Solana Agent Kit or your own tool layer, Jupiter for routing, Helius for RPC and sending, Jito when atomicity matters, and Turnkey or Privy policies as guardrails. Budget real time for that last layer: it is the part Moby gives you out of the box.
Putting It Together: Recommended Stacks
The tools above are building blocks. Here is how they assemble for three common Solana agent strategies.
Copy-Trading Agent
| Layer | Tool | Why |
|---|---|---|
| Host | Claude Code | Skills and MCP in one command each |
| Data | Codex | Find wallets worth copying: PnL, win rate, top traders per token (Growth plan) |
| Execution | Moby | Copy buys, plus take-profit and stop-loss orders when you ask for them |
| Guardrails | Moby limits | Max per trade and a daily cap, so one bad wallet can only spend what your limits allow |
Launchpad Scanner
| Layer | Tool | Why |
|---|---|---|
| Host | Claude Code or OpenAI Codex | Runs the scan-check-buy loop |
| Data | Codex | Pump.fun and launchpad streams, holder concentration, graduation progress |
| Execution | Moby | Won't buy red-rated tokens; brackets when you ask for them |
| Guardrails | Moby limits | Small max per trade and a market-cap range for early tokens |
Custom Trading Bot
| Layer | Tool | Why |
|---|---|---|
| Framework | Solana Agent Kit | Solana actions for LangChain or Vercel AI SDK agents |
| Data | Codex SDK | Stream prices, trades and launchpad events; query wallet PnL |
| Swaps | Jupiter Swap API | Best route across Solana liquidity |
| RPC and sending | Helius | Sender and staked connections for landing transactions |
| Bundles | Jito | Atomic multi-transaction landing |
| Keys and guardrails | Turnkey or Privy | Enclave-held keys; signing policies you configure |
These are starting points, not prescriptions. The order matters more than the picks: choose your data layer and your guardrails before you let an agent touch funds, not after its first bad trade.
Trading risk: AI trading agents can lose money through market moves, bad decisions, failed transactions or software bugs. Limits reduce how much a mistake can cost; they do not make trades profitable or prevent every loss. Start small, and review what your agent does before giving it more room.
Ready to build? Get a free Codex API key or install the Codex skills, then connect your agent to Moby's agentic trading for execution. Setup for every host is on moby.win/agents, and Codex sits alongside other add-ons in Moby's Agent Marketplace. Once connected, ask your agent to pull price, holders and top wallets from Codex, then check smart money on Moby before it trades.



