data/memories/
A memory kind: a typed slot an AI agent remembers, such as who last hurt it or the nearest dropped item. Sensors and tasks write memories, and conditions, considerations and task bindings read them by key. A brain lists the kinds it uses. The engine declares manifold:last_hurt_by, manifold:nearest_drop and manifold:unreachable. Loaded by the server only.
| Registry | manifold-ai:memory-kind |
| Files | data/memories/*.ron, *.update.ron, *.final.ron |
| Sides | server: only the server loads it |
| Reads | nothing |
| Contract | Brains, data stage |
Entry
A record, written MemoryKind(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The memory’s key, <mod-id>:<name>. | |
value | MemoryType | yes | The value’s type. | |
ttl | f32 or None | no | never expires | Seconds until a written memory expires. |
persist | bool | no | false | Whether it is saved for agents that are saved. |
Example
From game/flagship-game/data/memories/flagship.ron:
MemoryKind(id: "flagship-game:vein_hint", value: Position, ttl: Some(30.0))
Types
MemoryType
A memory’s value type.
| Variant | Written | Description |
|---|---|---|
Flag | Flag | Set or not. |
Int | Int | An integer. |
Tick | Tick | A server tick. |
Number | Number | A number. |
Tag | Tag | A tag. |
Position | Position | A block position. |
Entity | Entity | An entity. |
EntityList | EntityList(u8) | Up to this many entities, 1 to 4. |