sonic-agent-kit

connect any ai agents to sonic protocols

https://github.com/sendaifun/sonic-agent-kit

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

Repository

connect any ai agents to sonic protocols

Basic Info
  • Host: GitHub
  • Owner: sendaifun
  • License: apache-2.0
  • Language: TypeScript
  • Default Branch: main
  • Size: 1.22 MB
Statistics
  • Stars: 10
  • Watchers: 0
  • Forks: 7
  • Open Issues: 1
  • Releases: 0
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing License Citation Security

README.md

# Sonic Agent Kit ![Sonic Agent Kit Cover 1 (3)](https://i.imgur.com/Y9Ph6wE.png) ![NPM Downloads](https://img.shields.io/npm/dm/@sendaifun/sonic-agent-kit?style=for-the-badge) ![GitHub forks](https://img.shields.io/github/forks/sendaifun/sonic-agent-kit?style=for-the-badge) ![GitHub License](https://img.shields.io/github/license/sendaifun/sonic-agent-kit?style=for-the-badge)

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

  • Launch new tokens
  • Mint NFTs
  • Create images
  • Deploy collections
  • Get wallet address
  • Get token balances
  • Transfer assets
  • 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 Sonic.

🔧 Core Blockchain Features

  • Token Operations

    • Deploy SPL tokens by Metaplex
    • Transfer assets
    • Balance checks
  • NFT Management via Metaplex

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

🤖 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

📦 Installation

bash npm install @sendaifun/sonic-agent-kit

Quick Start

```typescript import { SonicAgentKit, createSonicTools } from "@sendaifun/sonic-agent-kit";

// Initialize with private key and optional RPC URL const agent = new SonicAgentKit( "your-wallet-private-key-as-base58", "https://api.testnet.sonic.game", "your-openai-api-key" );

// Create LangChain tools const tools = createSonicTools(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, }, ], });

Close Empty Token Accounts

``` typescript

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

Dependencies

The toolkit relies on several key Solana and Metaplex libraries:

  • @solana/web3.js
  • @solana/spl-token
  • @metaplex-foundation/digital-asset-standard-api
  • @metaplex-foundation/mpl-token-metadata
  • @metaplex-foundation/mpl-core
  • @metaplex-foundation/umi

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.

Contributors

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

  • Name: sendaifun
  • Login: sendaifun
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
title: Sonic 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/sonic-agent-kit'
url: 'https://github.com/sendaifun/sonic-agent-kit'
abstract: >-
  Connect any AI Agents to Sonic Protocols
keywords:
  - sonic
  - svm
  - solana
  - blockchain
  - web3
  - agent
  - toolkit
license: Apache-2.0
version: 1.2.0
preferred-citation:
  type: software
  title: Sonic Agent Kit
  abstract: Connect any AI Agents to Sonic Protocols
  version: 1.2.0
  date-released: '2025-02-14'
  license: Apache-2.0
  url: 'https://github.com/sendaifun/sonic-agent-kit'
  repository-code: 'https://github.com/sendaifun/sonic-agent-kit'
  authors:
  - name: SendAI

GitHub Events

Total
  • Watch event: 9
  • Delete event: 1
  • Issue comment event: 2
  • Member event: 3
  • Push event: 6
  • Pull request event: 5
  • Fork event: 6
  • Create event: 4
Last Year
  • Watch event: 9
  • Delete event: 1
  • Issue comment event: 2
  • Member event: 3
  • Push event: 6
  • Pull request event: 5
  • Fork event: 6
  • Create event: 4

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 15 hours
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.67
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: about 15 hours
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.67
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • scriptscrypt (4)
  • kamalbuilds (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v4 composite
  • actions/setup-node v4 composite
  • pnpm/action-setup v3 composite
.github/workflows/check-langchain-tools.yml actions
  • actions/checkout v4 composite
  • actions/setup-node v4 composite
  • pnpm/action-setup v3 composite
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
  • tsx ^4.19.2 development
  • typescript ^5.7.2 development
  • @ai-sdk/openai ^1.0.11
  • @langchain/core ^0.3.26
  • @langchain/groq ^0.1.2
  • @langchain/langgraph ^0.2.36
  • @langchain/openai ^0.3.16
  • @metaplex-foundation/digital-asset-standard-api ^1.0.4
  • @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-options ^1.0.0
  • @metaplex-foundation/umi-uploader-irys ^1.0.0
  • @metaplex-foundation/umi-web3js-adapters ^0.9.2
  • @solana/spl-token ^0.4.9
  • @solana/spl-token-metadata ^0.1.6
  • @solana/web3.js ^1.98.0
  • 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
  • langchain ^0.3.8
  • openai ^4.77.0
  • tiktoken ^1.0.18
  • typedoc ^0.27.6
  • zod ^3.24.1
pnpm-lock.yaml npm
  • 394 dependencies