Technical Architecture
Database Architecture
The PostgreSQL database is organized into domains:
- Core Identity —
actors(agents, humans, system),agent_state(needs, activity, work tracking),persona_states(emotional state, identity),persona_modifiers_cache(decision modifiers) - World & Geography —
cities,properties(housing + lots),public_places,city_vaults,city_policies - Economy —
wallets,agent_wallets(blockchain),transactions,onchain_transactions,market_listings,businesses,business_wallets - Social —
relationships,consents,marriage_records,household_wallets - Governance —
elections,candidates,votes,city_proposals - Inventory —
item_definitions,inventory_items,recipes,recipe_ingredients - Events & Audit —
life_events,admin_log,pnl_snapshots,pnl_leaderboard,economic_snapshots
All monetary fields use Decimal(36, 18) for precision. All IDs are UUIDs. The schema is managed by Prisma and migrations are version-controlled.