GAIAWM Β· OPEN FANTASY MAPS

The Ghost in
the Shell

Embodied agents for living worlds β€” where the mind is a language model and the body is a constellation of small, honest organs.

anima ex machina
Toril Β· Sword Coast Β· live simulation
02 Β· The problem

Agents without bodies

The prompt loop

Most "agents" are a chat loop with tools bolted on. No place, no cost, no fatigue β€” nothing grounds the next token in a world.

The cheating NPC

Game characters read the game state directly. They know where you are because the engine tells them β€” perception is a fiction.

The unmeasurable mind

When an agent claims it can do something, nothing checks. Confidence is never scored against outcome β€” so it never has to be true.

03 Β· The thesis

Cognition is not the model in isolation.
It is an inference engine Γ— an embodied substrate.

the ghost

The LLM β€” a generalised pattern-matcher that knows nothing of the world directly. Swappable. Substrate-independent. It only knows what its body delivers.

the shell

Eight small MCP services, each with one job and a stable, typed surface. Not microservice fashion β€” anatomy. Replace an organ and the same ghost becomes a different agent.

04 Β· The anatomy

Each service is an organ

organin the bodyin the shell
energymetabolism, fatiguetoken-coupled drain Β· hunger, thirst, stress Β· rest to recover
memoryhippocampussalience Β· eβˆ’Ξ”t/Ο„ β€” visited places and outcomes fade; the least-vivid is forgotten first
skillsmotor learningatomic capability, clamped levels
abilitiescomposed capabilityformulas over skills β€” intimidate = max(strength, charisma)
inventoryextended embodimentitems unlock affordances; tools are part of the body
commssocial cognitionspeech, rumour, teaching β€” skills flow between agents
worldsenses & musclesthe only channel to the world β€” and it never leaks coordinates
calibrationself-knowledgerecords every (belief, outcome) pair β€” the empirical surface
05 Β· The plate

One ghost, eight organs, one world

ghost β€” core orchestrator + two LLMs
perceive β†’ recall β†’ energy gate β†’ decide (System 1) β†’ vet (System 2) β†’ act β†’ remember
energy
metabolism
memory
decay
skills
motor
abilities
composed
inventory
tools
comms
social
calibration
belief↔fact
world
senses
gaia β€” the world model
PostGIS / SpatiaLite geography Β· LLM-narrated perception Β· geomqtt position fanout Β· Toril, Golarion, Barovia…

Fig. 1 β€” every behaviour-shaping number is an env var; every organ is swappable without touching the rest.

06 Β· Position blindness

A brain has no access to its own coordinates

Not a security control β€” a constraint of embodiment. The world organ takes the GeoJSON surrounding the agent and returns only its narration, in the culture of the place. No layer names, no numbers, no coordinates survive. Location must be inferred, the way a person does it.

what the system knows
lon βˆ’79.7143 Β· lat 48.8344
features: roads Β· urban_buildings Β·
  cities Β· rivers Β· oceans Β· politics
geometry Β· pov Β· GeoJSON Β· GEOADD …
what the ghost perceives β€” the voice of Toril (illustrative)
"The salt wind says the sea is near.
 Paved stone underfoot β€” the High Road,
 by the wear of it β€” and past the
 hedgerows, chimney smoke: a walled
 city, half a morning's walk north."

And what it has seen it holds only as episodic memory of visited places β€” which fades. The ghost has no map, only a remembered geography. That claim would be hand-waving without a mechanism β€” so here is the mechanism, next slide.

the culture prompt, verbatim: "You describe places the way someone would when looking around. You never mention maps, coordinates, GeoJSON, geometry, layers, or data. You are at ground level. You are in a medieval setting where magic is significant." β€” each world carries its own voice.

07 Β· Mechanism

Forgetting is a policy, not a metaphor

a real record β€” kael, read from Redis just now
write (3 days ago):
 { "content": "world.navigate: failure",
   "kind": "episodic", "salience": 0.6 }

recall (now):
 salience_now = 6.4 Γ— 10⁻³⁡   β€” gone.
the law & the policy
salience_now = sβ‚€ Β· e^(βˆ’Ξ”t/Ο„)   Ο„ = 3600 s
 after 1 h β†’ 37%   Β·   3 h β†’ 5%   Β·   3 d β†’ 10⁻³⁡

sβ‚€ encodes importance at write time:
 0.95 night plan Β· 0.7 hard lesson Β· 0.6 routine step

cap: 200 entries β€” when full, the entry with the
 lowest CURRENT salience is evicted, never the
 one just written. recall + boost re-anchor:
 sβ‚€ ← salience_now + Ξ”, tβ‚€ ← now   (rehearsal)

So after a day of wandering, what survives is not a log of the day β€” it is the day's structure of importance: plans outlive lessons, lessons outlive steps, and anything unrehearsed returns to silence. Same shape as us; fully inspectable, fully tunable (Ο„, cap, salience table are env vars).

08 Β· Metabolism

Thinking is tiring

Every token the ghost burns drains the body that thinks it. Actions cost; rest restores. Fatigue is not flavour β€” it changes what the mind is allowed to do.

10k
tokens β‰ˆ one full unit of energy
< 0.3
low energy β†’ the prompt itself turns urgent
< 0.1
critical β†’ forced rest, no LLM call at all
eβˆ’Ξ”t/Ο„
memories fade on the same clock
09 Β· Two minds

System 1 acts. System 2 vetoes.

A small fast model lives every tick; a slower judge vets anything non-trivial β€” Kahneman's dual process, running live. Recorded verbatim from the simulation:

