A friendly Python bot that connects to Habbo/Nitro servers and chats with users using AI! Create an intelligent virtual companion that can walk around, dance, and have natural conversations.
This bot connects to Habbo/Nitro protocol servers and:
- 💬 Chats naturally with users using OpenAI's GPT-4o-mini
- 🚶 Walks around rooms and follows users
- 💃 Dances and performs actions like waving, laughing, sitting
- 🧠 Remembers conversations within each room
- 🎯 Responds to commands like "come to me" and "dance"
- 🗺️ Navigates intelligently with pathfinding
git clone https://github.com/Gurkengewuerz/nitro-ai-agent.git
cd nitro-ai-agent
pip install -r requirements.txtpython main.pyThis runs a simple bot that responds to chat commands like "hello" and "dance".
Get an OpenAI API key from platform.openai.com, then:
python ai_main.py --openai-key "your-api-key-here" --username "MyBot"You'll need these to connect:
- SSO Ticket: Authentication token from your Habbo/Nitro server
- Config URL: Your server's configuration endpoint (usually
http://yourserver.com/renderer-config.json)
- OpenAI API Key: Get from OpenAI's website
Create a .env file:
OPENAI_API_KEY=sk-your-key-here
SSO_TICKET=your-server-ticket
CONFIG_URL=http://localhost:3000/renderer-config.json
USERNAME=YourBotNameOr pass them as arguments:
python ai_main.py --sso-ticket "TEST123" --config-url "http://localhost:3000/renderer-config.json"Chat with your bot! It responds to:
- "hello" → Greets the user
- "dance" → Starts dancing
- "stop" → Stops dancing
- "come to me" → Walks over to the user
- "sit near me" → Finds a chair nearby
- Plus any natural conversation with the AI version!
main.py- Simple demo bot (no AI needed)ai_main.py- Full AI-powered botPROMPT.txt- Customize your bot's personality heresrc/- All the code that makes it work
# Basic bot
python main.py
# AI bot with local server
python ai_main.py --openai-key "sk-..." --sso-ticket "TEST123"python ai_main.py \
--openai-key "sk-your-key" \
--sso-ticket "your-production-ticket" \
--config-url "https://your-server.com/renderer-config.json" \
--username "ProductionBot"python ai_main.py --test-mode --username "TestBot"Bot won't connect?
- Check your SSO ticket is valid
- Verify the config URL works in your browser
- Make sure the server is running
AI not responding?
- Verify your OpenAI API key
- Check you have credits in your OpenAI account
- Look for error messages in the console
Can't find rooms?
- Ensure your bot has permission to enter public rooms
- Try different room search categories
Edit PROMPT.txt to change your bot's personality! Make it:
- Funny and playful
- Helpful and informative
- Roleplay as a character
- Follow specific themes or topics
- This is for educational and research purposes
- Respect the rules of any server you connect to
- Be considerate of other users
- Monitor your OpenAI API usage and costs
GNU Affero General Public License v3.0 - See LICENSE file.