

The starter for building Eliza agents with NEAR Protocol and NEAR AI, created with below awesome technology stack 🔥:
- LLM Model Provider: NEAR AI
- Agent Framework: Eliza
- Plugins
- plugin-near (NEAR)
- plugin-multichain (BTC / ETH, via Chain Signatures)
- Memory
- adapter-sqlite
- Actions / Tools
- Transfer NEAR, BTC, ETH natively
- Swap on Ref Finance
- Clients
- REST API
- Web Client
Multichain Features:
- For example, send native BTC with your NEAR account via Chain Signatures
NEAR AI provides free agent hosting and inference APIs. You can skip this step if you want to use other model providers.
Install NEAR AI CLI following the instructions in https://docs.near.ai/cli.
To login NEAR AI, you'll need a mainnet NEAR account, it's recommended to create the account with the Bitte Wallet option in NEAR AI user interface.
# python 3.11 recommended
python3 -m pip install nearai
# Bitte Wallet is recommended for creating one mainnet NEAR account for login
nearai login
Create testnet NEAR account via https://testnet.mynearwallet.com (You'll receive 10 NEAR on testnet once created). Please notice this testnet account is different from the mainnet NEAR account you have created in step (1).
Claim more testnet NEAR from https://near-faucet.io if needed.
Duplicate environment template
cp .env.example .env
Add your NEAR account created in step (2) and its private key to .env
NEAR_NETWORK=testnet
NEAR_RPC_URL=https://neart.lava.build
NEAR_ADDRESS=xxxx.testnet
NEAR_WALLET_SECRET_KEY=ed25519:xxxxxxxx
Specify the models to use, e.g. DeepSeek-V3
SMALL_NEARAI_MODEL= # Default: fireworks::accounts/fireworks/models/llama-v3p2-3b-instruct
MEDIUM_NEARAI_MODEL= # Default: fireworks::accounts/fireworks/models/llama-v3p1-70b-instruct
LARGE_NEARAI_MODEL=fireworks::accounts/fireworks/models/deepseek-v3 # Default: fireworks::accounts/fireworks/models/llama-v3p1-405b-instruct
IMAGE_NEARAI_MODEL= # Default: fireworks::accounts/fireworks/models/playground-v2-5-1024px-aesthetic
Node.js version >= 22 is required
npm i -g pnpm
# agent dependencies
pnpm i
# web client dependencies
cd client && pnpm i && cd ..
In one terminal session, start the agent server, in interactive mode by default.
pnpm start
Start the web client in another terminal session
pnpm start:client
Open src/character.ts
to modify the default character.
To load custom characters instead:
- Use
pnpm start --characters="path/to/your/character.json"
- Multiple character files can be loaded simultaneously
Add Discord and Twitter for example
# in character.ts
clients: [Clients.TWITTER, Clients.DISCORD],
# in character.json
clients: ["twitter", "discord"]
Add login credentials and keys to .env
DISCORD_APPLICATION_ID="discord-application-id"
DISCORD_API_TOKEN="discord-api-token"
TWITTER_USERNAME="username"
TWITTER_PASSWORD="password"
TWITTER_EMAIL="[email protected]"
Use OpenRouter for example
# in character.ts
modelProvider: ModelProviderName.OPENROUTER,
# in character.json
"modelProvider": "openrouter",
Edit environment variable
OPENROUTER_API_KEY="sk-xx-xx-xxx"