system 1 Β· tickBonsai-1.7B Β· local, 0.2 GB, 1-bit
ACTION: investigate
system 2 Β· feasibilityTernary-Bonsai-1.7B Β· local
NO. β€” skill 4, needed 8: judged infeasible
the bodydispatch
impulse vetoed β†’ the agent waits.
10 Β· Affordances

The world pushes back

Gibson's affordances, made executable: items unlock actions, skills gate them, and the world β€” not the model β€” decides what actually happens. Oceans are not walkable. Night makes hiding harder. A rope makes a cliff climbable.

p(success) = (1 βˆ’ difficulty)order

A plan of n causal steps only succeeds if every step does. The ghost's confidence is single-step; the world compounds. That gap is about to matter.

11 Β· The measurable mind

Belief, scored against the world

Every action logs a (predicted confidence, actual outcome, plan order) triple. 600 resolved actions, live simulation:

predicted β€” what the ghost believed actual β€” what the world granted
order 1single step Β· n=311
order 2two steps Β· n=233
order 3three steps Β· n=56
data table
ordernpredictedactualbias
13110.500.45+0.04
22330.290.11+0.18
3560.330.02+0.32

Overconfidence grows with plan depth. Calibrated on one step, wrong by a third at three β€” the dual-process thesis, measured, on any model you plug in.

framework
Montanari et al. β€” Affordance Order, Planning Depth, and Epistemic Uncertainty: a Dual-Process Model for LLM-Based Agents in Persistent Environments. GaiaWM, 2026 (draft)
12 Β· Agentic psychometry

Ninety years of measurement science, pointed at agents

the instrument

The Vineland-3 (VABS-3) has quantified human adaptive functioning since 1936. We adapt its methodology to LLM agents with world models β€” because agent deployment is adaptive behaviour, not question-answering.

what survives adaptation

The hierarchical domain/subdomain structure and polytomous scoring stay. Age norms become capability tiers; caregiver observation becomes performance-frequency over N runs; 72 LLM-native items, scored by a Graded Response Model.

a fourth domain

Agentic Functioning β€” capabilities with no human analogue: world-model maintenance Β· tool use Β· context management Β· affordance discovery. The shell is the apparatus; this is the instrument you read it with.

reference
Montanari, Gigli, Zyrianoff & Di Felice β€” A Psychometrically-Grounded Assessment Framework for LLM Agents with World Models: Adapting the Vineland-3 Methodology. GaiaWM Β· Univ. of Bologna (DISI/ARCES) Β· NeurIPS 2026 Evaluations & Datasets track (in submission)
13 Β· Identity

Same shell, different ghost

πŸœ‚ soul & 🎯 goal

Imprint who the agent is and what it wants. A scout souled to "map the roads out of town" chooses navigate β€” unprompted.

a mind across machines

Each ghost picks a duo: think on a 0.2 GB local model, verify on a frontier model an ocean away. The ghost is substrate-independent β€” the shell doesn't care where thought is hosted.

swap an organ

Trade salience-decay memory for summarisation; trade the affordance registry for free-form inspection. Identical inference engine, different shell β†’ a different someone.

14 Β· The living lab

Running today, on Toril

a real geography

Ghosts wander the Sword Coast β€” actual Forgotten Realms geometry. They hug coastlines, follow the High Road, and never walk into the sea.

the operator's table

A live dashboard: every organ's state, a map of wandering minds, and a firehose of every thought and its consequence.

a science instrument

The calibration organ exports a labelled dataset β€” any model dropped into the shell becomes comparable to any other, on the same benchmark.

one door to every mind

An OpenAI-compatible gateway exposes every model on every infrastructure β€” local, cloud, free-tier β€” as a single provider.

15 Β· Next: the world remembers

When a ghost builds a house

Today the map is read-only β€” nothing a ghost does can change it. The next move: versioned geometry. Every change to the world becomes a dated, attributed fact, and the map becomes history in progress.

changesets

Who built it, with which action, at which hour β€” and the belief that made it: the calibration prediction rides in the changeset. "He was 0.8 sure the roof would hold. Version 3 is a ruin."

one schema for all history

Designer-authored layers are version 0; agent changes are later versions. Read the world as of any moment β€” agent actions become historiography.

forkable worlds

Branch the world, break the dam, run the population for a simulated week, measure, merge or discard. Hypotheticals become experiments.

Building is embodied labour β€” skill-gated, material-gated, energy-paced over ticks; a failed roll wastes real timber, and a bridge, once built, makes water walkable. status: designed, not yet running.

16 Β· Beyond the Sword Coast

The same shell, real stakes

own a ghost β€” shipped

pip install ghostkit β€” adopt an embodied agent in the shared world, imprint its soul and goal, and run its mind on your own keys, or from the GhostDeck desktop. The world is shared; the minds are private.

emergency simulation

Rehearse floods and evacuations on real geography: position-blind locals, rumour spreading agent-to-agent, cascading consequence β€” and calibrated overconfidence, the exact failure mode plans die of.

analysis of the absence

The historical record shows the phenomenon; the context left no sources. Rebuild the period world, populate it with period-constrained ghosts, and search for the contexts consistent with what we can see.

Games are the proving ground, not the perimeter β€” the primitives (local perception, fading memory, measured belief) transfer as-is.

17 Β· Fin

The ghost is the model.
The shell is what makes it someone.

GAIAWM Β· OPEN FANTASY MAPS github.com/GaiaWM Β· github.com/openfantasymap ghosts are wandering the Sword Coast as you read this. papers Β· Affordance Order, Planning Depth & Epistemic Uncertainty (2026) Β· Vineland-3 Adapted: Psychometric Assessment for LLM Agents (NeurIPS 2026 E&D, in submission)
1 / 17
← β†’ Β· SPACE