gptrpg  by dzoba

Demo of an agent existing in an RPG-like environment

created 2 years ago
990 stars

Top 38.2% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a proof-of-concept GPT-based agent operating within a simple, locally-run RPG-like environment. It's designed for developers and researchers interested in exploring LLM agent behavior and interaction within simulated worlds. The core benefit is a functional demonstration of an AI agent making decisions and interacting with a game environment using the OpenAI API.

How It Works

The system comprises two main components: an RPG environment and an AI agent. The environment, built with React, Tiled, Phaser, and the Grid Engine Plugin, features a character, impassable tiles, and plantable layers. The agent, a Node.js application, connects to the OpenAI API (specifically gpt-3.5-turbo) via websockets to receive environmental state and available actions, then outputs decisions. This architecture allows the LLM to drive agent behavior in a visually represented, interactive setting.

Quick Start & Requirements

  • Install dependencies: npm install in the gptrpg directory.
  • Run: npm start in the root directory.
  • Prerequisites: Node.js (tested with 16.19.0), OpenAI API key (configured in agent/env.json).
  • Access: Frontend available at http://localhost:3000.

Highlighted Details

  • Demonstrates LLM agent interaction within a simulated RPG environment.
  • Utilizes OpenAI API (gpt-3.5-turbo) for agent decision-making.
  • Environment built with React, Tiled, Phaser, and Grid Engine Plugin.
  • Agent communicates with the frontend via websockets.

Maintenance & Community

No specific community channels, roadmap, or contributor information is provided in the README.

Licensing & Compatibility

The license is not specified in the README.

Limitations & Caveats

The project is explicitly a proof of concept and currently only supports gpt-3.5-turbo. Upcoming features like multi-agent support, expanded actions, agent memory, and goals are not yet implemented. The README notes that the plant layer is not currently in use by the agent.

Health Check
Last commit

2 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.