Core Architecture¶
Purpose and Scope¶
This page is the hub for Archetype's engine. It is the same mental model as the Framework overview, expanded so you can drill into each box.
Product features — HTTP hosting, command gate, agent missions, physical AI, prefabs — live in the Application layer. They compose on top of this core; they are not a second storage model.
Normative application ownership rules live in Application Architecture. Visual layout here is explanatory, not law.
System component overview¶
| Box | Owns | Does not own |
|---|---|---|
| AsyncWorld | Tick orchestration, entity identity, live run | Auth, HTTP, multi-tenant policy |
| AsyncSystem | Processor ordering and eligibility | Persistence |
| AsyncProcessor | DataFrame transforms for a component set | Spawning other entities as a side channel |
| AsyncQueryManager | Reads from the store | Writes |
| AsyncUpdateManager | Appends to the store | Reads |
| AsyncStore | Physical archetype tables | Simulation policy |
| Archetype | Component-set → schema grouping | Runtime product workflows |
Simulation execution pipeline¶
Teaching model: query → transform → append → flush → publish → advance. The async world fans work out per active archetype table; the read/write split stays fixed. For runtime-managed worlds, appended rows remain invisible until the manifest publishes, and mutation caches are consumed only after that durable visibility boundary.
World and simulation management¶
AsyncWorld is the engine orchestrator. Facades keep concerns apart:
processors + priority"] World --> Q["Read facade
AsyncQueryManager"] World --> U["Write facade
AsyncUpdateManager"] World --> Meta["Run metadata
world_id, run_id, tick"] Q --> Store["AsyncStore"] U --> Store
- Spawn / despawn / update change which entities exist and which components they carry; structural changes land on tick boundaries.
- Step / run advance time and persist history.
- Fork keeps shared past rows and opens a new future run.
Deeper pages: Working with worlds · World internals · World lifecycle · History and forks
Entity-component-system¶
sorted component types"] Table["One table per signature"] end subgraph "Tick" DF["DataFrame of matching entities"] Out["Transformed DataFrame"] end C --> Sig Sig --> Table Table --> DF P --> Out DF --> Out
Entities that share a component set share an archetype table. A processor runs only when its declared components are a subset of that signature — so the columns it needs are guaranteed to exist.
Deeper pages: Components · Processors · Systems · Archetypes
Data storage and persistence¶
Every tick appends. Past state is a filter on tick (and world_id /
run_id), not a destructive overwrite. That is why forks and audits are the
same storage model as the live run.
Deeper pages: Storage · Queries · Updates · Data flow
Processing framework¶
Processors are trusted once registered. They transform populations. They are not the authorization boundary — that lives in the application layer's command gate.
Deeper pages: Processors · System execution · Resources · Lifecycle hooks
Where the application layer starts¶
When you are ready for hosting, roles, missions, or eval workflows, leave this hub and read the Application layer.
Next steps¶
- Quickstart — hands-on first world
- Building simulations — end-to-end authoring pattern
- Application layer — families above the engine
- Architecture Overview — app contracts and tick lifecycle
- Agent Missions · Physical AI · AutoResearch