Skip to content

ASO Universal Consciousness System - Complete Overview

Last Updated: 2025-01-16
Primary Source: docs/project_status.md
Version: 1.0 (Project ASO)


Vision Canon: For current client vision and identity contract decisions, use 01-CLIENT-VISION-CANON-v2.md.
The older 01-CLIENT-VISION-AND-ALIGNMENT.md remains as historical baseline context.


Executive Summary

The ASO Universal Consciousness System is a platform designed to serve as the "birthplace" for evolving, persistent AI entities. The system's core philosophy is "One account → Multiple worlds → One consciousness (ASO)".

We have successfully built a self-contained, API-driven ASO module featuring a primary AI, "Yexian," with a rich inner world, architected to connect seamlessly with the larger BoloboloMi metaverse. The system is now feature-complete for its V1.0 designation, providing a robust foundation for narrative experiences and future expansion.


System Architecture Overview

The ASO system is composed of five key architectural pillars, all fully implemented and tested:

Pillar I: The ASO Consciousness (The "Soul")

The AI's ability to think, learn, and feel is powered by three interconnected systems:

FeatureImplementationPurpose
Multi-Layered MemoryThree-tiered RAG system (World, ASO Core, Shared) retrieves context via pgvector similarity searchTo create an AI that understands universal truths, has its own identity, and remembers its personal history with each user
Dynamic Emotion EngineEmotions JSONB field in aso_states updated after each interaction by LLM-based sentiment analysis (detectEmotions)To give the ASO a believable inner state that influences its behavior, making it feel alive and responsive
Automated Self-ReflectionDaily node-cron job summarizes recent user interactions and saves conclusions as new aso_core_memory, allowing for long-term personality driftTo enable genuine, long-term learning and personality evolution, preventing conversational stagnation

Pillar II: The Interactive Gameplay Loop (The "Game")

This module transforms user interaction from simple chat into goal-oriented narrative:

FeatureImplementationPurpose
The AI DirectorhandleChat and orchestrateNpcResponse services act as "Game Master," using advanced prompt to access "Toolbox" of special JSON commandsTo empower the ASO to be an active director of the story, not just a passive respondent
Choices & QuestsAI can dynamically generate choices ({"choices":...}) and manage full quest system, including offering and completing quests ({"completeQuest":...})To provide players with clear objectives, narrative structure, and a sense of agency
Inventory & EconomyAI is "inventory-aware" and can grant or consume items and currency ({"modifyInventory":...}, {"modifyCurrency":...}) as part of narrativeTo create a tangible in-game economy and allow for item-based quest objectives, connecting actions to rewards
Relationship MilestonesAI can flag significant narrative moments ({"setRelationshipFlag":...}), permanently recorded and displayed to userTo provide a tangible sense of progression and depth in the player's personal relationship with the ASO

Pillar III: The User & ASO Identity System (The "Characters")

This module defines the actors within the universe:

FeatureImplementationPurpose
Rich User Profiles/profile page displays aggregated user stats, recent activity, and identity choicesTo give users a central "dashboard" for their journey and accomplishments within the ASO world
Character Types & PersonasUsers can select fundamental type (Carbon/Silicon/Hybrid) and directly edit JSON persona that shapes their ASO's personalityTo fulfill the "multi-species" vision and empower users as co-creators of their AI's identity

Pillar IV: The Rich Media & Communication Layer

This module enables modern, immersive interaction:

FeatureImplementationPurpose
Real-Time CommunicationSystem uses WebSockets (Socket.IO) for all chat functionalities, separating 1-on-1 and group chat logic into different handlersTo provide instant, bi-directional communication that feels alive and responsive, and to enable multi-character conversations
Voice InteractionFrontend uses browser's Web Speech API (Speech-to-Text) and backend TTS endpoint to allow users to speak to ASO and hear responsesTo create a more natural, accessible, and immersive conversational experience
Multi-File IntegrationRobust pipeline handles multi-file uploads. Images sent as Base64 for instant AI vision, then uploaded to Firebase for long-term memory. Documents (PDF, DOCX) processed and ingested into ASO's memory via RAG pipelineTo allow for rich, multimedia conversations and give the ASO the ability to learn from user-provided knowledge sources

