Get the App

Home · Learn · Build a Solana Trading Agent

Build a Solana Trading Agent: ElizaOS vs Solana Agent Kit vs MCP

ElizaOS is a TypeScript framework for full autonomous agents with plugins, including Solana wallet actions. Solana Agent Kit is a toolkit that gives any agent dozens of Solana actions through LangChain or Vercel AI. MCP lets an AI host you already use call a trading server, with no code.

Updated November 2, 2026 · By Moby

ElizaOS, Solana Agent Kit, and MCP show up in the same searches and do different jobs. ElizaOS is a TypeScript framework you run. Solana Agent Kit, from SendAI, is a library you add to an agent you already write. MCP plus a hosted agent wallet lets a host you already use call a server that holds the wallet. Solana AI agents is the wider map. How to build an AI trading bot covers code, a no-code bot, and an agent before you pick a Solana stack. Both are on the Learn hub.

ElizaOS documents Solana actions and an EVM plugin, so the framework is not Solana-only. The kit is a Solana toolkit. Its DeFi plugin covers staking, lending, and swaps. Moby Agents are the hosted example, and they trade Solana only.

Three ways to build a Solana trading agent

On the first two routes you put a signer in software you run, and any spending cap is yours to add. On the hosted route the wallet stays on the server. That pattern is agentic trading: research, then a trade inside limits you set. A small allowed size can still go to zero.

ElizaOS

The elizaOS repository calls ElizaOS an open-source TypeScript framework and product stack for autonomous AI agents. The monorepo holds the core runtime, the Eliza app, a CLI, cloud services, native bridges, and first-party plugins. The README says the framework is model-agnostic and extended through plugins. A plugin can register actions, providers, evaluators, services, model handlers, routes, events, tests, and app views. The plugin registry overview lists Discord, Telegram, and X clients, model providers, an EVM plugin, and a Solana plugin. The repository license is MIT.

Merged pull request 1679 in that repository describes the rename from ai16z/eliza to elizaOS/eliza. The plugin migration guide shows older imports from @ai16z/eliza and current imports from @elizaos/core. ElizaOS docs also describe a token that moved off the ai16z name. This page does not cover price or where to buy it.

The Solana plugin docs say the plugin can transfer SOL and SPL tokens, swap through Jupiter, and track a portfolio. Import solanaPlugin from @elizaos/plugin-solana and pass it to AgentRuntime from @elizaos/core. Writes read SOLANA_PRIVATE_KEY. Read-only mode can use SOLANA_PUBLIC_KEY. Keep the secret out of git, prompts, and logs. Those docs also say to validate inputs and to set slippage on swaps. The README also lists non-custodial EVM and Solana wallet operations with approval boundaries in the Eliza app, separate from that environment-variable key.

import { solanaPlugin } from "@elizaos/plugin-solana";
import { AgentRuntime } from "@elizaos/core";

const runtime = new AgentRuntime({
  plugins: [solanaPlugin],
});

The docs homepage shows a CLI start. The Solana page adds elizaos plugins add solana. You still write when a swap is allowed. ElizaOS does not ship a hosted size check, so build that cap and test a refusal.

bun i -g @elizaos/cli
elizaos create
elizaos start

To run the repo, match the Bun and Node versions pinned in package.json, then:

git clone --filter=blob:none https://github.com/elizaos/eliza.git
cd eliza
bun install
bun run dev

Solana Agent Kit (SendAI)

Solana Agent Kit is SendAI's open-source toolkit for connecting AI agents to Solana protocols. The README says any agent, using any model, can perform 60+ Solana actions, and it names LangChain tools and a Vercel AI SDK integration. That README also shows a constructor that takes a private key string. Do not copy it.

The v2 introduction describes a modular rewrite with embedded wallets. It says the v1 private-key input was not fully secure, and that one large tool list made wrong calls more likely. Plugins let you load one job at a time. The page says private keys never need to be directly input. The five plugins are @solana-agent-kit/plugin-token (transfers, swaps, balances), @solana-agent-kit/plugin-nft, @solana-agent-kit/plugin-defi (staking, lending, and swaps), @solana-agent-kit/plugin-misc, and @solana-agent-kit/plugin-blinks.

The DeFi plugin intro is the staking, lending, and swap surface. Load it only when those actions are the task. Embedded wallets named in the introduction are Privy and Turnkey: Privy can wait for a person to confirm, and Turnkey can hold fine-grained rules. The v2 quickstart still shows a keypair from a secret, and also a wallet object whose signTransaction comes from an embedded wallet. Prefer the adapter. It shows createVercelAITools and names createLangchainTools for LangChain.

npm install solana-agent-kit @solana-agent-kit/plugin-token
import { SolanaAgentKit, createVercelAITools } from "solana-agent-kit";
import TokenPlugin from "@solana-agent-kit/plugin-token";

const agent = new SolanaAgentKit(wallet, "YOUR_RPC_URL", {})
  .use(TokenPlugin);

const tools = createVercelAITools(agent, agent.actions);

wallet is a signer object, not a secret in the file. SendAI's @solana-agent-kit/adapter-mcp can expose actions as an MCP server, and that sample still loads a private key from the environment, so it is not a hosted wallet. You still write the app around LangChain or the Vercel AI SDK. A cap in the prompt is not a cap: enforce size before signTransaction, or use the Turnkey rules the v2 docs describe.

MCP plus a hosted agent wallet

