Skip to content

sendaifun/create-solana-agent

Repository files navigation

create-solana-agent

Create Solana Agent

npm version npm downloads License

⚡ Get up and running fast with Solana agents ⚡

Create a new AI agent chat UI with Solana Agent Kit in 10 seconds:

npx create-solana-agent@latest

Overview

Create Solana Agent is a single line command that helps you bootstrap a new AI agent interface for Solana blockchain interactions. It provides a modern, minimalist UI with built-in support for multiple AI models and Solana protocols.

Features

  • 🤖 Multiple AI Model Support
    • Claude 3 Sonnet
    • GPT-4
    • DeepSeek Chat
  • 🎨 Modern, minimalist UI with dark/light mode
  • ⛓️ Interact with 20+ Solana Protocols via Solana Agent Kit
  • 💬 Real-time chat interface with markdown support
  • 🔄 Session management and chat history
  • 🏗️ Built with:
    • Solana Agent Kit
    • Next.js 14 (App Router)
    • TypeScript
    • Tailwind CSS
    • Shadcn UI
    • Langchain SDK

Quick Start

Prerequisites

  • Node.js 18.17 or later
  • npm, yarn, or pnpm (latest versions preferred)

Installation

  1. Create a new project:

    npx create-solana-agent@latest
  2. Follow the CLI prompts to configure your project:

    • Project name
    • RPC URL
    • AI model selection
    • API keys
    • Solana wallet
  3. Start the development server:

    cd your-project-name
    pnpm install
    pnpm run dev

Environment Variables

Required environment variables:

MODEL=claude-sonnet|gpt-4|deepseek-chat
ANTHROPIC_API_KEY=your_api_key  # For Claude
OPENAI_API_KEY=your_api_key     # For GPT-4
DEEPSEEK_API_KEY=your_api_key   # For DeepSeek
RPC_URL=your_solana_rpc_url
SOLANA_PRIVATE_KEY=your_private_key

Customization

Styling

The project uses Tailwind CSS for styling. Customize the theme in tailwind.config.ts:

export default {
  theme: {
    extend: {
      colors: {
        // Add your custom colors
      }
    }
  }
}

Components

UI components are built using shadcn/ui. Add new components:

npx shadcn add [component-name]

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Acknowledgments