World Panel Nodes
The characters, items, places and location the World State panel shows: read them, and add a person, object or place named in a message.
2 nodes.
| Node | Registry path |
|---|---|
| Add Snapshot Entity | agents/world_state/AddSnapshotEntity |
| Get Snapshot | agents/world_state/GetSnapshot |
Add Snapshot Entity
agents/world_state/AddSnapshotEntity
Add a person, object or place named in a message to the world snapshot and keep it tracked, as selecting text in a message and choosing Add to world state does. One analysis request; the model may find no distinct entity in the text, and then nothing is added. Like the UI add, it cancels a running snapshot refresh; run from a listener of the snapshot's own events, it adds without cancelling it.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
graph state (passthrough) |
message |
message_object |
(optional) the message the text comes from (or give message_id) |
message_id |
int |
(optional) the message id (or give message) |
text |
str |
the text that names the entity |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
graph state |
resolved |
bool |
True when an entity was added |
name |
str |
the entity name |
kind |
str |
character, item or place |
in_moment |
bool |
True when the message is in the snapshot's current moment |
mentions |
list |
phrases of the message marked as the entity |
waiting_for_regeneration |
bool |
True when nothing ran because the snapshot is being regenerated |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
message_id |
int |
0 |
message_id |
Get Snapshot
agents/world_state/GetSnapshot
The current world snapshot, as the World State panel shows it. Reads the stored snapshot; it does not refresh it.
Outputs
| Output | Type | Description |
|---|---|---|
characters |
dict |
name to state (snapshot, emotion, mentions) for each character |
items |
dict |
name to state (snapshot, mentions) for each item |
places |
dict |
name to state (snapshot, mentions) for each place |
location |
str |
the location description, or None |