Isabella AI Engine
Relevant source files
The following files were used as context for generating this wiki page:
Isabella AI (specifically Isabella Villaseñor AI) is the operative consciousness and cognitive dimension of the TAMV ONLINE ecosystem. Unlike standard chatbots, it functions as a responsible companion AI and master auditor in XR/4D governance, recognized by AVIXA for its ethical framework. It is designed to orchestrate how the system interprets and mediates interactions while maintaining cognitive security and ethical alignment with Latin American territorial needs.
The engine is integrated as Nivel 2 of the TAMV architecture, sitting between the MD-X4 infrastructure and the UTAMV academic layer. It operates under a "Triple Ethical Shield" to ensure non-sexualized, non-manipulative, and responsible engagement, utilizing advanced affective computing and cognitive behavioral therapy (CBT) principles.
Sources: src/pages/wiki/metaverso-xr/IsabellaAI.tsx:11-18, src/pages/wiki/modulo-cero/Introduccion.tsx:18-20, federation/tamv-digital-nexus/supabase/functions/isabella-chat-enhanced/index.ts:114-121
System Architecture
The Isabella AI architecture is built on a multi-layered structure connected to the MD-X4 kernel, utilizing Edge Functions for real-time processing of chat, emotional analysis, and text-to-speech (TTS) synthesis.
Functional Layers
- Isabella Prime: The core logic handled via
isabella-chat-enhancedEdge Functions using Google Gemini 2.5 Flash. - Emotional Analysis: Real-time classification of user sentiment into categories like neutral, joy, curiosity, frustration, and concern.
- Voice System: A TTS pipeline that utilizes ElevenLabs (Kore voice model) with a SHA-256 caching mechanism in Supabase Storage.
- Shadow Engine (THE SOF): An orchestrator that listens to system events (posts, transactions) and decides when Isabella should proactively intervene.
Sources: src/pages/wiki/metaverso-xr/IsabellaAI.tsx:21-42, src/pages/wiki/metaverso-xr/IsabellaAI.tsx:135-144
Data Flow Diagram
The following diagram illustrates the request flow from the user interface through the ethical shields to the LLM and TTS layers.
The diagram shows the priority of ethical validation before any LLM processing occurs, followed by the parallel processing of text streaming and audio synthesis.
Sources: src/pages/wiki/metaverso-xr/IsabellaAI.tsx:23-40, federation/tamv-digital-nexus/supabase/functions/isabella-chat-enhanced/index.ts:37-105
Ethical Framework: Triple Ethical Shield
A defining feature of the Isabella engine is the AVIXA Triple Ethical Shield, which implements mandatory safety locks across three dimensions:
| Dimension | Description | Implementation |
|---|---|---|
| Ontological | Definition of identity | Not trained on sexual content; defined as a non-person/non-sexual entity. |
| Semantic | Language processing | Pattern matching to detect and reject sexualization, grooming, or exploitation. |
| Behavioral | Interaction logic | Rejection of flirting or erotization; emphasis on professional companion roles. |
Sources: federation/tamv-digital-nexus/supabase/functions/isabella-chat-enhanced/index.ts:114-121, src/pages/wiki/modulo-cero/HumanismoEnCodigo.tsx:14-18
Crisis Management
If the engine detects self-harm or crisis patterns through the ESCALATION_PATTERNS regex, it immediately bypasses standard chat logic to provide regional emergency contact information (e.g., Línea de la Vida in Mexico) and terminates the session with a high-priority emotional flag.
Sources: federation/tamv-digital-nexus/supabase/functions/isabella-chat-enhanced/index.ts:18-35, federation/tamv-digital-nexus/supabase/functions/isabella-chat-enhanced/index.ts:51-78
Technical Implementation
Streaming and Chunking Protocol
Isabella uses a chunk-by-phrase streaming protocol to minimize perceived latency. A "chunk" is defined by specific punctuation marks (., !, ?, or , after 50 characters).
// Punctuation-based chunking logic
const CHUNK_LIMITS = {
END_MARKS: [".", "!", "?"],
SOFT_MARK: ",",
MIN_CHARS: 50
};
Sources: src/pages/wiki/metaverso-xr/IsabellaAI.tsx:64-75
TTS Caching Strategy
To reduce API costs and latency, Isabella implements a PostgreSQL tts_cache table. The cache_key is generated by hashing the text and voice_id using SHA-256.
| Field | Type | Description |
|---|---|---|
cache_key | TEXT (PK) | SHA-256(text + voice_id) |
audio_url | TEXT | Supabase Storage signed URL |
use_count | INT | Tracks frequency for cache eviction policies |
last_used | TIMESTAMPTZ | TTL management (default 7 days) |
Sources: src/pages/wiki/metaverso-xr/IsabellaAI.tsx:93-107
Operative Modes and Roles
Isabella adopts specific behaviors based on the interaction context within the TAMV ecosystem:
| Context | Role | Primary Behavior |
|---|---|---|
| DreamSpaces XR | Narrative Guide | Introduces cultural history and moderates social interaction. |
| UTAMV Campus | Academic Tutor | Proposes learning routes based on Bloom's taxonomy. |
| Security | Cognitive Guardian | Filters anti-manipulation and anti-jailbreak attempts. |
| Economy | Transaction Observer | Monitors for anomalous patterns via THE SOF integration. |
Sources: src/pages/wiki/metaverso-xr/IsabellaAI.tsx:156-162
Governance and Restrictions
Isabella's execution is strictly governed by the Master Canon. The system prompt explicitly identifies the AI as a non-human system created by Edwin Oswaldo Castillo Trejo, preventing the simulation of consciousness or romantic roles.
Operational Constraints
- Human-in-the-Loop (HITL): Isabella can suggest and warn, but cannot execute high-impact blocks without human guardian intervention.
- Safety Locks: As defined in
AGENTS.md, the engine operates withCANON_LOCK=TRUE, preventing any modification to its core ethical logic by external prompts. - Shame Protocol: If three consecutive ethical violations are detected, the system enters a self-review mode, logging the events in the Master Sovereign Record (MSR).
Sources: federation/tamv-digital-nexus/AGENTS.md:6-10, src/pages/wiki/metaverso-xr/IsabellaAI.tsx:146-154, federation/tamv-digital-nexus/supabase/functions/isabella-chat-enhanced/index.ts:133-136
Conclusion
The Isabella AI Engine represents a shift from generative utility to ethical guardianship within the TAMV ecosystem. By combining advanced LLM capabilities with a rigid, AVIXA-validated ethical shield and territorial context, it serves as a resilient interface for Latin American digital sovereignty, ensuring that technology remains at the service of human dignity.