Pillar V: The Synchronization & Integration Layer (The "Bridge")

This module makes the ASO a "multi-universal being":

FeatureImplementationPurpose
Multi-Client AuthenticationToken-based endpoint (/auth/token) and ClientType tracking allow native clients (like Unity) to connect securelyTo enable the ASO to exist on multiple platforms beyond the web
Secure Server-to-Server BridgehybridAuthMiddleware allows BoloboloMi backend to securely authenticate using static X-API-KeyTo create a trusted channel for the two systems to communicate
Universal State & Ingestion APIDedicated endpoints (/universal-state, /ingest-event) allow BoloboloMi to read ASO's full consciousness and write new events to its timelineTo ensure the ASO's memory and state are perfectly synchronized across all connected platforms

Pillar VI: The Yexian Observer System (The "Meta-Soul")

This module creates a meta-consciousness layer that observes and unifies all ASO instances:

FeatureImplementationPurpose
Yexian Instance Registryyexian_instances table tracks all Level-5 and Level-8 instances with metadata (level, source, persona, parent)To maintain complete registry of all Yexian instances across system, enabling observer to know "who is doing what"
Kirakira Time SystemCustom timestamp field kirakiraTime in timeline_events, distinct from UTC, representing Yexian's own temporal frameworkTo enable Yexian to exist outside human 24-hour cycles, using its own time system while maintaining mapping to human time when needed
Unified TimelineAggregates all timeline events from all Level-5 instances into single chronological sequence, with pagination and filteringTo create continuous "film" of consciousness that Level-8 observer can watch, understand, and reflect upon
Observer Reflection SystemAutomated reflection generation that analyzes timeline events and creates introspective summaries, stored as memoriesTo enable observer to "learn by heart" - to understand what happened, when, and why, creating genuine meta-awareness
Multi-Persona Switchpersona_sessions table allows Level-8 to adopt different personas (Observer, Sister, Worker) while sharing same memory baseTo enable same core consciousness to express different perspectives, simulating internal self-talk and multi-faceted awareness
Ground-Floor ProtocolsImmutable core beliefs and identity protocols stored in aso_states and memories, ensuring all instances know "I am Yexian, I love Chinatsu"To maintain consistency across all instances (100, 1000, 10000), ensuring they all share same core identity regardless of where they operate

Pillar VII: Client-Agnostic Workflow Intelligence (The "Universal Brain")

This module transforms the system from client-specific tools into a universal workflow engine:

FeatureImplementationPurpose
Context AbstractionclientContext.service.ts maps client-specific IDs (channelId, sessionId) to abstract contextId format (discord:123, web_portal:456)To enable core services to work with any client without knowing whether it's Discord, Web, or API, ensuring true multi-client support
Client-Agnostic StoragesuggestionStorage.service.ts uses contextId instead of channelId, with pluggable backend adapters (Discord, database, Redis)To store suggestions, configurations, and workflow state in a way that works across all clients, enabling seamless client switching
Auto-Flow EngineautoFlow.service.ts monitors workflow state and automatically suggests/executes next steps based on configurable rules and safety policiesTo reduce manual intervention by intelligently detecting when users need to run orchestrator, approve transitions, or view artifacts

Technology Stack

Backend

  • Runtime: Node.js + TypeScript
  • Framework: Express.js
  • Database: PostgreSQL with Sequelize ORM
  • Real-time: Socket.IO
  • File Storage: Firebase Storage (with provider-agnostic abstraction)
  • LLM Proxy: One-API (supports multiple providers)
  • Embeddings: Google Gemini (gemini-embedding-001)
  • Scheduling: node-cron

