Model or dataset
x-glacier/GenerativeAgentsCN avatar
x-glacier/GenerativeAgentsCN

GenerativeAgentsCN: pydantic replaced the regex parser and is not in requirements.txt, three models appear across the page, and the maze has no generator

A refactored and thoroughly localized (Chinese) version of the Generative Agents project, providing Chinese-speaking users with a maintainable base for further experiments or feature extensions.

547 stars92 forksPythonApache-2.0

At a glance

What is it?
GenerativeAgentsCN is a Chinese-language refactor of the Stanford generative agents simulation, twenty-five agents living in a small town, translated and restructured so it runs against local models through Ollama's OpenAI-compatible endpoint. It is a third generation in a lineage: the original research repository, then a community rewrite, then this. The dependency file is where the drift shows.
Who is it for?
This is a useful base if your interest is the simulation rather than the software, because the translation work is real: every prompt rewritten in Chinese, the conversation start and stop logic retuned for Chinese models, prompt templates extracted, and the map and character names localised specifically so the model does not slip into English mid-conversation. The lineage is documented honestly, including which upstream author withheld which file.
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 8 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 November 24, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • x-glacier/GenerativeAgentsCN547 ★ · +23
Star history
Repository2026-09-112026-11-24
x-glacier/GenerativeAgentsCN524547

23 Stars in the last 74 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The parser was rewritten with pydantic and the dependency file never mentions it

The dependency file is seven lines, all exact:

code
openai==2.15.0
llama-index==0.14.12
llama-index-embeddings-huggingface==0.6.1
llama-index-embeddings-ollama==0.8.6
llama-index-embeddings-openai==0.5.1
Flask==3.1.2
magentic==0.41.0

There is no `pydantic` in that list. Yet the update log credits a specific contributor with replacing regular-expression parsing with `pydantic` models. So the project's most recent structural change made a library a direct dependency of its own code, and the file that declares dependencies omits it. It will install, because the OpenAI SDK pulls pydantic in transitively, which means the version is whatever that dependency resolves to rather than a choice anyone made here. This is the opposite of what the rest of the file does: seven packages pinned to the patch, one used package floating.

Three models appear, and the committed artefacts need the one the default change avoided

The update log for 2026-01-15 sets the default language model to `qwen3:4b-instruct-2507` and the embedding model to `qwen3-embedding:0.6b`, giving the stated reasons of reducing video memory use and improving inference speed. Two other model names appear later on the same page. The replay data bundled with a release was generated by `qwen2.5:32b-instruct-q4_K_M`, and the replay screenshots were generated by `qwen2.5:14b-instruct-q4_K_M`. So the two large Qwen 2.5 models produced the artefacts a new user sees first, and the change that made the default lighter arrived afterwards. Anyone reproducing the shipped example is running a thirty-two-billion-parameter quantised model, which is the configuration the default change was specifically made to avoid. The log also lists its two entries out of order, with the 2025 date above the 2026 one.

Seven exact pins and nothing else resolved

The environment is created with conda at a stated interpreter version and then populated by the requirements file:

code
conda create -n generative_agents_cn python=3.12
conda activate generative_agents_cn
code
pip install -r requirements.txt

Every direct dependency is fixed to an exact version and no transitive dependency is recorded anywhere. There is no lockfile, no hash pinning, and no constraints file in the repository, whose entire root is `.gitignore`, `LICENSE`, `README.md`, `README_en.md`, `docs/`, `generative_agents/`, and `requirements.txt`. The three llama-index embedding backends and the multi-agent orchestration library each carry their own dependency trees, and those trees resolve to whatever is current at install time. The result is a requirements file that looks rigorous and an environment that is not reproducible, which is worth knowing if you intend to compare two runs against each other.

A Hugging Face embedding backend ships by default in a project that defaults to a local model

Three embedding integrations are declared at once: one for Hugging Face, one for Ollama, one for OpenAI. The default configuration points at the Ollama one, with the embedding model set to a small quantised build served locally. The Hugging Face integration is the one that drags in a transformer stack, and it is installed unconditionally by the requirements file even though the default path does not use it. That is the cost of declaring every backend at the top level rather than in extras, and it lands hardest on the users the default configuration was chosen for, who wanted a local setup with modest hardware requirements. The OpenAI SDK is present for the same structural reason: Ollama exposes an OpenAI-compatible endpoint, so the client is needed to reach a model that is not OpenAI's.

