Skip to content

AI Mode ​

Trade with natural language in Telegram — no buttons needed

AI Mode turns the TrenchTools Telegram Bot into a conversational trading assistant. Instead of navigating inline keyboards, just type what you want and GPT-4o-mini handles the rest.

Getting Started ​

  1. Open @TrenchToolBot on Telegram
  2. Unlock your vault with your PIN
  3. Tap AI Mode in the main menu, or send /ai
  4. Start typing naturally!

TIP

Type exit or tap the Exit AI Mode button at any time to return to the standard button interface.

How It Works ​

AI Mode uses OpenAI's GPT-4o-mini with tool calling to interpret your messages and route them to the bot's existing trading functions. The AI maintains conversation context so you can have multi-step interactions.

You: "Buy 0.5 SOL of DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
AI:  I'll buy 0.5 SOL of BONK on Solana. Fee: 1.5%. Shall I proceed?
You: "Yes"
AI:  Done! Bought BONK for 0.5 SOL. TX: 4xK9...abc. Fee: 0.0075 SOL.

The AI always asks for confirmation before executing any buy or sell — it will never trade without your explicit approval.

Capabilities ​

ActionExample Prompt
Buy tokens"Buy 0.5 SOL of [CA]"
Sell tokens"Sell 50% of my BONK" or "Sell all [CA]"
Check balance"What's my balance?"
View positions"Show my positions"
Token info"Check price of [CA]" or "What's the mcap on BONK?"
Switch chain"Switch to BSC" or "Use Base"
List wallets"Show my wallets"
Wallet selection"Buy 1 SOL of [CA] from wallet 2"

Fees ​

AI Mode charges a 1.5% fee per trade (vs 0.75% in standard mode). The higher fee covers the LLM API costs for processing your natural language requests.

ModeFee
Standard (buttons)0.75%
AI Mode1.5%

INFO

The fee only applies to actual trades (buys and sells). Balance checks, token lookups, and other read-only actions are free.

Safety ​

  • Confirmation required — The AI always asks before executing trades
  • Max trade limit — Single trades are capped at 100 SOL (or equivalent native token)
  • Vault protection — Your vault must be unlocked before AI Mode can trade
  • No key exposure — The AI never reveals private keys or seed phrases
  • Conversation isolation — Each user has their own conversation history

Multi-Chain Support ​

AI Mode works across all supported chains. Tell the AI to switch:

  • "Switch to Solana"
  • "Switch to BSC"
  • "Switch to Base"
  • "Switch to SUI"

The AI will confirm the chain switch and all subsequent trades use the new chain.

Tips ​

  • Be specific with token addresses — paste the full contract address for best results
  • Use wallet indices for multi-wallet setups: "Buy from wallet 3"
  • Ask for help — say "What can you do?" to see all capabilities
  • Chain context persists — after switching chains, you don't need to specify it again
  • Conversation memory — the AI remembers recent context within the session (up to 20 messages)

Configuration ​

Environment Variables ​

VariableDefaultDescription
OPENAI_API_KEY—Required. Your OpenAI API key
AI_MODE_FEE_BPS150Fee in basis points (150 = 1.5%)

WARNING

AI Mode requires a valid OpenAI API key. If the key is not configured, the AI Mode button will show "not configured" when tapped.

Released under the MIT License.