An open-source LangChain agent that automates wallet management, on-chain data collection, and token operations on the Monad Mainnet.
- Overview
- Key Capabilities
- Architecture Highlights
- Documentation
- Getting Started
- Backend Setup
- Frontend Setup
- Usage Examples
- Environment Variables
- Core Dependencies
- Contributing
- License
- Security Notes
MnadAI | Monad AI Agent is designed for teams that need a reliable automation layer on top of the Monad Mainnet. The agent combines deterministic blockchain tooling with LLM-powered reasoning so that wallets, token operations, and market data can be orchestrated through natural-language prompts or autonomous task plans.
Production deployment: MnadAI AI.
-
Wallet & Token Operations
- Provision and manage Monad Mainnet wallets
- Retrieve MONAD balances and historical activity
- Transfer MONAD to arbitrary recipients
- Create and deploy custom tokens
- Provide funding guidance for on-chain operations
- Sign payloads for downstream contract workflows
-
On-Chain Intelligence
- Query recent transactions with explorer links
- Surface real-time gas estimates
- Fetch live token prices (CoinGecko) and trending assets
-
Agentic Automation
- LangChain toolset with React-style state management
- Autonomous and guided chat modes
- Streaming responses, memory retention, and structured error handling
- LangChain + LangGraph orchestration with tool nodes for each blockchain action
- Express/Node backend packaged for Vercel or self-hosted deployments
- React + Privy frontend for wallet-authenticated chat UX
- Typed configuration via Zod schemas and centralized logging (tslog)
import { ChatOpenAI } from "@langchain/openai";
import { StateGraph, END } from "@langchain/langgraph";
import { ToolNode } from "@langchain/langgraph/prebuilt";
import { ethers } from "ethers";
import { Logger } from "tslog";
const graph = new StateGraph({
channels: ["wallet", "context"],
nodes: {
tools: new ToolNode(/* blockchain utilities */),
},
entry: "tools",
end: END,
});
const model = new ChatOpenAI({ model: "gpt-4o-mini", streaming: true });
const log = new Logger({ name: "MonadAgent" });Full product and API documentation is available at the MnadAI Agent Documentation.
git clone https://github.com/Novus-Tech-LLC/MnadAI.git
cd MnadAI
npm installThe repository contains a TypeScript backend in monadagent/ and a Vite/React frontend in src/. Each layer has its own environment file.
cd monadagent
npm install- Create
monadagent/.envand provide the variables listed in the Environment Variables section. - Start the agent service:
npx ts-node monadAgent.ts
- Validate the API:
curl -X POST http://localhost:3000/agent \ -H "Content-Type: application/json" \ -d '{"input": "help"}'
cd ..
npm install- Create
.envin the project root with frontend variables (see below). - Launch the Vite dev server:
npm run dev
- Open
http://localhost:5173/dashboard, connect via Privy, and start issuing commands to the agent.
Commands are issued through src/components/ChatInterface.tsx. Representative prompts:
setWallet <private-key>→Wallet set to address: 0x...getBalance→Balance: 10 MONADtransferTokens <recipient-address> 1→Transaction hash: 0x...getTokenPrice MONAD→MONAD price: $0.50 USDcreateToken MyToken MTK 1000→Token address: 0x...
| Variable | Location | Purpose |
|---|---|---|
OPENAI_API_KEY |
monadagent/.env |
LLM access for LangChain tools |
COINGECKO_API_KEY |
monadagent/.env |
Token price lookups |
DEXSCREENER_API_KEY |
monadagent/.env |
Trending token data (optional) |
MONAD_RPC_URL |
monadagent/.env |
RPC endpoint (defaults to https://mainnet-rpc.monad.xyz) |
VITE_API_ENDPOINT |
./.env |
URL of the backend agent (http://localhost:3000/agent) |
VITE_PRIVY_APP_ID |
./.env |
Privy application identifier |
-
Backend (
monadagent/)@langchain/openai,@langchain/langgraph,@langchain/coreethers,axios,express,cors,body-parser,tslog,zod
-
Frontend (
src/)react,@privy-io/react-auth,@tanstack/react-queryshadcn/ui,tailwindcss,typescript,vite
Pull requests and issues are welcome. Please include context on the feature or bugfix and add tests where applicable.
Distributed under the MIT License. See the LICENSE file for details.
- Do not commit private keys or API keys to the repository.
- Store all credentials in local
.envfiles and ensure they remain in.gitignore. - Rotate keys periodically and restrict RPC endpoints to trusted networks where possible.
