Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary

Scientific Fields

Earth and Environmental Sciences Physical Sciences - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: Epoch-Aiagents
  • License: apache-2.0
  • Language: TypeScript
  • Default Branch: main
  • Size: 4.01 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 12 months ago · Last pushed 12 months ago
Metadata Files
Readme Contributing License Citation Security

README.md

# Solana Agent Kit ![Solana Agent Kit Cover 1 (3)](https://cdn.discordapp.com/attachments/1158593497302048768/1326541855759794207/397842549-cfa380f6-79d9-474d-9852-3e1976c6de70-fotor-2025010851248.png?ex=677fcde0&is=677e7c60&hm=a248b7ba4f48af6c2a41642a6e6e7267676eeb8fa5284974ab9702748f51e820&))

An open-source toolkit for connecting AI agents to Solana protocols. Now, any agent, using any model can autonomously perform 15+ Solana actions:

  • Trade tokens
  • Launch new tokens
  • Lend assets
  • Send compressed airdrops
  • Execute blinks
  • Launch tokens on AMMs
  • And more...

Anyone - whether an SF-based AI researcher or a crypto-native builder - can bring their AI agents trained with any model and seamlessly integrate with Solana.

Run on Repl.it

Replit template created by Arpit Singh

🔧 Core Blockchain Features

  • Token Operations
    • Deploy SPL tokens by Metaplex
    • Transfer assets
    • Balance checks
    • Stake SOL
    • Zk compressed Airdrop by Light Protocol and Helius
  • NFTs on 3.Land
    • Create your own collection
    • NFT creation and automatic listing on 3.land
    • List your NFT for sale in any SPL token
  • NFT Management via Metaplex

    • Collection deployment
    • NFT minting
    • Metadata management
    • Royalty configuration
  • DeFi Integration

    • Jupiter Exchange swaps
    • Launch on Pump via PumpPortal
    • Raydium pool creation (CPMM, CLMM, AMMv4)
    • Orca Whirlpool integration
    • Manifest market creation, and limit orders
    • Meteora Dynamic AMM, DLMM Pool, and Alpha Vault
    • Openbook market creation
    • Register and Resolve SNS
    • Jito Bundles
    • Pyth Price feeds for fetching Asset Prices
    • Register/resolve Alldomains
    • Perpetuals Trading with Adrena Protocol
  • Solana Blinks

    • Lending by Lulo (Best APR for USDC)
    • Send Arcade Games
    • JupSOL staking
    • Solayer SOL (sSOL)staking
  • Non-Financial Actions

    • Gib Work for registering bounties

🤖 AI Integration Features

  • LangChain Integration

    • Ready-to-use LangChain tools for blockchain operations
    • Autonomous agent support with React framework
    • Memory management for persistent interactions
    • Streaming responses for real-time feedback
  • Vercel AI SDK Integration

    • Vercel AI SDK for AI agent integration
    • Framework agnostic support
    • Quick and easy toolkit setup
  • Autonomous Modes

    • Interactive chat mode for guided operations
    • Autonomous mode for independent agent actions
    • Configurable action intervals
    • Built-in error handling and recovery
  • AI Tools

    • DALL-E integration for NFT artwork generation
    • Natural language processing for blockchain commands
    • Price feed integration for market analysis
    • Automated decision-making capabilities

📃 Documentation

You can view the full documentation of the kit at docs.solanaagentkit.xyz

📦 Installation

bash npm install solana-agent-kit

Quick Start

```typescript import { SolanaAgentKit, createSolanaTools } from "solana-agent-kit";

// Initialize with private key and optional RPC URL const agent = new SolanaAgentKit( "your-wallet-private-key-as-base58", "https://api.mainnet-beta.solana.com", "your-openai-api-key" );

// Create LangChain tools const tools = createSolanaTools(agent); ```

Usage Examples

Deploy a New Token

```typescript const result = await agent.deployToken( "my ai token", // name "uri", // uri "token", // symbol 9, // decimals 1000000 // initial supply );

console.log("Token Mint Address:", result.mint.toString()); ```

Create NFT Collection on 3Land

```typescript const optionsWithBase58: StoreInitOptions = { privateKey: "", isMainnet: true, // if false, collection will be created on devnet 3.land (dev.3.land) };

const collectionOpts: CreateCollectionOptions = { collectionName: "", collectionSymbol: "", collectionDescription: "", mainImageUrl: "" };

const result = await agent.create3LandCollection( optionsWithBase58, collectionOpts ); ```

Create NFT on 3Land

When creating an NFT using 3Land's tool, it automatically goes for sale on 3.land website ```typescript const optionsWithBase58: StoreInitOptions = { privateKey: "", isMainnet: true, // if false, listing will be on devnet 3.land (dev.3.land) }; const collectionAccount = ""; //hash for the collection const createItemOptions: CreateSingleOptions = { itemName: "", sellerFee: 500, //5% itemAmount: 100, //total items to be created itemSymbol: "", itemDescription: "", traits: [ { trait_type: "", value: "" }, ], price: 0, //100000000 == 0.1 sol, can be set to 0 for a free mint mainImageUrl: "", splHash: "", //present if listing is on a specific SPL token, if not present sale will be on $SOL }; const isMainnet = true; const result = await agent.create3LandNft( optionsWithBase58, collectionAccount, createItemOptions, isMainnet );

