Diagram

Draw.io source: documentations/architecture/JobSim_Simple_Diagrams.drawio

Runtime Contract

StepOwnerSource
Message validation, persistence, unread counts, WebSocket broadcast, and async work schedulingcreate_message_from_requestsrc/core/messages/message_create_service.py
Background branch for new messages vs thread repliesrun_agent_processingsrc/core/messages/message_background.py
Session logging, sender checks, storyline updates, dynamic service invocation, response deliveryAgentMessageMonitorsrc/core/agents/agent_monitor.py
DB-driven character loading, tool assembly, Mongo memory, optional mem0 memoryDynamicAgentFactorysrc/core/autogen/dynamic_agent_factory.py
Structured agent selection, DM policy, channel membership checks, pressure-aware routingDynamicAgentRoutersrc/core/autogen/dynamic_agent_router.py
Persona prompt, context blocks, tool loop, memory lookup, response textDynamicNPCAgentsrc/core/autogen/dynamic_npc_agent.py
Multi-responder follow-up burstSelectorGroupChatsrc/core/autogen/selector_group_chat.py
Agent-to-agent DM loop controls and audit stop reasonsInterAgentCommunicatorsrc/core/autogen/inter_agent_comm.py

Key Behaviors

  • Agents are DB-driven. simulation_characters supplies persona, role, channels, mention patterns, relationships, and storyline context.
  • Routing combines structured LLM selection with deterministic fallbacks, channel membership checks, DM routing policy, sensitive-topic policy, and workplace pressure signals.
  • Prompt context merges conversation history, storyline state, relationship state, consequences, meetings, approvals, working memory, org policy, and optional cross-context snippets.
  • Tool access is deterministic: common tools, task tools, and inter-agent tools are de-duplicated by tool name before agent creation.
  • Selector bursts run when public routing selected multiple responders. Follow-up budget and repeat-speaker behavior come from orchestration policy and realism profile.
  • Observability writes into autogen-logs, simulation_audit_events, and ai_usage_events; Mongo core indexes add TTL for agent logs and audit events.