Skip to main content

Examples

This section contains a collection of examples demonstrating various implementations of the Solana Agent Kit v2. These examples are organized by category to help you find the right starting point for your project.

Examples Overview

DeFi Examples

ExampleDescription
market-making-agentAgent implementation for market making on Solana DEXs
wormhole-nextjs-agentCross-chain agent using Wormhole with Next.js framework
okx-dex-starterStarter template for building agents interacting with OKX DEX

Embedded Wallets

ExampleDescription
turnkey-agent-starterAgent implementation using Turnkey’s secure embedded wallet solution
privy-agent-tanstack-starterExample using Privy wallet integration with TanStack for state management
crossmint-sak-v2Implementation using Crossmint’s wallet infrastructure
para-plugin-exampleExample demonstrating Para wallet plugin integration

MCP (Model Context Provider)

ExampleDescription
agent-kit-mcp-serverServer implementation for Model Context Protocol with Solana Agent Kit

Miscellaneous

ExampleDescription
persistent-agentExample of an agent with persistent state between interactions
agent-kit-nextjs-langchainIntegration of Agent Kit with Next.js and LangChain
orbofi-personality-engineExample using OrboFi personality engine for more engaging agents
agent-kit-langgraphIntegration with LangGraph for complex agent workflows

Social

ExampleDescription
discord-bot-starterStarter template for building Discord bots with Agent Kit
tg-bot-starterTemplate for Telegram bot integration

n8n Integration

A comprehensive node setup for integrating Solana Agent Kit with the n8n workflow automation platform. This allows creation of no-code/low-code blockchain workflows.

Getting Started

Each example includes its own README with specific instructions. To get started:
  1. Choose an example that best fits your use case
  2. Navigate to the example directory
  3. Follow the installation and setup instructions in the example’s README
Most examples can be run with a simple set of commands:
# Clone the repository
git clone https://github.com/solana-labs/agent-kit-v2
cd agent-kit-v2

# Navigate to the example
cd examples/[example-category]/[example-name]

# Install dependencies
npm install

# Start the development server
npm run dev

Prerequisites

Most examples require:
  • Node.js (version specified in each example)
  • npm, yarn, or pnpm (as specified)
  • Basic understanding of Solana and blockchain concepts
  • API keys (OpenAI, Solana RPC, etc.) as specified in each example
  • Create a .env.local file in the example directory to store your API keys
  • Use a development wallet with a small amount of SOL for testing
  • Most examples work with devnet or testnet by default
  • Check the specific RPC requirements in each example’s README

Customizing Examples

The examples are designed to be starting points for your own implementations. Here are some ways you can extend them:
  • Add additional plugins to expand functionality
  • Customize prompts to create specialized agent behaviors
  • Integrate with different wallet providers
  • Connect to additional DeFi protocols
  • Modify the UI components to match your application’s design

Contributing

If you’d like to contribute a new example, please follow the standard contribution guidelines in the main repository. New examples should:
  • Include a comprehensive README.md
  • Be well-documented with comments
  • Follow the code structure of existing examples
  • Include any necessary environment variable templates
For questions or issues with specific examples, please reference the individual example’s documentation first. For general questions about the Solana Agent Kit, refer to the main documentation.