```

Create NFT Collection

typescript const collection = await agent.deployCollection({ name: "My NFT Collection", uri: "https://arweave.net/metadata.json", royaltyBasisPoints: 500, // 5% creators: [ { address: "creator-wallet-address", percentage: 100, }, ], });

Swap Tokens

```typescript import { PublicKey } from "@solana/web3.js";

const signature = await agent.trade( new PublicKey("target-token-mint"), 100, // amount new PublicKey("source-token-mint"), 300 // 3% slippage ); ```

Lend Tokens

```typescript import { PublicKey } from "@solana/web3.js";

const signature = await agent.lendAssets( 100 // amount of USDC to lend ); ```

Stake SOL

typescript const signature = await agent.stake( 1 // amount in SOL to stake );

Stake SOL on Solayer

```typescript const signature = await agent.restake( 1 // amount in SOL to stake );

```

Send an SPL Token Airdrop via ZK Compression

```typescript import { PublicKey } from "@solana/web3.js";

(async () => { console.log( "~Airdrop cost estimate:", getAirdropCostEstimate( 1000, // recipients 30_000 // priority fee in lamports ) );

const signature = await agent.sendCompressedAirdrop( new PublicKey("JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"), // mint 42, // amount per recipient [ new PublicKey("1nc1nerator11111111111111111111111111111111"), // ... add more recipients ], 30_000 // priority fee in lamports ); })(); ```

Fetch Price Data from Pyth

```typescript

const priceFeedID = await agent.getPythPriceFeedID("SOL");

const price = await agent.getPythPrice(priceFeedID);

console.log("Price of SOL/USD:", price); ```

Open PERP Trade

```typescript import { PublicKey } from "@solana/web3.js";

const signature = await agent.openPerpTradeLong({ price: 300, // $300 SOL Max price collateralAmount: 10, // 10 jitoSOL in collateralMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL leverage: 50000, // x5 tradeMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL slippage: 0.3, // 0.3% }); ```

Close PERP Trade

```typescript import { PublicKey } from "@solana/web3.js";

const signature = await agent.closePerpTradeLong({ price: 200, // $200 SOL price tradeMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL }); ```

Close Empty Token Accounts

``` typescript

const { signature } = await agent.closeEmptyTokenAccounts(); ```

Examples

LangGraph Multi-Agent System

The repository includes an advanced example of building a multi-agent system using LangGraph and Solana Agent Kit. Located in examples/agent-kit-langgraph, this example demonstrates:

  • Multi-agent architecture using LangGraph's StateGraph
  • Specialized agents for different tasks:
    • General purpose agent for basic queries
    • Transfer/Swap agent for transaction operations
    • Read agent for blockchain data queries
    • Manager agent for routing and orchestration
  • Fully typed TypeScript implementation
  • Environment-based configuration

Check out the LangGraph example for a complete implementation of an advanced Solana agent system.

Dependencies

The toolkit relies on several key Solana and Metaplex libraries:

  • @solana/web3.js
  • @solana/spl-token
  • @metaplex-foundation/mpl-token-metadata
  • @metaplex-foundation/mpl-core
  • @metaplex-foundation/umi
  • @lightprotocol/compressed-token
  • @lightprotocol/stateless.js

Star History

Star History Chart

License

Apache-2 License

Security

This toolkit handles private keys and transactions. Always ensure you're using it in a secure environment and never share your private keys.

Owner

  • Login: Epoch-Aiagents
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
title: Solana Agent Kit
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - name: SendAI
repository-code: 'https://github.com/sendaifun/solana-agent-kit'
url: 'https://github.com/sendaifun/solana-agent-kit'
abstract: >-
  Connect any AI Agents to Solana Protocols
keywords:
  - solana
  - blockchain
  - web3
  - agent
  - toolkit
license: Apache-2.0
version: 1.2.0
preferred-citation:
  type: software
  title: Solana Agent Kit
  abstract: Connect any AI Agents to Solana Protocols
  version: 1.2.0
  date-released: '2024-12-21'
  license: Apache-2.0
  url: 'https://github.com/sendaifun/solana-agent-kit'
  repository-code: 'https://github.com/sendaifun/solana-agent-kit'
  authors:
  - name: SendAI

GitHub Events

Total
  • Push event: 2
  • Create event: 6
Last Year
  • Push event: 2
  • Create event: 6

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v4 composite
  • actions/setup-node v4 composite
  • pnpm/action-setup v3 composite
examples/agent-kit-langgraph/package.json npm
  • ts-node ^10.9.2 development
  • tsx ^4.19.2 development
  • typescript ^5.0.0 development
  • @langchain/community ^0.3.20
  • @langchain/core ^0.3.26
  • @langchain/langgraph ^0.2.36
  • dotenv ^16.4.7
  • solana-agent-kit ^1.3.0
  • zod ^3.24.1
examples/agent-kit-langgraph/pnpm-lock.yaml npm
  • 168 dependencies
examples/agent-kit-nextjs-langchain/package.json npm
  • prettier 3.0.0 development
  • @langchain/community ^0.3.11
  • @langchain/core ^0.3.17
  • @langchain/langgraph ^0.2.20
  • @langchain/openai ^0.3.11
  • @next/bundle-analyzer ^13.4.19
  • @supabase/supabase-js ^2.32.0
  • @tailwindcss/typography ^0.5.15
  • @types/node 20.12.12
  • @types/react 18.3.2
  • @types/react-dom 18.3.0
  • ai ^3.1.12
  • autoprefixer 10.4.14
  • eslint 8.46.0
  • eslint-config-next 13.4.12
  • isomorphic-dompurify ^2.19.0
  • langchain ^0.3.5
  • marked ^15.0.4
  • next ^14.2.3
  • postcss 8.4.27
  • react ^18.3.1
  • react-dom ^18.3.1
  • react-toastify ^9.1.3
  • solana-agent-kit ^1.3.0
  • tailwindcss 3.3.3
  • typescript 5.1.6
  • zod ^3.22.3
  • zod-to-json-schema ^3.21.4
examples/agent-kit-nextjs-langchain/pnpm-lock.yaml npm
  • 216 dependencies
examples/market-making-agent/package.json npm
  • @langchain/langgraph-checkpoint-postgres ^0.0.2
  • solana-agent-kit ^1.3.6
examples/market-making-agent/pnpm-lock.yaml npm
  • 192 dependencies
examples/persistent-agent/package.json npm
  • @langchain/langgraph-checkpoint-postgres ^0.0.2
  • solana-agent-kit ^1.3.0
examples/persistent-agent/pnpm-lock.yaml npm
  • 107 dependencies
examples/tg-bot-starter/package.json npm
  • @types/node ^20 development
  • @types/react ^19 development
  • @types/react-dom ^19 development
  • postcss ^8 development
  • tailwindcss ^3.4.1 development
  • typescript ^5 development
  • @langchain/core ^0.3.26
  • @langchain/langgraph ^0.2.36
  • @langchain/openai ^0.3.16
  • grammy ^1.33.0
  • messages link:@langchain/core/messages
  • next 15.1.3
  • prebuilt link:@langchain/langgraph/prebuilt
  • react ^19.0.0
  • react-dom ^19.0.0
  • solana-agent-kit ^1.3.0
examples/tg-bot-starter/pnpm-lock.yaml npm
  • 150 dependencies
package.json npm
  • @types/bn.js ^5.1.6 development
  • @types/chai ^5.0.1 development
  • @types/node ^22.10.2 development
  • @typescript-eslint/eslint-plugin ^8.18.2 development
  • @typescript-eslint/parser ^8.18.2 development
  • eslint ^8.56.0 development
  • eslint-config-prettier ^9.1.0 development
  • eslint-plugin-prettier ^5.2.1 development
  • husky ^9.1.7 development
  • lint-staged ^15.3.0 development
  • prettier ^3.4.2 development
  • ts-node ^10.9.2 development
  • typescript ^5.7.2 development
  • @3land/listings-sdk ^0.0.4
  • @ai-sdk/openai ^1.0.11
  • @bonfida/spl-name-service ^3.0.7
  • @cks-systems/manifest-sdk 0.1.59
  • @coral-xyz/anchor 0.29
  • @langchain/core ^0.3.26
  • @langchain/groq ^0.1.2
  • @langchain/langgraph ^0.2.36
  • @langchain/openai ^0.3.16
  • @lightprotocol/compressed-token ^0.17.1
  • @lightprotocol/stateless.js ^0.17.1
  • @metaplex-foundation/mpl-core ^1.1.1
  • @metaplex-foundation/mpl-token-metadata ^3.3.0
  • @metaplex-foundation/mpl-toolbox ^0.9.4
  • @metaplex-foundation/umi ^0.9.2
  • @metaplex-foundation/umi-bundle-defaults ^0.9.2
  • @metaplex-foundation/umi-web3js-adapters ^0.9.2
  • @onsol/tldparser ^0.6.7
  • @orca-so/common-sdk 0.6.4
  • @orca-so/whirlpools-sdk ^0.13.12
  • @pythnetwork/hermes-client ^1.3.0
  • @raydium-io/raydium-sdk-v2 0.1.95-alpha
  • @solana/spl-token ^0.4.9
  • @solana/web3.js ^1.98.0
  • @tensor-oss/tensorswap-sdk ^4.5.0
  • @tiplink/api ^0.3.1
  • ai ^4.0.22
  • bn.js ^5.2.1
  • bs58 ^6.0.0
  • chai ^5.1.2
  • decimal.js ^10.4.3
  • dotenv ^16.4.7
  • flash-sdk ^2.24.3
  • form-data ^4.0.1
  • langchain ^0.3.8
  • openai ^4.77.0
  • typedoc ^0.27.6
  • zod ^3.24.1
pnpm-lock.yaml npm
  • 265 dependencies