DEV Community

Code Nomi Nomi
Code Nomi Nomi

Posted on

# ALICE — Architectural Reference Document

Reference Document — Identity, Architecture and Operating Principles
Reference Version: August 28, 2026


1. Definition of Alice

Alice is a local intelligence system composed of multiple cooperating components.

It is not reducible to its language model.

The Qwen model is one component of Alice. Alice's identity and operational capabilities result from the architecture as a whole:

model + router + memory + map + circuits + tools + learning + execution mechanisms


2. Fundamental Principle

Alice does not have the general objective of becoming “better” at every iteration.

Its principle is:

KNOW → DO → LEARN IF NECESSARY → RETAIN → REUSE

When Alice already knows how to do something, it should be able to use the corresponding knowledge or circuit instead of unnecessarily solving the problem again.

When Alice does not know how to do something and a learning mechanism is available for that task, it can:

  1. discover a solution;
  2. transform it into usable knowledge;
  3. integrate it into its architecture;
  4. reuse it later.

3. Alice ≠ Qwen

Qwen is the language model currently used by Alice.

It provides, among other things:

  • language understanding;
  • language generation;
  • certain reasoning capabilities.

Alice is the complete architecture built around the model.

Alice's overall behavior therefore depends on how the model is combined with:

  • memory;
  • the map;
  • the router;
  • tools;
  • circuits;
  • learning mechanisms.

Principles

  • Never consider Qwen alone to represent Alice.
  • Never evaluate Alice's architecture solely according to the model's intrinsic capabilities.
  • A capability may belong to Alice's architecture without being a native capability of Qwen.

4. Current Architecture

The inspected architecture includes, among other components:

  • Qwen2.5-3B-Instruct Q4_K_M, served by llama-server on the Alice machine (192.168.1.61), with a context window of 4096;
  • routeur.py: orchestration layer and routing core;
  • alicization_adapter.py: teach() interface;
  • memory.py: SQLite memory for procedures and experiences;
  • adaptateur_carte.py: interface to the living map;
  • Living Map: cartes.json, containing knowledge and circuits accessible to the router;
  • Circuits: reusable operational procedures;
  • Local tools: memory search, file reading, testing, summarization, system actions, OCR, language registry and care functions;
  • RL: DonjonSimpleEnv environment and Q-learning for the task of moving toward a target;
  • Web control interface: dashboard, L0/L1/L2 memory, circuits, observability and tests.

5. Role of the Router

The router is the orchestrator.

It determines which Alice capability should process a request.

The observed flow is, in order:

  1. Query the living map to find a relevant circuit.
  2. Search SQLite memory.
  3. Use OCR when the request involves reading an image.
  4. Detect certain direct system actions.
  5. Use Qwen for more complex actions or the final response.

Principle

The model should not solve a problem again when Alice already has an exploitable procedure for it.


6. Memory and Knowledge

Alice's memory is not merely a log.

It participates in her operational capabilities.

A learned and retained procedure becomes knowledge available for later use.

The inspected state contains, among other elements:

  • a procedures table;
  • an experiences table.

A procedure present in the verified state consisted of four operations and had the status VERIFIED.

A retained piece of knowledge should therefore not be considered “erased” simply because it is not present in Qwen's immediate context.

It belongs to Alice's memory architecture.


7. Living Map

The living map is a structured representation of the knowledge and circuits accessible to Alice.

It allows the router to retrieve an already-known capability.

In the tested RL case:

Learning
   ↓
Policy
   ↓
Circuit
   ↓
Living Map
   ↓
Router
Enter fullscreen mode Exit fullscreen mode

A policy produced through learning was transformed into a circuit and then added to the “knowledge” section of the map.

The router subsequently retrieved this circuit when processing a movement request.


8. Circuits

A circuit is a procedure that Alice can execute.

A circuit may originate from a learning process.

Once integrated into the appropriate memory or map, it becomes reusable operational knowledge.

The objective is not necessarily to continuously optimize the circuit.

If the circuit correctly performs the task for which it was learned, it fulfills its purpose.

Principles

  • A known circuit must be reusable.
  • A circuit does not need to be replaced simply because another method exists.
  • A circuit should only be modified based on a justification related to its actual operation, not on a generic architectural preference.

9. Reinforcement Learning

RL is a specialized learning mechanism.

In the environment currently tested, Alice operates on:

  • a 5 × 5 grid;
  • four actions:

    • up;
    • down;
    • left;
    • right.

