{"id":13456232,"url":"https://github.com/dzoba/gptrpg","last_synced_at":"2025-03-24T09:31:48.186Z","repository":{"id":153211346,"uuid":"628384415","full_name":"dzoba/gptrpg","owner":"dzoba","description":"A demo of an GPT-based agent existing in an RPG-like environment","archived":false,"fork":false,"pushed_at":"2023-05-03T20:23:03.000Z","size":805,"stargazers_count":983,"open_issues_count":9,"forks_count":108,"subscribers_count":33,"default_branch":"main","last_synced_at":"2024-10-28T23:33:55.696Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dzoba.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-04-15T19:26:09.000Z","updated_at":"2024-10-26T08:10:41.000Z","dependencies_parsed_at":"2024-01-14T10:01:49.791Z","dependency_job_id":"8f653682-a8b7-4cf0-afac-e8c32d23fed3","html_url":"https://github.com/dzoba/gptrpg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzoba%2Fgptrpg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzoba%2Fgptrpg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzoba%2Fgptrpg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dzoba%2Fgptrpg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dzoba","download_url":"https://codeload.github.com/dzoba/gptrpg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245243361,"owners_count":20583613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:01:18.221Z","updated_at":"2025-03-24T09:31:48.176Z","avatar_url":"https://github.com/dzoba.png","language":"JavaScript","funding_links":[],"categories":["Others","Agent框架","JavaScript"],"sub_categories":[],"readme":"# GPTRPG\n\n![map of the game](map.png)\n\nThis repo contains two things:\n\n* A simple RPG-like environment for an LLM-enabled AI Agent to exist in\n* A simple AI Agent connected to the OpenAI API to exist in that environment\n\nIt is intended as a proof of concept.\n\n## Running\n\nGPTRPG is intended to be run locally. To run:\n\n1. Make sure you have updated the `agent/env.json` file with your OpenAI API key.  \n2. Only tested with node 16.19.0 \n2. In the `gptrpg` directory run `npm install` to install dependencies for all projects.\n3. Then run `npm start` in the root directory.  This will start the agent and the front-end.  The front-end will be available at `http://localhost:3000`.\n\n## The Environment\nCode for the environment lives in the `ui-admin` directory. It is a React project.\n\nThe environment was made with [Tiled](https://www.mapeditor.org/) map editor.  The files live in `ui-admin/src/assets`.\n\nThe environment is rendered with [Phaser](https://phaser.io/) and the [Grid Engine Plugin](https://annoraaq.github.io/grid-engine/)\n\nThe environment consists of:\n\n* The character (agent)\n* Impassable tiles\n* A plant layer with \"plantable\" tiles, and plants (not currently in use by agent).  Player can plant food on plantable tiles with S key and harvest food with D key.\n\n## The Agent\nCode for the agent lives in the `agent` directory.\n\nThe agent is a simple AI agent that uses the OpenAI API to make decisions.  It communicates with the front-end via a websocket.\n\nThe agent is provided with a list of possible actions, the state of its surroundings, and its internal state (currently only sleepiness is measured).\n\n## Upcoming features\n\n* Multi agent support\n* More agent actions (drink, eat, plant food, harvest food, write poetry, etc.)\n* More agent states (hunger, thirst, etc.)\n* Agent memory\n* Agent goals\n* Agent inventory\n* Deployment to web\n* Human controlled character\n* UI enhancements (agent state, human interactions, etc.)\n\n## Notes\n\nCurrently, GPTRPG runs with the `gpt-3.5-turbo` API.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzoba%2Fgptrpg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdzoba%2Fgptrpg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdzoba%2Fgptrpg/lists"}