The stride explanation starts at nine o'clock in a command that starts at half past

The simulation is launched like this:

code
cd generative_agents
python start.py --name sim-test --start "20250213-09:30" --step 10 --stride 10

The parameters are then explained one at a time. `name` must be unique per run because it is what the replay looks up later. `stride` is how much simulated time each iteration advances, in minutes, and the explanation of a stride of ten says the clock will move through nine o'clock, ten past, twenty past. The command above starts the town at half past nine on a fixed date in February 2025. So the worked example and the illustration of the same parameter disagree by one interval, and a reader checking the parameter against the example has to decide which is authoritative. The explanation of the replay server's own parameters, by contrast, is consistent, giving a starting step where zero means the first frame, a speed range of zero to five with a default of two, and a default zoom of 0.8.

Three separate processes share one run name and one output directory

The workflow is three commands in one directory. The simulation writes under the name you chose. Then `compress.py --name sim-test` produces replay data, landing a movement file and a Markdown timeline under `results/compressed/sim-test` inside that same directory. Then `replay.py` serves the result on a local address, with the run name passed as a query parameter, along with the starting step, the speed, and the zoom. Two consequences follow from the shape. The run name is the only thing tying the three processes together, with no manifest, so a typo or a mismatched name produces an empty replay rather than an error. And the output directory is also a source directory, since the bundled example data and its Markdown timeline are linked from inside it, meaning a run writes into paths that are part of the repository.

The map has no generator and the fix lives in another repository

The map section opens by stating plainly that the author of the community rewrite never released the code that generates the map file, so there is no supported way to make a new town. Three routes are offered instead. You can adapt the generator from the original research repository to accept data exported from a tiled map editor. You can write your own merger that combines the editor's metadata, collision, and sector files into the format the simulator expects. Or you can use a tool that a contributor named in the text has already built for this project. That third option is the pragmatic one, and it lives at an address in a separate personal repository, whose own name ends in a file extension. So the single largest asset in the simulation is a data file with no generator, the three workarounds are all code you write or code you trust from someone else, and the file that makes the simulation run at all is not reproducible from the code in this repository.

Editorial conclusion

This is a useful base if your interest is the simulation rather than the software, because the translation work is real: every prompt rewritten in Chinese, the conversation start and stop logic retuned for Chinese models, prompt templates extracted, and the map and character names localised specifically so the model does not slip into English mid-conversation. The lineage is documented honestly, including which upstream author withheld which file. Two things to check before you build on it. The dependency file pins seven packages exactly and does not declare the validation library the code now uses, so treat the environment as unpinned and record what pip actually resolves. And note the state of the branch, whose last push is dated 2026-03-12, against an update log whose newest entry is 2026-01-15.

Frequently asked questions

How do I run GenerativeAgentsCN?

Clone the repository, create a conda environment at Python 3.12, install with `pip install -r requirements.txt`, point the config at a local Ollama model, then run `python start.py` from the `generative_agents` directory with a unique run name. Compress the result and serve it with the replay script.

Which language and embedding models does GenerativeAgentsCN use?

The defaults changed to `qwen3:4b-instruct-2507` for the language model and `qwen3-embedding:0.6b` for embeddings, to reduce video memory use. The replay data bundled with a release was generated by `qwen2.5:32b-instruct-q4_K_M` and the screenshots by `qwen2.5:14b-instruct-q4_K_M`.

What does GenerativeAgentsCN require?

`requirements.txt` pins seven packages exactly: the OpenAI SDK, llama-index, three llama-index embedding backends for Hugging Face, Ollama, and OpenAI, Flask, and an orchestration library. Pydantic is not declared even though the update log says it replaced the regular-expression parser.

Where does GenerativeAgentsCN come from?

It is built on a community rewrite of the original Stanford generative agents repository, which is itself built on the research code. The page says the original was hard to maintain and extend, and that the community rewrite is better structured, which is why this one is based on the rewrite rather than the original.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. x-glacier/GenerativeAgentsCN on GitHub
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.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/x-glacier-generativeagentscn.svg)](https://hysenlabs.com/projects/x-glacier-generativeagentscn)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/x-glacier-generativeagentscn.svg)](https://hysenlabs.com/projects/x-glacier-generativeagentscn)

Was this useful?