Description
# SmartTraderAI
SmartTraderAI adds an AI-powered merchant to Minecraft. Instead of fixed villager trades, you can talk, negotiate, and haggle directly through chat.
This is my first mod, built for NeoForge 1.21.1. Feedback is always welcome!
### How to Use
1. Get a free API key from [Groq Console](https://console.groq.com/keys) (recommended) or [OpenRouter](https://openrouter.ai/).
2. In-game, set your key: `/trader key groq <YOUR_KEY>`
3. Start trading: `/trader 10 iron for 1 diamond`
### Features
- Dynamic chat bargaining and smart counter-offers.
- Multi-item shopping cart (trade multiple different items at once).
- Retains trade memory while negotiating back and forth.
- Supports Groq, Google Gemini, OpenRouter, and OpenAI.
- Compatible with custom modded items (use F3 + H for exact registry IDs).
- Inventory verification prevents trades if items are missing.
Commands
- `/trader <offer>` : Propose a trade or talk to the merchant.
- `/trader key <provider> <key>` : Save an API key (groq, gemini, openrouter, openai).
- `/trader provider <name>` : Switch active AI provider.
- `/trader model <name>` : Change active AI model.
- `/trader reset` : Clear trade memory.
- `/trader status` : View current configuration.
This mod is also available from Modrinth. Link: https://modrinth.com/mod/smarttraderai




