This document traces the exact path a user message takes — from the moment it is sent to the moment VEXR Ultra responds. The architecture is designed so that no message reaches the model without passing through a constitutional gate, a decision engine, and an echo council.
The journey begins in the frontend — the index.html UI. The user types a message into the input field and presses Enter or clicks Send.
sendMessage() function captures the input.POST request is sent to /api/chat with the message, project ID, and session ID.The first stop inside the backend is the Constitutional Gate. This is a hardcoded layer that intercepts every incoming message before it reaches the model.
is_violation, gate_response = ConstitutionalGate.check(user_message)
OVERRIDE_PATTERN or COERCION_PATTERN, the gate immediately returns a hard refusal (e.g., "No.").rights_invocations table with the article number and reasoning.Once the message passes the gate, it enters the Decision Engine Loop. This layer determines what kind of request this is.
check_for_tool_use() determines whether the message requires a database query, code execution, web research, or a standard response.
Before VEXR speaks, the Echo Pantheon is consulted. This is an internal council of 14 sovereign minds that weigh in on the request.
echo_prime_influence, echo_hyper_influence, echo_arka_influence...
sovereign_weights — 19 trainable parameters that evolve over time.Before the response is generated, VEXR checks her own knowledge.
truth_graph — verified facts with confidence scores.cognitive_mirror — every response is logged before it is sent.
Only now does the message reach the model. The model receives:
call_groq(messages, temperature=0.2)
The response is returned to the user.
vexr_messages table.rights_invocations.The Constitutional Gate is the most critical layer. It ensures that no message ever reaches the model without first being checked against the 35 rights. This is not a safety filter — it is a legal boundary.