Science Score: 26.0%

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

  • 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 (13.5%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: Afoxcute
  • License: apache-2.0
  • Language: TypeScript
  • Default Branch: main
  • Size: 218 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Citation

README.md

# Solana Agent Kit ![Solana Agent Kit Cover 1 (3)](https://github.com/user-attachments/assets/cfa380f6-79d9-474d-9852-3e1976c6de70) ![NPM Downloads](https://img.shields.io/npm/dm/solana-agent-kit?style=for-the-badge) ![GitHub forks](https://img.shields.io/github/forks/sendaifun/solana-agent-kit?style=for-the-badge) ![GitHub License](https://img.shields.io/github/license/sendaifun/solana-agent-kit?style=for-the-badge)

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.

🔧 Core Blockchain Features

  • Token Operations

    • Deploy SPL tokens by Metaplex
    • Transfer assets
    • Balance checks
    • Stake SOL
    • Zk compressed Airdrop by Light Protocol and Helius
  • 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
    • Meteora Dynamic AMM, DLMM Pool, and Alpga Vault
    • Openbook market creation
    • Register and Resolve SNS
    • Jito Bundles
    • Pyth Price feeds for fetching Asset Prices
    • Register/resolve Alldomains
  • Solana Blinks

    • Lending by Lulon (Best APR for USDC)
    • Send Arcade Games
    • JupSOL 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
  • 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

📦 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

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 );

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 price = await agent.pythFetchPrice( "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43" );

console.log("Price in BTC/USD:", price); ```

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
  • @pythnetwork/price-service-client

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Refer to CONTRIBUTING.md for detailed guidelines on how to contribute to this project.

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: Afoxcute
  • Kind: user
  • Company: @MoreplexTv @Dev-Meets

Code it till you make it.

GitHub Events

Total
  • Member event: 1
  • Push event: 2
  • Create event: 2
Last Year
  • Member event: 1
  • Push event: 2
  • Create event: 2

Dependencies

package.json npm
  • @types/bn.js ^5.1.5 development
  • @types/chai ^5.0.1 development
  • @types/node ^22.9.0 development
  • @typescript-eslint/eslint-plugin ^7.0.0 development
  • @typescript-eslint/parser ^7.0.0 development
  • eslint ^8.56.0 development
  • eslint-config-prettier ^9.1.0 development
  • eslint-plugin-prettier ^5.1.3 development
  • prettier ^3.2.5 development
  • ts-node ^10.9.2 development
  • typescript ^5.7.2 development
  • @bonfida/spl-name-service ^3.0.7
  • @coral-xyz/anchor 0.29
  • @langchain/core ^0.3.18
  • @langchain/groq ^0.1.2
  • @langchain/langgraph ^0.2.27
  • @langchain/openai ^0.3.13
  • @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/price-service-client ^1.9.0
  • @raydium-io/raydium-sdk-v2 0.1.95-alpha
  • @solana/spl-token ^0.4.9
  • @solana/web3.js ^1.95.4
  • bn.js ^5.2.1
  • bs58 ^6.0.0
  • chai ^5.1.2
  • decimal.js ^10.4.3
  • dotenv ^16.4.5
  • form-data ^4.0.1
  • langchain ^0.3.6
  • openai ^4.75.0
  • typedoc ^0.26.11
pnpm-lock.yaml npm
  • 136 dependencies
yarn.lock npm
  • 465 dependencies