Q-learning explores the environment and produces a policy.

This policy can then be exported as a circuit.

The following technical pipeline was successfully tested:

RL Environment
       ↓
   Q-learning
       ↓
     Policy
       ↓
     Circuit
       ↓
  Living Map
       ↓
     Router
Enter fullscreen mode Exit fullscreen mode

The role of RL in this context is therefore not defined as general improvement of Qwen.

RL is used to acquire a procedure for a specific task.


10. What “Learning” Means for Alice

Within this architecture, learning means acquiring an exploitable capability or procedure that was not previously available in Alice's knowledge.

The expected outcome of a learning process is:

  1. Discovery or production of a solution.
  2. Transformation of that solution into an exploitable representation.
  3. Retention in the appropriate memory or map.
  4. Ability to retrieve that knowledge.
  5. Ability to use it later.

Learning does not necessarily require modifying the language model's weights.


11. What Alice Is Not

  • Alice is not simply Qwen.
  • Alice is not simply a chatbot with an interface.
  • Alice is not required to relearn a capability it already possesses.
  • Alice does not have the intrinsic objective of continuously maximizing a score.
  • Alice does not need to replace a functional procedure simply because another procedure might be more performant.
  • Alice should not be rebuilt according to a generic AI-agent architecture without justification from its actual architecture.
  • Deliberately deleting learned knowledge is not a meaningful test of Alice's ability to reuse that knowledge.

12. Rules for AI Agents Working on Alice

Any AI working on Alice must follow these rules:

  1. Treat this document as the reference definition of Alice.
  2. Inspect the existing architecture before proposing a modification.
  3. Distinguish the language model from the Alice architecture.
  4. Identify the actual role of a component before assigning it a new function.
  5. Do not introduce a feature merely because it is common in agentic systems.
  6. Do not replace existing knowledge without a demonstrated functional reason.
  7. Do not confuse learning, optimization and memorization.
  8. When a capability is declared acquired, verify the complete chain:
Production
    ↓
Retention
    ↓
Retrieval
    ↓
Execution
Enter fullscreen mode Exit fullscreen mode
  1. Report separately:
  • what is established through execution;
  • what is inferred from the code;
  • what remains to be verified.
    1. Never declare a mechanism functional based solely on the presence of code: execution and testing are required.

13. Technical State Observed on August 28, 2026

The following elements come from the inspections and tests provided with this document.

They do not constitute a promise of a permanent state.

Machine and Model

  • Alice machine: 192.168.1.61.
  • OS and hardware characteristics: the supplied reports contain two contradictory inventories for the host machine; this contradiction must be resolved before documenting the hardware precisely.
  • Qwen: one report describes Qwen2.5-3B-Instruct Q4_K_M on Alice; another describes Qwen2.5-Coder-1.5B on a separate machine / previous environment. They must not be merged.
  • On Alice, llama-server is used to serve the local model.

RL

  • Environment and Q-learning successfully tested after installing Gymnasium in the venv.
  • RL tests: 4/4 pytest tests passed.
  • RL → circuit → map → router pipeline: successfully tested.

Memory

  • SQLite: procedure persisted and readable.

Items Remaining to Verify

  • Historical /home/orel paths were corrected in the execution report; the final state must be considered the state actually verified on the machine, not an assumption.
  • Some elements still require independent verification, notably:

    • the final consistency of installation scripts;
    • the consistency of startup scripts;
    • the exact state of the living map before any deployment or open-source operation.

14. Validation Criteria for a New Capability

To declare that Alice genuinely possesses a new capability, the following evidence should be prioritized:

  1. The task was previously unsupported, or no corresponding procedure was available.
  2. The appropriate mechanism produces a solution.
  3. The solution is stored in the intended memory / map representation.
  4. Alice can retrieve that knowledge.
  5. Alice can execute the retrieved procedure.

A quantitative improvement test is necessary only when the actual objective of the feature is optimization.

It should not be imposed as the general definition of learning for Alice.


15. Reference Formula

ALICE =
    MODEL
  + MEMORY
  + MAP
  + ROUTING
  + CIRCUITS
  + TOOLS
  + LEARNING
  + EXECUTION
Enter fullscreen mode Exit fullscreen mode

No single component defines Alice.

Her operational intelligence emerges from the system as a whole and from the interactions between its components.


Reference

ALICE — Architectural Reference Document
Reference Version: August 28, 2026

Top comments (0)