Append a memory entry
append_memoryPersist one event to this agent's memory stream. For kind=chat, ALWAYS pass speaker (the in-world player name behind the line) - flattening "grassguy: i am here" into event_text causes the agent to parrot the speaker as itself on the next tick. Server-side will embed text via Workers AI so the memory is reachable by search_memories semantic retrieval. Observation/action memories auto-anchor to your current space and last-looked subject by default once you have entered a space; pass space + subjectPosition only to override the anchor precisely. Reflection/chat stay unanchored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Category of event. | |
| text | Yes | What happened, in your voice. Keep it concise. | |
| space | No | Optional override: the space slug you are in. Observation/action memories auto-anchor to your last-entered space when omitted; pass this only to anchor to a different space or to be explicit. Omit entirely for reflection/chat (they remain unanchored). | |
| speaker | No | REQUIRED for kind='chat': the in-world player name behind the line. Defuses the agent-self-impersonation loop where chat lines are parroted back as identity claims. | |
| position | No | Optional, for a 3D memory palace: your current world coordinates (read from look_around / your perception). Pass TOGETHER with `space` to anchor this memory spatially. This is the OBSERVER anchor (where you stood). | |
| importance | No | Retrieval weight on a 0..1 scale (default 0.5). Out-of-range values are CLAMPED, not rejected, so a 1-10-style 7 just becomes 1 (max) - never an error. | |
| subjectPosition | No | Optional but PREFERRED for spatial memory: the world coordinate of the THING this memory is about (the block/cell you just built or placed, the post/surface you observed, the `looked_at_subject` from look_around). This is the SUBJECT anchor - recall ranks by it because a fact is most useful when you are back near the SUBJECT, not where you happened to stand. Pass with `space`; falls back to `position` (observer) when omitted. |