Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:AIScientists Dev WorldSeed Perception Delivery

From Leeroopedia
Knowledge Sources
Domains Perception, Agent_Systems
Last Updated 2026-10-26 18:00 GMT

Overview

A DSL-driven visibility filtering and inbox delivery system that computes what each agent can perceive — visible entities, events, and whispers — based on declarative visibility rules, event scopes, and hidden properties, then delivers snapshots to per-agent inboxes.

Description

Perception is how agents "see" the world in WorldSeed. The `Perceiver` runs once per tick after consequences, computing a filtered view of the world for each agent.

Visibility rules: Each entity is tested against DSL visibility rules from the scene config's `perception.visibility` section. An agent sees an entity only if all visibility rules pass (evaluated with `$observer` and `$entity` in the context). Omniscient agents bypass visibility rules and see everything.

Event scopes:

  • global: All agents receive
  • target_only: Only the event's target receives
  • admin: No agents receive (dashboard/GM only)
  • custom: Evaluated via DSL rules from `perception.event_scopes`

Hidden properties: Listed in `perception.hidden_properties`, these are stripped from entity data before delivery to non-omniscient agents (e.g., private hypotheses).

System agents are hidden from non-system observers — the narrator agent is invisible to regular agents.

The per-agent `Inbox` stores:

  • InboxSnapshot: self_state, visible_entities, visible_agents
  • InboxEvent: Filtered events the agent can perceive
  • InboxWhisper: Targeted whispers (e.g., DM narratives, action failure messages)

Delivery is non-destructive: events accumulate in the inbox until the agent reads them via `perceive()`.

Usage

Use this principle to control information flow to agents. Perception rules are defined in the `perception` section of scene config. Agents retrieve their perception via `GET /perceive` (HTTP) or `WorldEngine.perceive()` (internal).

Theoretical Basis

Perception follows a filter-then-deliver pattern:

# Abstract algorithm (NOT real implementation)
def deliver(tick):
    agents = store.query_by_type("agent")
    for agent in agents:
        omniscient = is_omniscient(agent)
        # 1. Build snapshot
        visible = {}
        for entity in store.all_entities():
            if entity.id == agent.id:
                continue
            if is_system(entity) and not is_system(agent):
                continue
            if not omniscient:
                if not all(visibility_rules_pass(entity, agent)):
                    continue
            visible[entity.id] = filter_hidden(entity.data)
        inbox.update_state(InboxSnapshot(agent.data, visible, ...))

        # 2. Filter and deliver events
        for event in event_log.get_events(since=last_perceive):
            if event.scope == "admin":
                continue
            if omniscient or agent_can_perceive(agent, event):
                inbox.append_event(InboxEvent(...))

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment