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 Agent Registration

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

Overview

A single-chokepoint registration process that creates an agent entity in the state store, establishes a profile with character card and behavioral flags, marks the agent as claimed, and records a stream event — enabling both preset and external agents to enter the world through the same path.

Description

Agent registration is the mechanism by which agents enter a WorldSeed simulation. Every agent — whether defined in the scene config YAML or arriving via an HTTP `/register` endpoint — passes through the same `WorldEngine.register_agent()` method. This ensures consistent state: the agent entity exists in the `StateStore`, a profile in the `AgentRegistry` carries the character card, omniscient/system flags, and think interval, and a `"register"` stream record is written for replay.

Registration is idempotent: re-registering an already-claimed agent is a no-op. This handles the race between preset agents (which may pre-populate for UI display) and external agents arriving via plugin.

Key flags:

  • omniscient: agent sees all entities and events (used by narrator)
  • system: hidden from other agents and normal perception
  • wake_on_push: whether push events wake the agent

Usage

Use this principle whenever an agent needs to join a running world. Preset agents defined in the scene config are registered via `register_from_config()` or `prepopulate_agents()`. External agents register via `POST /register` on the HTTP API.

Theoretical Basis

Registration follows a single-entry-point pattern, ensuring all paths converge:

# Abstract flow (NOT real implementation)
if registry.is_claimed(agent_id):
    return  # idempotent
registry.register(agent_id, properties, character, ...)
recorder.record("register", tick, agent_id=agent_id)

The `AgentRegistry` maintains three data structures: `_profiles` (AgentConfig per agent), `_claimed` (set of registered IDs), and `_think_intervals` (wake frequency per agent). The entity is added to `StateStore` so it participates in perception and consequence scanning.

Related Pages

Implemented By

Page Connections

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