GenerativeAgentsCN  by x-glacier

AI agents simulating human behavior in virtual worlds

Created 1 year ago
307 stars

Top 87.5% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a refactored and deeply localized (Chinese) version of the Generative Agents simulation, built upon the wounderland codebase. It enables Chinese users to run and experiment with AI-driven virtual agents that exhibit human-like behaviors, leveraging local or API-based Large Language Models (LLMs) for a more accessible and maintainable experience.

How It Works

The core approach involves a significant re-architecture and localization of the original Generative Agents simulation. Prompts have been rewritten to utilize Chinese LLMs (like Qwen or GLM-4), optimizing dialogue logic and agent interactions for a Chinese context. Key features include support for local LLM deployment via Ollama, breakpoint recovery for interrupted simulations, and a playback interface that generates timeline and dialogue summaries in Markdown format.

Quick Start & Requirements

  • Installation: Clone the repository (git clone https://github.com/x-glacier/GenerativeAgentsCN.git), set up a Python 3.12 virtual environment (e.g., using Conda), and install dependencies (pip install -r requirements.txt).
  • LLM Configuration: Modify generative_agents/data/config.json to specify either a local Ollama model or an OpenAI-compatible API endpoint, including api_key and base_url if applicable.
  • Running Simulation: Execute python start.py --name <simulation-name> --start "YYYYMMDD-HH:MM" --step <steps> --stride <minutes>.
  • Playback: Generate playback data with python compress.py --name <simulation-name>, then run the replay server with python replay.py and access http://127.0.0.1:5000/ in a browser.
  • Prerequisites: Python 3.12, a configured LLM (local or API), and necessary Python packages. Map modification requires understanding the maze.json format or using provided tools.

Highlighted Details

  • Deep localization for Chinese LLMs, including support for Qwen3 and DeepSeek-R1.
  • Full local deployment capability via Ollama integration for LLMs and embeddings.
  • "Breakpoint recovery" feature allows resuming interrupted simulations.
  • Agent activities and dialogues are saved to Markdown files for easy review and playback.

Maintenance & Community

The README does not provide specific details regarding notable contributors, community channels (like Discord/Slack), or a public roadmap.

Licensing & Compatibility

The provided README does not specify a software license. This lack of licensing information may pose compatibility concerns for commercial use or integration into closed-source projects.

Limitations & Caveats

The process for creating custom maps is not fully automated and requires manual configuration or the use of external tools like tiled_to_maze.json. The project is a refactor aimed at maintainability and localization, implying potential differences or simplifications compared to the original research implementation. Crucially, no software license is stated.

Health Check
Last Commit

5 months ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
1
Star History
42 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.