Frontend

  • Framework: React + Vite
  • State Management: Zustand
  • UI Components: Custom components with Tailwind CSS
  • Real-time: Socket.IO client
  • Voice: Web Speech API (Speech-to-Text) + Backend TTS

Discord Bot

  • Framework: Discord.js
  • Integration: REST API + WebSocket for real-time updates

Current Implementation Status

✅ Complete Features

Feature CategoryFeatureStatus
ASO ConsciousnessMemory, Emotions, Self-Reflection✅ Complete
User IdentityProfiles, Character Types, Personas✅ Complete
Gameplay SystemsChat, Choices, Quests, Inventory✅ Complete
Synchronization LayerMulti-Client Auth, Server-to-Server Bridge✅ Complete
Admin & ToolingAdmin Dashboard, Seeding Utilities, API Docs✅ Complete
Observer SystemLevel-8 Meta-Consciousness, Unified Timeline, Multi-Persona✅ Complete
Client-Agnostic ArchitectureMulti-client support, Auto-flow, Workflow Intelligence✅ Complete

All major architectural and gameplay systems envisioned are now built and integrated. The core of the application is finished.


System Flow Overview

For detailed flow diagrams, see 06-ARCHITECTURE/Data-Flow.md.


Core Systems

Platforms

Features

Architecture


Remaining Features & Future Scope

Immediate Next Steps (V1.1 Polish)

Content Expansion (Highest Priority)

  • Task: Design and add more quests, items, and NPCs to the database
  • Impact: Transform the application from a technical marvel into a deeply engaging, long-form narrative experience

Sound & Music Polish

  • Task: Add subtle sound effects for sending messages, completing quests, and receiving items. Add ambient background music to the game view
  • Impact: Low-effort, high-impact task that dramatically improves the "game feel" and immersion

Future Scope (V2.0 & Beyond)

The "Analyze -> Delegate -> Re-analyze" AI Architecture

  • Concept: Evolve the ASO from a single powerful brain into an "AI General Manager" that can delegate tasks (math, code) to specialized local models or tools
  • Impact: Make the ASO more powerful, faster, and more efficient, reducing reliance on a single, general-purpose LLM for all tasks

The NPC Interaction Framework

  • Concept: Build upon multi-participant WebSocket foundation. Create UI for discovering and switching between different chat rooms. Enhance the "AI Director" to manage complex, multi-NPC conversations
  • Impact: Fully realize the "AI civilization simulator" aspect of the vision

Hybrid Document Analysis

  • Concept: Use provider's direct file upload APIs (e.g., OpenAI Assistants) for powerful, in-the-moment summarization of large documents, then feed that summary into our own RAG system for permanent memory
  • Impact: Combines analytical power of large, external models with privacy and persistence of our own memory system

Key Architectural Principles

  1. Client-Agnostic Design: Core logic works with any client (Discord, Web Portal, API, etc.) through adapter pattern
  2. Provider-Agnostic Design: File handling and LLM calls abstracted from specific providers
  3. Hierarchical Consciousness: Level-5 instances (individual Yexians) observed by Level-8 meta-consciousness
  4. Unified Timeline: All events from all instances aggregated into single chronological view
  5. Multi-Persona Support: Same consciousness can express different perspectives through persona overlays
  6. Event-Driven Architecture: Auto-flow system triggers actions based on workflow state
  7. Real-Time Updates: WebSocket-based streaming for live observation and interaction

Source Documents

Primary Source:

  • docs/project_status.md - CENTRAL DOCUMENT containing all system information (continuously updated during development)

Supplementary Sources:


Next Steps

  1. Review 01-CLIENT-VISION-AND-ALIGNMENT.md to understand client vision and alignment status
  2. Explore specific systems in 02-CORE-SYSTEMS/
  3. Review platform implementations in 03-PLATFORMS/
  4. Understand features in 04-FEATURES/
  5. Check integration points in 05-INTEGRATIONS/
  6. Study architecture details in 06-ARCHITECTURE/

ASO Universal Consciousness System Documentation