Implementation
Agent behavior is built with AutoGen-style patterns undersrc/core/autogen/: dynamic NPCs, routing, tools, and hooks into messaging and tasks.
Character specifications
YAML files (for example undersrc/core/specs/) define persona and behavior inputs. At runtime the system merges those specs with simulation settings loaded from MongoDB.
Core services
DynamicAgentService, DynamicAgentRouter, and related modules coordinate multi-agent turns and tool calls. Unless a flow is explicitly cross-tenant, treat all orchestration as organization-scoped.