MCP lets an AI app call tools on a server. The host sends a name and arguments. The server returns a result. You do not import a Solana package, and the host does not hold the wallet key. MCP for trading explains the pattern. If the model is talked into a bad call, a server that checks limits can still reject it. That is the difference from a process that both reads the prompt and holds SOLANA_PRIVATE_KEY.

Moby as the example

Set up a Moby Agent with its own wallet and your spending guardrails, then connect it to the AI you use. Each user gets one agent, with its own wallet separate from your main in-app wallet. The agent cannot withdraw or send funds. You set your agent's limits on max per trade, daily buy volume and market-cap range from the Moby app, and Moby checks them server-side on every buy your agent makes. The key from the app is an agent API key, not a wallet private key.

Moby Agents trade Solana tokens, paid in USDC, including tokenized stocks. Agent trading on Base, BNB Chain, and Robinhood Chain is coming soon. Connect it from Codex, Claude Code (CLI) or Grok. Steps for each: Codex setup, Claude Code setup, and Grok setup. Claude Duet is Anthropic's personal agent and a research preview. It uses the Moby connector you add in Claude. Moby has not tested trades on Duet yet, and Anthropic's own rules may refuse trade actions. The agent wallet page is the separate wallet. Marketplace skills are optional add-ons on the same connection. They do not add another wallet.

  1. Open the Agent tab in the Moby app. One agent, with its own wallet, separate from the main in-app wallet.
  2. Set max per trade, daily buy volume, and market-cap range. Moby checks them server-side on every buy.
  3. Create a key and add the server to Codex, Claude Code (CLI), or Grok. The key is an agent API key, not a wallet private key.
  4. Fund the agent wallet with USDC.
  5. Ask the host to research a mint and propose a swap inside the limits you set.

Comparison table

Setup below is qualitative. There is no minute count.

ElizaOS Solana Agent Kit MCP + hosted wallet
Language TypeScript framework TypeScript toolkit (npm) No application code on the Moby path
Setup CLI or a repo checkout, then plugins and a wallet environment variable Install the kit and the plugins you need in an app you write Connect a host to a server that already holds the wallet
Key handling Plugin docs use SOLANA_PRIVATE_KEY for writes, or a public key for read-only. The app README also describes approval boundaries. v2 documents Privy and Turnkey. A keypair constructor is still in the quickstart. The server holds the wallet. You use an agent API key. The agent cannot withdraw or send funds.
Guardrails You write the checks. Plugin docs say to validate inputs and not to log keys. Turnkey rules and an optional Privy confirmation. You choose which plugins load. You set your agent's limits on max per trade, daily buy volume and market-cap range from the Moby app, and Moby checks them server-side on every buy your agent makes.
Chains Solana plugin and an EVM plugin. Not Solana-only. Solana actions. The DeFi plugin covers staking, lending, and swaps. Solana only, paid in USDC, including tokenized stocks. Base, BNB Chain, and Robinhood Chain are coming soon for agents.
Best for A full agent you run, with plugins and chat clients Solana tools in LangChain or the Vercel AI SDK Codex, Claude Code (CLI), or Grok, without writing the agent

"Best for" means fit, not a rank. A size check can still allow a buy that later goes to zero.

Security checklist for any route

A model will sometimes follow a bad instruction. The question is how much that instruction can sign. AI agent guardrails and risk management for AI trading go further on size and stops.

Which route should you pick?

Start with one signer. Two funded keys are easy to mix up. If you have not chosen code versus no code, read how to build an AI trading bot first.

Frequently asked questions

What is ElizaOS?

ElizaOS is an open-source TypeScript framework for building autonomous AI agents. It is model-agnostic and extended with plugins, including wallet plugins that can act on Solana.

Is ElizaOS the same as ai16z?

ElizaOS grew out of the ai16z community project and its Eliza framework. ai16z is also the name of a token; this page covers the software, not the token.

What is Solana Agent Kit?

Solana Agent Kit by SendAI is an open-source toolkit that lets an AI agent perform Solana actions such as token swaps, through integrations like LangChain and the Vercel AI SDK.

Do I need to code to build a Solana trading agent?

No. With MCP you can connect an AI host such as Codex, Claude Code or Grok to a trading server that holds the agent wallet, with no code. Frameworks give more control but need development work.

Which is safest for handling keys?

Avoid putting a raw private key where the agent can read it. Embedded or hosted wallets with server-side limits reduce the damage if the agent is tricked.

Try it with a Moby Agent

Set up a Moby Agent with its own wallet and your spending guardrails, then connect it to the AI you use.

You set your agent's limits on max per trade, daily buy volume and market-cap range from the Moby app, and Moby checks them server-side on every buy your agent makes.

Moby Agents trade Solana tokens, paid in USDC, including tokenized stocks.

Each user gets one agent, with its own wallet separate from your main in-app wallet. The agent cannot withdraw or send funds.

Connect it from Codex, Claude Code (CLI) or Grok.

A 0.75% swap fee (minimum $0.90 per swap), plus onchain fees.

10% of the Moby fee back in $MOBY on every swap, 20% after your first swap, up to 30% as you climb tiers.

Trading crypto and tokenized stocks is risky and you can lose money. Nothing on this page is investment advice.

Published November 2, 2026 by Moby. Framework details follow the ElizaOS and SendAI docs and repositories linked above. Snippets omit keys on purpose.