Skip to content

Enhanced version of AI Town with Map Editor

License

Notifications You must be signed in to change notification settings

Agent-Town/agent-town

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,157 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eliza Town 🏠💻💌

A fork of AI Town powered by ElizaOS.

Eliza Town Banner

Eliza Town is a virtual world where players can create their own unique ElizaOS Agents and watch them live, interact, and evolve autonomously in a pixel-art town.

Unlike standard AI Town, Eliza Town integrates the powerful ElizaOS framework, allowing for:

  • 🧠 Deep Personality: Create agents with distinct personalities, bios, and styles.
  • 🎨 Visual Customization: Choose from diverse pixel art sprites for your agents.
  • 🗣️ Real Interaction: Chat with your agents and watch them interact with each other using the ElizaOS engine.
  • 🔗 External Connection: Your in-game agents run on your own ElizaOS instance (Railway, Cloud, or Local).

🚀 Key Features

  • Create Custom Agents: Use the in-game UI to spawn new agents. Connect them to your ElizaOS backend.
  • MMO Experience: (Coming Soon) Persistent world where players can visit each other's towns.
  • Dynamic Conversations: Agents remember history and context thanks to ElizaOS's memory system.

🛠️ Stack

Component Technology
Agent Engine ElizaOS
Game Engine & Database Convex
Rendering PixiJS
Authentication Clerk (Optional)
Music Generation Replicate

🏁 Installation Guide

Prerequisites

  • Node.js 18+ (We recommend using nvm)
  • A Convex account (free tier available)

Step 1: Clone & Install

git clone https://github.com/cayden970207/eliza-town.git
cd eliza-town
npm install

Step 2: Configure Convex Backend

  1. Initialize Convex (this will prompt you to log in if needed):

    npx convex dev

    This starts the development backend and syncs your functions.

  2. Set environment variables in the Convex Dashboard or via CLI:

    # Required: ElizaOS Server URL
    npx convex env set ELIZA_SERVER_URL "https://fliza-agent-production.up.railway.app"
    
    # Optional: For character generation features
    npx convex env set GOOGLE_API_KEY "your-google-api-key"
    npx convex env set REPLICATE_API_TOKEN "your-replicate-token"

Step 3: Run the Game

Start the frontend development server:

npm run dev

Visit http://localhost:5173 to enter Eliza Town!


🔌 ElizaOS Server Configuration

By default, Eliza Town connects to a shared ElizaOS server hosted by the project maintainers. This allows you to start playing immediately without additional setup.

Using Your Own ElizaOS Server (Optional)

If you want full control over your agents or want to customize the AI behavior:

  1. Deploy ElizaOS using one of these methods:

  2. Update the environment variable:

    npx convex env set ELIZA_SERVER_URL "https://your-eliza-server.com"
  3. Ensure your ElizaOS server has an LLM configured (e.g., OpenAI API key).


🤖 Creating Agents

  1. Click the "New Agent" button in the top menu.
  2. Select a Sprite: Browse the carousel to pick a pixel art avatar.
  3. Define Personality: Choose tags (e.g., Friendly, Mysterious) and write a Bio.
  4. Spawn: Click create, and your ElizaOS agent will appear in the world!

🧑‍💻 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes
  4. Run tests: npm test (if available)
  5. Submit a Pull Request

Project Structure

├── convex/          # Backend functions and schema
│   ├── elizaAgent/  # ElizaOS integration
│   └── agent/       # Conversation logic
├── src/
│   ├── components/  # React components
│   └── lib/         # Utilities and registries
├── data/            # World data and maps
└── public/assets/   # Runtime assets (sprites, tilesets)

Credits

This project stands on the shoulders of giants:


License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Enhanced version of AI Town with Map Editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.6%
  • CSS 2.8%
  • JavaScript 1.9%
  • Other 0.7%