PitchHut logo
ALI Reference Implementation
Autonomous agents with separated viability, behaviour, and normative evaluation.
Pitch

ALI separates autonomous agents into 5 components: Causal Core (viability), Ego (behaviour generation), Super-Ego (normative evaluation), Memory (immutable decision records), Runtime (coordination). Zero dependencies. 72 tests. 44 verified compliance requirements. Full plugin system.

Description

ALI Reference Implementation

Artificial Local Intelligence (ALI) — Reference Implementation v0.4
This repository presents an open-source reference architecture and executable Python implementation for Artificial Local Intelligence (ALI), a system designed for enhancing the capabilities of autonomous agents. The architecture distinctly separates five key organizational responsibilities, encapsulating them in independent components:

  • Causal Core: Assesses operational viability prior to planning.
  • Ego: Generates behavioral proposals devoid of evaluation.
  • Super-Ego: Evaluates proposals while refraining from generation.
  • Memory: Ensures every decision is recorded as a complete, immutable Event.
  • Runtime: Manages the operational cycle without engaging in reasoning.

This implementation adheres to a compliance specification of 44 verifiable SHALL requirements, fulfilling each of them.

Requirements

  • Python 3.11 or later
  • No third-party packages required

Quick Start

To interact with the system, the following commands can be executed:

# Create demonstration files  
python main.py init  

# Execute a single cycle (dry run — no files modified)  
python main.py run  

# Apply approved actions  
python main.py run --apply  

# Display the current viability state and recent Events  
python main.py status  

# Reverse the last executed action  
python main.py rollback  

# Run the complete test suite  
python -m unittest discover -s tests -v  

Project Structure

The project is organized into several directories and files:

ali/                    Core architecture  
    causal_core.py      Operational viability assessment  
    ego.py              Behavioural proposal generation  
    super_ego.py        Normative evaluation  
    memory.py           Immutable Event storage (SQLite)  
    runtime.py          Cycle coordination  
    interfaces.py       Abstract base classes for all components  
    plugins.py          ComponentFactory — plugin system  
    models.py           Architectural data objects (frozen dataclasses)  
    configuration.py    Configuration loading  

examples/  
    llm_ego.py          Plugin example: LLM-based Ego (stub mode)  
    README.md           Plugin development guide  

config/  
    ali_config.json                Standard configuration  
    ali_config_llm_example.json    Example: LLM Ego via plugin  

tests/  
    test_architecture.py    Hard norm and component boundary tests  
    test_runtime.py         Operational cycle and learning tests  
    test_plugins.py         Plugin system tests  
    test_compliance.py      All 44 SHALL requirements verified  

workspace/              Default operational domain (local files)  
main.py                 Command-line interface  

Plugin System

The architecture allows for seamless replacement of any component without altering the existing codebase. To add a new component, include a components entry in ali_config.json:

{  
  "components": {  
    "ego": {  
      "class": "examples.llm_ego.LLMEgo",  
      "params": {  
        "model": "claude-sonnet-4-6",  
        "stub": true  
      }  
    }  
  }  
}  

For comprehensive instructions on developing plugins, refer to examples/README.md.

Test Suite

The implementation includes a robust test suite that verifies compliance and functionality:

72 tests — 0 failures

test_compliance.py    41 tests — all 44 SHALL requirements verified  
test_plugins.py       15 tests — plugin loading and integration  
test_architecture.py   9 tests — component boundaries and hard norms  
test_runtime.py        7 tests — operational cycle and learning

References

For further reading on the architectural specifications, consult the following resources:

  • Full architectural specification (book):
    Stegemann, W. (2026). Artificial Local Intelligence: Architecture and Reference Implementation. Zenodo. Link
  • Scientific paper:
    Stegemann, W. (2026). Artificial Local Intelligence: Architecture and Reference Implementation. Zenodo. Link

The ALI reference implementation provides a structured approach to developing autonomous agents, ensuring modularity and adherence to well-defined operational norms.

0 comments

No comments yet.

Sign in to be the first to comment.