Sui AI Agent Kit
Visit ProjectThe Sui Agent Kit Ecosystem consists of two specialized Node.js server applications built with TypeScript. Each acts as a bridge, translating simple MCP tool calls into direct interactions with specific DeFi protocols on the Sui network.
Visit ProjectCategory
Tags
What is Sui AI Agent Toolkit?
The Sui AI Agent Toolkit is an ecosystem consisting of two specialized Node.js server applications that act as bridges between AI agents and DeFi protocols on the Sui network. It simplifies interactions with Navi, SuiSpring, and Suilend protocols by translating MCP tool calls into direct blockchain operations.
Key Features
- Simplified DeFi protocol interactions through MCP tool calls
- Support for major Sui DeFi protocols including Navi, SuiSpring, and Suilend
- Real-time portfolio management and automated yield optimization capabilities
How to Use Sui AI Agent Toolkit?
- Select the appropriate kit based on protocol needs (Navi Protocol Kit or SuiLend+SuiSpring Kit)
- Configure environment variables with your Sui wallet credentials
- Run the server using Node.js
- Use MCP tool calls to interact with DeFi protocols
Use Cases of Sui AI Agent Toolkit?
- Automated portfolio rebalancing across protocols
- AI-driven financial advisory services
- Arbitrage opportunities detection and execution
- Multi-protocol yield farming strategies
FAQ about Sui AI Agent Toolkit?
- Which protocols are supported by the current implementation?
The current implementation supports Navi Protocol, SuiLend, SuiSpring, and core Sui operations.
- What programming language is required to use this toolkit?
The toolkit is implemented in TypeScript and uses Node.js. Familiarity with these technologies is required for custom implementations.
- Are there pre-built agents available for specific use cases?
While not included in the core package, the Sui AI Agent Toolkit is designed to support pre-built agents for specific DeFi use cases. These are part of the long-term roadmap.
Sui Agent Kit โ Automated DeFi, DeFAI on Sui
Telegram
The Sui Agent Kit was born from a passion to simplify DeFi development on the Sui blockchain and to empower builders like you for the Sui Overflow 2025 Hackathon!
We've created a Model Context Protocol (MCP) implementation that standardizes how AI agents interact with Sui DeFi protocols. Our toolkit provides ready-to-use MCP tools that allow any AI agent to perform complex DeFi operations on Sui with just one click. We've integrated Navi, SuiSpring, and Suilend protocols into a unified interface, but our goal is to expand this to all protocols in the Sui ecosystem. This eliminates the need for developers to learn multiple SDKs or write custom integration code for each protocol.
Our mission is to provide the foundational infrastructure that enables developers to rapidly prototype, build, and deploy sophisticated DeFi applications, automation scripts, and AI-powered agents on Sui, with a special focus on leveraging the deep liquidity and features of the Navi/Suilend Protocol.
๐ค What is MCP (Model Context Protocol)?
MCP is the bridge between AI and blockchain. It's a standardized communication protocol that allows AI agents to interact with external systems through simple "tool calls" - no complex coding required. In simple terms: Instead of AI agents needing to learn dozens of different APIs and SDKs, MCP provides one universal language. For DeFi, this means an AI can say "deposit 100 USDC" and MCP handles all the blockchain complexity behind the scenes.
๐๏ธ What is the Sui Agent Kit Ecosystem?
The Sui Agent Kit Ecosystem consists of two specialized Node.js server applications built with TypeScript. Each acts as a bridge, translating simple MCP tool calls into direct interactions with specific DeFi protocols on the Sui network.
๐ Choose Your Protocol Suite
Navi Protocol Kit Specialized for: - Navi Protocol lending & borrowing - NAVI Aggregator swaps - VoloSui (vSUI) liquid staking - Advanced yield strategies Perfect for: Yield farmers, arbitrage bots, portfolio managers### SuiLend + SuiSpring Kit Specialized for: - SuiLend lending markets - SuiSpring liquid staking (LSTs) - Core Sui operations - Multi-protocol strategies Perfect for: Comprehensive DeFi agents, LST optimizers, wallet automation
Unified Use Cases Across the Ecosystem
- ** Automated Portfolio Rebalancer:** Cross-protocol agents that monitor health factors and automatically manage positions across Navi and SuiLend
- ** Multi-Protocol Yield Farming:** Agents that identify the highest yields across Navi, SuiLend, and various LST providers, automatically moving funds
- ** Unified DeFi Dashboard:** Web interfaces that aggregate data from both kits to provide comprehensive portfolio views
- ** AI-Powered Financial Advisors:** Advanced agents that analyze opportunities across the entire Sui DeFi ecosystem
- ** Cross-Protocol Arbitrage:** Sophisticated bots that exploit price differences between Navi and SuiLend markets
Navi Protocol Kit - Deep Dive
Core Architecture
navi-mcp-server/
โโโ src/
โ โโโ mcp_server/
โ โ โโโ server.ts # MCP server implementation
โ โ โโโ mappers.ts # Asset symbol/amount conversions
โ โโโ core_navi/
โ โ โโโ navi_client.ts # Navi SDK integration
โ โโโ config.ts # Environment configuration
โ โโโ index.ts # Entry point
โโโ dist/ # Compiled JavaScript
โโโ .env # Environment variables
โโโ package.json
Key Features & Capabilities
Portfolio Management:
navi_getAgentPortfolio
: Retrieve current supply and borrow balancesnavi_getAgentHealthFactor
: Check the agent's health factornavi_getAgentDynamicHealthFactor
: Predict health factor after hypothetical changes
Lending Pool Interactions:
navi_depositAsset
: Deposit SUI, USDC, USDT, etc., as collateralnavi_withdrawAsset
: Withdraw deposited assetsnavi_borrowAsset
: Borrow assets against collateralnavi_repayDebt
: Repay borrowed amounts
Token Swaps (via NAVI Aggregator):
navi_getSwapQuote
: Get quotes for asset swapsnavi_executeSwap
: Execute token swaps
Liquid Staking (vSUI):
navi_stakeSuiForVSui
: Stake SUI to receive vSUI (VoloSui)navi_unstakeVSuiForSui
: Unstake vSUI to receive SUI back
Rewards Management:
navi_getAgentAvailableRewards
: Check for unclaimed rewardsnavi_claimAllAgentRewards
: Claim all available rewardsnavi_getAgentRewardsHistory
: View history of claimed rewards
Market Data:
navi_getPoolInfoBySymbol
: Get details for specific asset poolsnavi_getAllPoolsInfo
: Get details for all available asset poolsnavi_getReserveDetail
: Get in-depth reserve information
Prerequisites & Setup
-
Node.js and npm: Recent version required
-
Sui Wallet: Mnemonic or private key with SUI for gas fees
-
Clone Repository:
git clone https://github.com/0xzepdev/Sui-Agent-Kit-Navi/ cd Sui-Agent-Kit-Navi/navi-mcp-server
-
Configure Environment:
# .env file SUI_RPC_URL=https://fullnode.mainnet.sui.io:443 NAVI_AGENT_MNEMONIC="your twelve or twenty-four word mnemonic phrase here" # OR NAVI_AGENT_PRIVATE_KEY="your_base64_encoded_private_key_bytes_here"
-
Build & Run:
npm install npm run build node dist/index.js
SuiLend + SuiSpring Kit - Deep Dive
Core Architecture
sui-agent-kit-suispring-suilend/
โโโ src/
โ โโโ mcp/
โ โ โโโ server.ts # MCP server orchestration
โ โ โโโ internalSdkClientManager.ts # SDK client management
โ โ โโโ zodSchemas/ # Input validation schemas
โ โ โโโ toolHandlers/ # Protocol-specific handlers
โ โโโ protocols/
โ โ โโโ suilend/ # SuiLend integration
โ โ โโโ suispring/ # SuiSpring integration
โ โ โโโ mystensui/ # Core Sui operations
โ โโโ common/ # Shared utilities
โ โโโ main.ts # Entry point
โโโ dist/ # Compiled JavaScript
โโโ .env # Environment variables
โโโ package.json
๐ฅ Key Features & Capabilities
MystenSui (Core Sui Functionality):
mystenSui_getSuiBalance
: Fetch SUI balance for the agent walletmystenSui_getTokenMetadata
: Retrieve detailed token metadatamystenSui_getUserTokenBalance
: Get specific token balancesmystenSui_transferSui
: Execute SUI transfersmystenSui_transferSuiToMany
: Batch SUI transfersmystenSui_transferFungTokensToMany
: Batch token transfersmystenSui_getUserRecentTxs
: Fetch recent transaction history
SuiSpring (Liquid Staking):
springSui_discoverLstPools
: Discover available LST poolsspringSui_getLstSuiExchangeRate
: Get LST to SUI exchange ratesspringSui_getUserLstDetails
: Fetch user LST position detailsspringSui_getSpringSuiPoolApys
: Get APYs for LST poolsspringSui_stakeSuiForSpringSuiLst
: Stake SUI for generic LSTsspringSui_stakeSuiForParaSui
: Specifically stake for ParaSUIspringSui_redeemSpringSuiLstForSui
: Redeem LSTs back to SUI
Suilend (Lending & Borrowing):
suilend_getSuilendMarketAssets
: List supported assets and metricssuilend_ensureSuilendObligation
: Create/check loan accountssuilend_getUserObligationInfo
: Get obligation IDs for operationssuilend_depositToSuilend
: Deposit assets as collateralsuilend_getObligationDetails
: Comprehensive obligation reportssuilend_withdrawFromSuilend
: Withdraw collateralsuilend_borrowFromSuilend
: Borrow against collateralsuilend_repayToSuilend
: Repay borrowed assetssuilend_getObligationHistory
: Fetch transaction history
Common Utilities:
common_formatTokenAmount
: Convert raw amounts to readable stringscommon_parseTokenAmount
: Convert readable strings to raw amountscommon_shortenAddress
: Shorten addresses for displaycommon_getCoinTypeBySymbol
: Get coin types from symbols
Prerequisites & Setup
-
Node.js: Version 18.x or later recommended
-
Sui Wallet: Private key in Bech32 format (starting with
suiprivkey1...
) -
Clone Repository:
git clone https://github.com/0xzepdev/Sui-AI- Agent-Kit-SuiLend-SuiSpring cd Sui-Agent-Kit-SuiLend-SuiSpring
-
Configure Environment:
# .env file SUI_MAINNET_PRIVATE_KEY="suiprivkey1yourlongprivatekeystringgoeshere..." # Optional: SUI_RPC_URL="https://fullnode.mainnet.sui.io:443"
-
Build & Run:
npm install npm run build npm start # OR for development: npm run dev
๐ง MCP Client Configuration
Both kits use the Model Context Protocol (MCP) for communication. Configure your MCP client with an mcp.json
file:
For Navi Protocol Kit:
{
"mcpServers": {
"navi-mcp-agent": {
"command": "node",
"args": [
"YOUR_ABSOLUTE_PATH_TO/Sui-Agent-Kit-Navi/navi-mcp-server/dist/index.js"
],
"cwd": "YOUR_ABSOLUTE_PATH_TO/Sui-Agent-Kit-Navi/navi-mcp-server",
"env": {
"SUI_RPC_URL": "https://fullnode.mainnet.sui.io:443",
"NAVI_AGENT_MNEMONIC": "your optional mnemonic override"
}
}
}
}
For SuiLend + SuiSpring Kit:
{
"mcpServers": {
"sui-agent-kit": {
"command": "node",
"args": [
"YOUR_ABSOLUTE_PATH_TO/sui-agent-kit-suispring-suilend/dist/main.js"
],
"cwd": "YOUR_ABSOLUTE_PATH_TO/sui-agent-kit-suispring-suilend",
"env": {
"SUI_MAINNET_PRIVATE_KEY": "suiprivkey1..."
}
}
}
}
๐งช Testing & Interaction Examples
Use the MCP Inspector CLI to test your setup:
Navi Protocol Kit Examples:
# Check portfolio
npx @modelcontextprotocol/inspector --cli ts-node src/index.ts --method tools/call --tool-name navi_getAgentPortfolio
# Deposit 0.1 SUI
npx @modelcontextprotocol/inspector --cli ts-node src/index.ts --method tools/call --tool-name navi_depositAsset --tool-arg assetSymbol=SUI --tool-arg amount=0.1
# Get swap quote
npx @modelcontextprotocol/inspector --cli ts-node src/index.ts --method tools/call --tool-name navi_getSwapQuote --tool-arg fromAssetSymbol=SUI --tool-arg toAssetSymbol=USDC --tool-arg amountIn=1.0
SuiLend + SuiSpring Kit Examples:
# Get SUI balance
mcp-inspector --server sui-agent-kit --method tools/call --tool-name mystenSui_getSuiBalance --tool-arg network=mainnet
# Stake SUI for ParaSUI
mcp-inspector --server sui-agent-kit --method tools/call --tool-name springSui_stakeSuiForParaSui --tool-arg amountSuiToStake=0.05 --tool-arg network=mainnet
# Get Suilend market info
mcp-inspector --server sui-agent-kit --method tools/call --tool-name suilend_getSuilendMarketAssets --tool-arg network=mainnet
๐ฅ Meet the Team
Project Status & Roadmap
Current Status (Sui Overflow 2025 MVP)
Navi Protocol Kit:
- Complete MCP server implementation
- Full Navi SDK integration
- All core lending/borrowing operations
- NAVI Aggregator swap functionality
- VoloSui liquid staking
- Comprehensive portfolio management
- Rewards system integration
SuiLend + SuiSpring Kit:
- Robust MCP server with Zod validation
- Complete SuiLend integration
- Full SuiSpring LST support
- Core Sui operations
- Advanced SDK client management
- Comprehensive testing framework
- Steamm DEX integration (planned but disabled for MVP)
-Future Roadmap
Immediate Post-Hackathon:
- Cross-Kit Integration: Enable agents to operate across both protocols simultaneously
- Steamm DEX Integration: Complete robust DEX functionality in the SuiLend kit
- Enhanced Testing: Comprehensive unit and integration test coverage
- Documentation Expansion: In-depth guides and tutorials
Long-term Vision:
- AI Agent Showcases: Pre-built intelligent agents demonstrating advanced strategies
- Enterprise Security: Multi-sig and permission-based execution frameworks
- Real-time Events: On-chain event streaming for reactive decision-making
- Community Ecosystem: Plugin architecture for community-contributed protocol integrations
- Strategy Marketplace: Sharable and monetizable DeFi strategies
- Choose Your Kit: Pick the Navi kit or SuiLend+SuiSpring kit based on your interests
- Fork the Repository: Create your own fork of the relevant repository
- Create Feature Branches: Work on focused improvements
- Submit Pull Requests: Detailed PRs with clear descriptions
- Join the Discussion: Engage with the community through issues and discussions
License
Both kits in the Sui Agent Kit Ecosystem are released under the MIT License, encouraging open collaboration and innovation in the Sui DeFi space.