GenerativeAgentsCN: Stanford's AI Town Rebuilt for Chinese LLMs with Ollama Support
本项目为Generative Agents项目的重构+深度汉化版本,旨在为中文用户提供一个利于维护的基础版本,以便后续实验或功能拓展。
At a glance
- What is it?
- GenerativeAgentsCN is a refactored and fully Chinese-localised version of the Stanford Generative Agents project, replacing English prompts with Chinese-language templates and adding local deployment through Ollama, breakpoint resume, and support for Qwen and DeepSeek model families. It is designed for Chinese researchers who want a maintainable base for experimenting with LLM-driven social simulation.
- Who is it for?
- GenerativeAgentsCN suits Chinese researchers and developers who want to experiment with the Stanford Generative Agents architecture using Chinese language models without the cost and latency of API-based English models. The requirement for Ollama and compatible hardware makes it unsuitable for environments without a capable local GPU or a fast API endpoint.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 6 months ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 1, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Background: Stanford Generative Agents and the Chinese Fork
In August 2023, Stanford University and Google open-sourced Generative Agents, a virtual world populated by 25 agents driven entirely by a language model (ChatGPT in the original). The agents autonomously organise social events, hold meetings, and exhibit patterns resembling human daily life.
The original codebase's engineering quality is low, making it difficult to maintain or extend. GenerativeAgentsCN builds on an intermediate refactor called wounderland by Archermmt, which the README describes as having significantly better code quality than the original. On top of wounderland, x-glacier adds complete Chinese localisation of all prompts, optimisations for the Qwen2.5 and Qwen3 model families, Ollama API support for local deployment, breakpoint resume, and a replay interface that saves agent activities and conversations to a Markdown timeline.
The rationale given in the README is that Chinese language model capability has advanced enough to handle this task, making it possible to run entirely in Chinese without mixing languages, which the README identifies as a source of context confusion for the LLM.
Model Configuration and Local Deployment
The project defaults to Ollama for running local quantised models. The default language model as of the 2026-01-15 update is `qwen3:4b-instruct-2507` and the default embedding model is `qwen3-embedding:0.6b`, chosen to reduce VRAM usage and improve inference speed.
Configuration is in `generative_agents/data/config.json`. Two options are documented:
1. Ollama with a local quantised model: set `base_url` and `model` to match the Ollama instance. Qwen model download instructions are in `docs/ollama.md`. 2. OpenAI-compatible API: change `provider` to `openai` and set `model`, `api_key`, and `base_url` according to the API provider's documentation.
The Qwen3 and DeepSeek-R1 families are supported with a specific fix: those models emit `<think>` tags in their output. The 2025-06-02 update added handling to strip these tags from responses before they are used as agent inputs.
The README credits Findworth for contributing a 2026-01-15 pull request that replaced regular-expression parsing with pydantic model validation.
Installing and Running the Virtual Town
Start by cloning the repository:
git clone https://github.com/x-glacier/GenerativeAgentsCN.git
cd GenerativeAgentsCNCreate and activate a virtual environment, then install dependencies:
conda create -n generative_agents_cn python=3.12
conda activate generative_agents_cnpip install -r requirements.txtThe requirements include openai 2.15.0, llama-index 0.14.12, Flask 3.1.2, and magentic 0.41.0, among others.
To start the simulation, navigate to the `generative_agents` directory and run:
python start.py --name sim-test --start "20250213-09:30" --step 10 --stride 10The `name` parameter sets a unique identifier for later replay. `start` sets the in-simulation starting time. `step` sets how many iterations to run before stopping. `stride` is the in-simulation time per iteration in minutes; with `--stride 10`, simulation time advances 10 minutes per step. An interrupted simulation can be resumed with the `--resume` flag, which restarts from the last checkpoint.
Running the Replay Server
After a simulation finishes, compress the results:
python compress.py --name sim-testThis creates `movement.json` in `results/compressed/sim-test/` and also generates `simulation.md`, a Markdown document presenting each agent's status and conversations as a timeline.
To view the animated replay in a browser, start the Flask replay server:
python replay.pyThen open `http://127.0.0.1:5000/?name=sim-test` in a browser. The replay can be navigated with keyboard arrow keys. URL parameters control the experience: `step` sets the starting frame (0 for the beginning), `speed` runs from 0 (slowest) to 5 (fastest), and `zoom` sets the map scale (default 0.8). A full-speed replay from the start with reduced zoom looks like:
http://127.0.0.1:5000/?name=example&step=0&speed=2&zoom=0.6The repository ships a built-in example replay named `example`, generated using qwen2.5:32b-instruct-q4_K_M, so the replay server works without running a simulation first.
Map Editing and Known Limitations
The map format is a `maze.json` file. The original Generative Agents project used a Tiled editor for map creation, but the wounderland upstream project does not provide maze.json generation code. The README documents three approaches for creating new maps:
1. Adapt existing code to parse Tiled editor output (JSON and CSV exports from the tile editor). 2. Write new code to merge Tiled's exported files (`maze_meta_info.json`, `collision_maze.csv`, `sector_maze.csv`) into a maze.json. 3. Use a community tool created specifically for this project by user jiejieje, available at github.com/jiejieje/tiled_to_maze.json.
This is a concrete limitation: creating a custom map requires either writing code or using the community tool, which is not part of the main repository. The replay interface also restricts navigation to keyboard arrow keys only, with no mouse panning.
All agent names and place names in the repository are in Chinese to avoid context mixing. The README notes this is intentional to prevent the LLM from switching to English when it encounters Chinese-English mixed content.
Comparison with the Original Generative Agents and Wounderland
The original Generative Agents project by joonspk-research is the academic reference implementation that demonstrated the behaviour but was not designed for maintenance. Wounderland by Archermmt is a structural refactor of the original that improves code quality without adding Chinese language support.
GenerativeAgentsCN layers Chinese localisation and local model support on top of wounderland. The trade-off is a deeper dependency chain: a bug in wounderland may require a fix in GenerativeAgentsCN before it surfaces. The project has no releases on GitHub and a relatively shallow update history.
For teams that want to run the original English simulation with English models, the wounderland project is the more appropriate starting point. GenerativeAgentsCN is specifically useful when the goal is to run the simulation with a Chinese language model locally, or to experiment with Chinese-language social dynamics in the agent interactions.
Maintenance Status and Licence
The last push to the repository was on 2026-03-12. The repository is not archived, but development has not been active since that date.
The most recent functional update was on 2026-01-15, which added pydantic parsing and changed the default models to the Qwen3 series. The 2025-06-02 update added DeepSeek-R1 and Qwen3 support. There are no GitHub releases; version tracking requires reading the README's changelog section.
The project is licensed under Apache-2.0, permitting use in research and commercial applications. The upstream Generative Agents paper (arxiv.org/abs/2304.03442) by Park et al. should be cited in academic work that builds on this project, as noted in the references section of the README.
Editorial conclusion
GenerativeAgentsCN suits Chinese researchers and developers who want to experiment with the Stanford Generative Agents architecture using Chinese language models without the cost and latency of API-based English models. The requirement for Ollama and compatible hardware makes it unsuitable for environments without a capable local GPU or a fast API endpoint. The last push to the repository was on 2026-03-12, meaning the project is not under active development at this date. Before using it in research, verify that the wounderland upstream dependency is still receiving updates, as GenerativeAgentsCN builds on it.
Frequently asked questions
Can GenerativeAgentsCN run without an internet connection using a local model?
Yes. The project supports fully local deployment through Ollama. Once the Qwen model is downloaded via Ollama, the simulation and the LlamaIndex embedding model both run locally without calling external APIs.
Does GenerativeAgentsCN support resuming an interrupted simulation?
Yes. The start.py command accepts a --resume flag that restarts a named simulation from its last checkpoint, continuing the agents' state from where the simulation stopped.
Which LLM families does GenerativeAgentsCN support?
The README documents support for the Qwen2.5 and Qwen3 families, DeepSeek-R1 (with special handling for think tags in the output), and any provider that exposes an OpenAI-compatible API by setting provider to openai in config.json.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/x-glacier-generativeagentscn)