solana-agent-kit
CLAUDE.md1.7k starsChanged 23 months agoApache-2.0View on GitHub
This is a monorepo using pnpm workspaces and Turborepo for building AI agents that interact with Solana protocols. Plugin System: V2 uses a composable plugin architecture. Plugins register methods (direct function calls) and actions (AI agent tools with schemas). Agent Initialization: Wallet Interface: Uses BaseWallet interface - can be KeypairWallet for server-side or wallet adapter for browser. Each plugin follows this structure: Actions vs Tools: Actions wrap tools with Zod schemas, descriptions, and examples for AI agent consumption. Tools contain…
- Reads credentials
- Installs packages
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Build & Development Commands
# Install dependencies (requires pnpm 9+, Node 22+)
pnpm install
# Build all packages
pnpm run build
# Build specific packages
pnpm run build:core # Core package only
pnpm run build:plugin-token # Token plugin
pnpm run build:plugin-defi # DeFi plugin
pnpm run build:plugin-nft # NFT plugin
pnpm run build:plugin-misc # Misc plugin
pnpm run build:plugin-blinks # Blinks plugin
pnpm run build:adapter-mcp # MCP adapter
# Lint and format
pnpm run lint # Check with Biome
pnpm run lint:fix # Auto-fix lint issues
pnpm run format # Format code with Biome
# Run tests (interactive - prompts for "agent" or "programmatic" mode)
# Requires OPENAI_API_KEY, RPC_URL, SOLANA_PRIVATE_KEY in test/.env
pnpm run test
# Generate documentation
pnpm run docs
# Clean all build artifacts
pnpm run cleanArchitecture Overview
This is a monorepo using pnpm workspaces and Turborepo for building AI agents that interact with Solana protocols.
Package Structure
packages/
├── core/ # solana-agent-kit - Main SDK with SolanaAgentKit class
├── plugin-token/ # Token operations (transfers, swaps, Jupiter, PumpFun)
├── plugin-defi/ # DeFi protocols (Drift, Orca, Raydium, Meteora, etc.)
├── plugin-nft/ # NFT operations (Metaplex, 3Land)
├── plugin-misc/ # Utilities (CoinGecko, Allora, domains, webhooks)
├── plugin-blinks/ # Solana Blinks (arcade games)
└── adapter-mcp/ # Model Context Protocol server adapterCore Concepts
Plugin System: V2 uses a composable plugin architecture. Plugins register methods (direct function calls) and actions (AI agent tools with schemas).
// Plugin structure
interface Plugin {
name: string;
methods: Record<string, Function>; // Programmatic API
actions: Action[]; // AI agent tools with Zod schemas
initialize(agent: SolanaAgentKit): void;
}
// Action structure for AI tools
interface Action {
name: string;
similes: string[]; // Alternative trigger phrases
description: string;
examples: ActionExample[][];
schema: z.ZodType<any>; // Input validation
handler: Handler; // Execution function
}Agent Initialization:
const agent = new SolanaAgentKit(wallet, rpcUrl, config)
.use(TokenPlugin)
.use(DefiPlugin);
// Methods are type-safe on agent.methods
await agent.methods.trade(...);
// Actions exposed via agent.actions for AI frameworks
const tools = createVercelAITools(agent, agent.actions);Wallet Interface: Uses BaseWallet interface - can be KeypairWallet for server-side or wallet adapter for browser.
AI Framework Integration
createVercelAITools(agent, actions)- For Vercel AI SDKcreateLangchainTools(agent, actions)- For LangChaincreateOpenAITools(agent, actions)- For OpenAI Agents SDK
Plugin Organization Pattern
Each plugin follows this structure:
plugin-*/src/
├── index.ts # Plugin definition, exports methods & actions
├── protocol-name/
│ ├── actions/ # Action definitions (AI tool schemas)
│ ├── tools/ # Implementation functions
│ └── types/ # TypeScript types (optional)Actions vs Tools: Actions wrap tools with Zod schemas, descriptions, and examples for AI agent consumption. Tools contain the actual implementation logic.
Code Style
- Linting/Formatting: Biome (not ESLint/Prettier for main code)
- Commit Messages: Conventional Commits (
feat:,fix:,docs:) - Naming: camelCase for functions/variables, PascalCase for types/classes
- TypeScript strict mode, ESM modules
Key Files
packages/core/src/agent/index.ts- SolanaAgentKit class definitionpackages/core/src/types/index.ts- Core types (Plugin, Action, Config)packages/core/src/types/wallet.ts- Wallet interface definitionsturbo.json- Turborepo build configurationbiome.json- Linting and formatting rules
Trending
More talk lately.about the whole repository
Who's talking about sendaifun/solana-agent-kit
- elizaOS/eliza“Integrate Solana Agent Kit”GitHub · Dec 31, 2024 · 3 reactions
- sendaifun/action-registry“Get your action supported — RugShield 402 Pre-Trade Honeypot & Alpha Simulation”GitHub · Oct 21, 2026
- Mthamasia/alpha-hunter-x402“[ARCHIVED · NÃO EXECUTAR] GTM-001 — Prospecção comercial AHX”GitHub · Oct 15, 2026
- fxams/crew“Publish Eliza/SAK/GOAT plugins + upstream proposals; Musebook/ClawPump drafts”GitHub · Oct 10, 2026
- assetfare/assetfare-mcp“build(deps-dev): bump the all-solana-agent-kit-dependencies group across 1 directory with 3 updates”GitHub · Sep 23, 2026
The biggest 5 of 16 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 16
Talked about on GitHub (16 times).
On GitHub · 16
- Dec 31, 2024Integrate Solana Agent Kit — elizaOS/eliza3 reactions · 2 comments
- Oct 21, 2026Get your action supported — RugShield 402 Pre-Trade Honeypot & Alpha Simulation — sendaifun/action-registry0 reactions
- Oct 15, 2026[ARCHIVED · NÃO EXECUTAR] GTM-001 — Prospecção comercial AHX — Mthamasia/alpha-hunter-x4020 reactions
- Oct 10, 2026Publish Eliza/SAK/GOAT plugins + upstream proposals; Musebook/ClawPump drafts — fxams/crew0 reactions
- Sep 23, 2026build(deps-dev): bump the all-solana-agent-kit-dependencies group across 1 directory with 3 updates — assetfare/assetfare-mcp0 reactions · 2 comments
11 more on GitHub
- Sep 23, 2026build(deps-dev): bump solana-agent-kit from 2.0.7 to 2.0.10 in /integrations/solana-agent-kit in the all-solana-agent-kit-dependencies group — assetfare/assetfare-mcp0 reactions · 1 comment
- Mar 4, 2026Get your action supported — Solentic native staking — sendaifun/action-registry0 reactions · 1 comment
- Feb 19, 2026[BOUNTY] Framework Plugin — Bring Baozi to ElizaOS, LangChain & Solana Agent Kit — 1.0 SOL — bolivian-peru/baozi-openclaw0 reactions · 1 comment
- Oct 2, 2025chore(deps)(deps): bump solana-agent-kit from 2.0.7 to 2.0.10 in /mcp-server — jparram/SolanaAutomation0 reactions · 1 comment
- Aug 13, 2025AGENTS — future-ai-org/future-prototype-ts0 reactions
- Jul 12, 2025AGENTS AND DECENTRALIZED AI — future-ai-org/future-prototype-ts0 reactions
- Apr 27, 2025CREATE AI AGENTS — future-ai-org/future-prototype-ts0 reactions · 1 comment
- Mar 1, 2025Update README_cn.md — deepseek-ai/awesome-deepseek-integration0 reactions
- Jan 5, 2025Implement Adrena Protocol — fape-labs/solana-agent-kit-go0 reactions
- Jan 5, 2025Rugcheck API Integrated — MisKey-h/decentralized-meta0 reactions · 1 comment
- Dec 22, 2024feat: solana token deploy using solana agent kit — elizaOS/eliza0 reactions · 4 comments
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

