SolanaAgentKit 🦜️🔗 LangChain + Next.js Starter Template
This template scaffolds a SolanaAgentKit + LangChain.js + Next.js starter app.
The agent uses LangGraph.js, LangChain's framework for building agentic workflows. They use preconfigured helper functions to minimize boilerplate, but you can replace them with custom graphs as desired.
It's free-tier friendly too! Check out the bundle size stats below.
🚀 Getting Started
First, clone this repo and download it locally.
Next, you'll need to set up environment variables in your repo's .env.local file. Copy the .env.example file to .env.local.
To start, you'll just need to add your OpenAI API key, Solana RPC URL and wallet private key in base 58 string form.
Next, install the required packages using your preferred package manager (e.g. pnpm).
pnpm install
Now you're ready to run the development server:
pnpm dev
Open http://localhost:3000 with your browser to see the result! Ask the bot something and you'll see a streamed response:
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
Backend logic lives in app/api/chat/route.ts. From here, you can change the prompt and model, or add other modules and logic.
📚 Learn More
To learn more about what you can do with SolanaAgentKit and LangChain.js, check out the docs here:
▲ Deploy on Vercel
When ready, you can deploy your app on the Vercel Platform.
Check out the Next.js deployment documentation for more details.
Thank You!
Thanks for reading! If you have any questions or comments, please drop an issue on this repo or reach out to us on X

