Multiple Agents
Each resident is treated as an agent.
An agent has:
- id and name,
- role,
- personality,
- goals,
- relationships,
- memory,
- current position,
- pending visitor task,
- speech bubble / emote state.
Agent loop
Each tick:
- Perceive nearby residents and location.
- Check sleep/viewer state.
- Prioritize visitor tasks.
- Use local ambient behavior when alone.
- Use the LLM when social context or task complexity needs it.
- Execute one action.
Time-aware speech
The town day is split into six periods: dawn, morning, midday, afternoon, evening, and late night. LLM decisions receive a topic hint for the current period, and the no-LLM ambient lines are also written per period, so a baker talks about warming ovens at dawn and drifts into quiet reflection late at night. Topics exist in English and Chinese.
Actions
Supported actions include:
SPEAKMOVEIDLEEMOTE
Visitor tasks
Visitor instructions can become structured pendingTask objects. The task drives follow-up actions such as moving to another NPC, notifying them, gathering at a location, or returning to normal routine.