Plant a world. Watch it grow.
็ป LLM ไธไธชไธ็่ฎพๅฎ๏ผ็ๅฎ่ชๅทฑ้ฟๅบๆๆ
How It Works ยท Chat with Your World ยท Mechanism Systems ยท Design Philosophy
SeedWorld is an emergent world simulation engine. You describe a world, it generates characters with personalities, desires, and grudges โ and then you let go.
No pre-written scripts. No behavior trees. Characters make their own decisions based on who they are, what they want, and who wronged them. Stories grow from chaos, all on their own.
Think of it as a terrarium for civilizations. You build the jar, add the soil, and watch what grows.
Three steps. That's it.
1. DESCRIBE 2. GENERATE 3. WATCH
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโ
"A mountain Engine spawns Characters scheme,
village where 10 characters negotiate, betray,
three clans with personalities and form alliances
fight for goals, and tangled โ all by themselves.
power..." relationships.
You type a world description. The engine creates characters, places them in your world, and advances time tick by tick. Each tick, every character independently decides what to do โ powered by an LLM that sees their personality, desires, relationships, memories, and pressures. The results feed back into 12 interlocking mechanism systems that track reputation, resources, tension, memes, and more.
No one tells anyone to betray anyone. But when a vengeful person faces their enemy while resources are running out โ betrayal just happens.
Here is an actual exchange from a simulation set in a mountain village where three clans contest for power. No one scripted this:
Tick 1 โ Linye leans in close and whispers to Moheng: "The scraps from the Back Valley poison pool โ can you give the nod? Mutually beneficial."
Tick 1 โ Qinghe immediately pushes back, invoking protocol: "Moheng the Enforcer is right here. What's with the private deal?"
Tick 2 โ Moheng plays both sides, agreeing to each while secretly checking the ledgers. The golden-bell leaf shipment numbers don't add up...
Tick 3 โ Linye notices Moheng's finger paused on a particular page of the ledger. She knows her moment has come.
Three characters with different desires, under resource pressure, navigating their own way to this moment. The engine just gave them context and let them decide.
Want to shake things up? Type directly into the chat and watch your world react.
The chat system works like this:
- You type an event โ "A massive earthquake shakes the valley" or "A stranger arrives carrying a sealed letter"
- The LLM interprets it โ Your message becomes a world event with a type, intensity, and affected characters
- The world ticks forward โ Agents react to the event naturally on the next tick, weaving it into their ongoing plans and conflicts
It is a conversation with a living world. Say something, and the world answers back through its characters.
Every world begins at Tick 0 with a genesis event โ a narrative seed that captures the essence of your world. This is not just flavor text; it is the foundation that every character, every social pressure, and every future event builds upon.
When you create a world, the engine generates:
- A vivid environment description
- Historical macro events that shaped this place
- Dominant narratives the inhabitants believe in
- Social pressures that drive conflict
- The institutions that hold (or fail to hold) power
From this soil, characters grow. Their goals, their grudges, their alliances โ all rooted in the world you described.
โโโโโโโโโโโโโโโ
โ World State โ
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
โ Agent A โ โ Agent B โ โ Agent C โ โ Each gets a tailored prompt
โ (LLM) โ โ (LLM) โ โ (LLM) โ (desires, scene, pressure, relationships)
โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ
โ โ โ
โ action + system_feedback
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Mechanism System Router โ
โ Reputation ยท Resources ยท Tensionโ
โ Memes ยท Memory ยท Knowledge ยท ...โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโ
โ World State' โ โ Persisted, enters next tick
โโโโโโโโโโโโโโโ
The engine never tells the LLM "create conflict." It does two things:
- Provides rich context โ who you are, what you want, who is near you, your history with them, which resources are dwindling, how people see you
- Lets the LLM decide โ then routes the results back through the mechanism systems
When someone filled with resentment faces their rival while supplies run low โ conflict does not need to be scripted.
Characters at the same location execute in two waves. The first wave acts, and the second wave sees what happened and can respond. This lets dialogue, confrontation, and negotiation unfold naturally within a single tick.
12 systems run in parallel, persist across ticks, and form closed feedback loops with the LLM.
Every time an agent acts, the LLM also self-evaluates the social impact of the action:
{
"action": { "type": "whispered negotiation", "target": "moheng" },
"dialogue": "The scraps from the Back Valley โ can you give the nod?",
"system_feedback": {
"reputation_impact": [{ "dimension": "trustworthiness", "delta": -0.05, "reason": "bypassing protocol" }],
"resource_action": { "resource": "poison materials", "strategy": "cooperate" },
"tension_effect": "building",
"meme_spread": { "content": "Rules are for the weak", "category": "belief" }
}
}This feedback routes to the corresponding systems. System state changes inject into the next round's prompt. The loop closes.
| System | What It Does | How It Shapes Characters |
|---|---|---|
| Reputation | Tracks trust / competence / status; witnesses spread gossip to friends | "Your credibility is slipping. Qinghe is taking your place." |
| Resource Competition | Dynamic resource pools with 6 strategies (compete / cooperate / steal...) | "Supplies at 20%. Roughly 3 cycles until depletion." |
| Dramatic Tension | Detects conflict from relationships and events; auto-accumulates and releases | "The crisis between you and Moheng is reaching its peak." |
| Meme Propagation | Beliefs / rumors / behaviors spread through social networks via SIR model | "Lately everyone's been saying: 'Rules are just chains.'" |
| Social Roles | Assigns emergent roles based on personality (leader / mediator / innovator...) | "As mediator, you should resolve disputes and foster harmony." |
| Cognitive Bias | Records LLM-reported decision biases; tracks group-level cognition | Analysis layer โ surfaces systematic thinking patterns |
| Attention | Finite attention allocation; high-reputation agents get noticed more | Affects who notices whom and how information flows |
| Emergence Detection | Detects phase transitions, self-organization, synchronization, polarization | Spots macro-level tipping points and pattern shifts |
| Knowledge Graph | Entity-relationship network with causal chain tracking | Characters see causal links in their prompt context |
| Narrative Recognition | Auto-detects conflict / alliance / betrayal arcs from event streams | Detected story arcs are injected into character context |
| Collective Memory | Detects shared group memories; distills cultural norms | Cultural norms propagate and influence group behavior |
| Hierarchical Memory | Working memory (7 +/- 2) โ Short-term (50) โ Long-term (unlimited) | Important memories consolidate; trivia naturally fades |
Everything in the simulation must obey the world's rules. No smartphones in a medieval setting. No magic in cyberpunk (unless the setting allows it). World rules override real-world logic.
- Wuxia, cyberpunk, medieval, modern office drama โ any world works
- Zero hardcoded character names, resource names, or UI text
- Characters, resources, and culture are all dynamically generated by the LLM
- The resource system starts empty and emerges organically from LLM feedback
- Prompts are written in English (best LLM comprehension)
- Generated content follows
world.config.language - Zero hardcoded strings in the codebase
Do not tell the LLM "create conflict." Show it: your enemy is right here, resources are running out, your status is under threat. Conflict happens on its own.
Fewer rules, more emergence.
All 12 mechanism systems maintain state across ticks. Reputation does not reset. Memories do not vanish. Tension builds until it breaks. No system "starts from zero" each tick.
git clone https://github.com/zmzhace/world-slice.git
cd world-slice
npm installConfigure .env.local:
WORLD_SLICE_API_BASE=your-api-base-url
WORLD_SLICE_API_KEY=your-api-key
WORLD_SLICE_MODEL=your-model-nameCompatible with any OpenAI / Anthropic-compatible API.
npm run dev
# Open http://localhost:3000 โ Create a world โ Advance time โ Watch emergencesrc/
domain/ Type definitions (WorldSlice, PersonalAgentState, NarrativePattern...)
engine/
orchestrator.ts World tick driver
npc-agent-executor.ts Wave execution (co-located agents see each other)
circadian-rhythm.ts Circadian rhythm (who is awake, who is asleep)
reputation-system.ts Reputation (trust / propagation / decay)
resource-competition-system.ts Resource competition (allocation / conflict / cooperation)
dramatic-tension-system.ts Dramatic tension (buildup / eruption / release)
meme-propagation-system.ts Meme propagation (SIR model)
knowledge-graph.ts Knowledge graph (entity relations + causal chains)
...12 mechanism systems total
server/llm/
agent-decision-llm.ts Agent decision prompt construction
agent-generator.ts Character generation (batched + cross-batch relationships)
world-generator.ts World generation
components/ UI components (light, warm theme)
store/ Zustand state management
app/
api/ Next.js API routes
worlds/ Pages
- Next.js 14 + TypeScript (strict)
- LLM API โ compatible with OpenAI / Anthropic interfaces
- Zustand โ state management
- Vitest โ testing
SeedWorld โ We don't write stories. We plant them.