Skip to content

Gurkengewuerz/nitro-ai-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Nitro AI Agent

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.

✨ What Does It Do?

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

🚀 Quick Start

1. Install

git clone https://github.com/Gurkengewuerz/nitro-ai-agent.git
cd nitro-ai-agent
pip install -r requirements.txt

2. Try the Basic Bot (No AI Required)

python main.py

This runs a simple bot that responds to chat commands like "hello" and "dance".

3. Set Up AI Bot (Requires OpenAI API)

Get an OpenAI API key from platform.openai.com, then:

python ai_main.py --openai-key "your-api-key-here" --username "MyBot"

🔧 Configuration

Required Settings

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)

For AI Features (Optional)

Easy Setup with Environment Variables

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=YourBotName

Or pass them as arguments:

python ai_main.py --sso-ticket "TEST123" --config-url "http://localhost:3000/renderer-config.json"

🎮 What Can Users Do?

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!

📁 Project Files

  • main.py - Simple demo bot (no AI needed)
  • ai_main.py - Full AI-powered bot
  • PROMPT.txt - Customize your bot's personality here
  • src/ - All the code that makes it work

🛠️ Examples

Local Development Server

# Basic bot
python main.py

# AI bot with local server
python ai_main.py --openai-key "sk-..." --sso-ticket "TEST123"

Production Server

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"

Test Mode (No AI Calls)

python ai_main.py --test-mode --username "TestBot"

⚡ Troubleshooting

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

🎨 Customization

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

⚠️ Important Notes

  • 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

📄 License

GNU Affero General Public License v3.0 - See LICENSE file.

About

A Habbo client AI agent for interacting with other users naturally

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages