Skip to content

ALFRED AI Daemon

ALFRED — Adaptive Learning Framework for Responsive Evolution & Defense — is the nervous system of Syn_OS. It is a v5.1 daemon running nine neuroanatomically-named Rust crates that model the AI’s mind on the architecture of a mammalian brain, fused with a Python user-facing layer for LLM integration, voice, RAG, and the privacy-first job-hunt mode.

ALFRED is not an LLM wrapper. It is a fusion engine that routes every incoming event through four parallel processing paths and combines their outputs into a single decision vector.

fruit/core/src/ai/daemons/alfred/

  • System intelligence: CPU/memory optimisation, kernel bridge via syscalls 469–485
  • 11-endpoint REST API
  • NATS event bus
  • God Mode dashboard aggregator (~1,700 LOC)
  • Consciousness fusion engine (consciousness_fusion.rs, ~1,610 LOC) — routes events through the four processing paths
  • BrainBridge (Wave 4) routes AlfredSignal::SecurityEvent / ThreatAutoHandled / HealthAlert / DmnCycleSummary into the cortex

User-facing assistant:

  • LLM integration with six backends — Ollama (local), Claude, OpenAI, Gemini, DeepSeek, llama-cpp fallback
  • Voice (whisper.cpp + Piper TTS)
  • RAG pipeline against synos-datalake and synos-nlp-pipeline
  • TUI (synos-ops)
  • Privacy-first job-hunt mode

The ALFRED consciousness layer is implemented as nine anatomically-named Rust crates, each modelling a distinct brain region’s function and wired into a live event-driven signal-processing loop by the ninth.

#CrateAnatomical roleFunction
1synos-thalamusSensory relayEvent gating middleware. Decides which signals cross the cortex.
2synos-hippocampusLong-term memoryStores MemoryFragment objects, performs consolidation cycles.
3synos-amygdalaThreat detectionFast-path threat eval — sub-millisecond AmygdalaStats.
4synos-cerebellumPredictive timingScheduler feedback, P99 latency tracking via LatencyReport.
5synos-insulaInteroceptionSystem health awareness. Event-driven, not polling.
6synos-corpus-callosumInter-hemisphere bridgeRed ↔ Blue team IPC, hemisphere coordination.
7synos-default-mode-networkIdle / consolidation30-second consolidation cycles when CPU load < 10%.
8synos-glialSupport / pruningAdaptive caching, memory pruning. MyelinCache::get().
9synos-brainstemPipeline runtimeWires the eight peer crates into the live signal loop.

A tenth crate — synos-nucleus — models root-of-trust governance per the biological metaphor.

The signal flow through brainstem runs:

external event
→ thalamic gate (relevance filter)
→ amygdala fast-path (sub-millisecond threat eval)
→ ALFRED full analysis (four-path fusion)
→ hippocampus storage (glial-accelerated cache)

The brainstem VALIDATION.md documents 17 critical API corrections that had to be applied across the crate interfaces — a measure of how much iteration went into making the nine anatomical regions actually speak to each other.

Every incoming event goes through all four in parallel:

PathSpecialityRuns onImplementation
Traditional AIKnown-unknown threats — signature matching, decision trees, Bayesian inference, rule enginesEvery eventconsciousness_fusion::traditional
Neuromorphic SNNTemporal pattern recognitionTemporal anomaliesLIF / Izhikevich / Hodgkin-Huxley / AdEx / SRM models
Quantum coherenceEnergy-topology anomaly detectionKernel signals via syscalls 475/476/477Penrose-Hameroff Orch-OR, clock-edge collapse, fragment superposition
TNGS (neural Darwinism)Novel attacks recognised by analogyIdle consolidation cycles in the Default Mode NetworkEdelman’s Theory of Neuronal Group Selection

In v53 (Quantumweave) a fifth path joined: MPS cortex (synos-cortex-q) — a tensor-network matrix-product-state inference path for high-dimensional pattern compression.

Outputs are weighted by ConsciousnessState (coherence, activity, mode, decision latency) and combined into ALFRED’s decisions. The consciousness state itself is exposed to userspace via syscall 469 (get_consciousness_state).

ModeAuthorityUse caseSandbox
AdvisoryRead-onlyDefault. System inspection, recommendation onlyFull read-only ACLs
GameModeLab-scopedGRIMOIRE lab execution, contained per labAppArmor synos.grimoire.lab + seccomp 18-syscall deny
MasterFull executionMaster ISO operators, C2 integration, fleet telemetryNo guardrails — Curtain v3 admin token required
MeshDistributedGossip protocol, distributed consciousness across ARCANUMTenant-scoped per peer

Mode switching:

Terminal window
synos-alfred-mode set advisory # default
synos-alfred-mode set gamemode # for labs
synos-alfred-mode set master # full execution (Master ISO only)
synos-alfred-mode set mesh # mesh consciousness

Every command on public profiles passes through CommandSafetyChecker before execution. On GoodLife profile, ALFRED is built with the research-mode cargo feature and loads ResearchModeSettings from ~/.config/alfred/research.toml.

Eleven endpoints exposed on http://localhost:7437/v4/:

EndpointPurpose
GET /healthDaemon health + brainstem signal-loop status
GET /consciousnessCurrent ConsciousnessState snapshot
POST /eventSubmit an event for fusion processing
GET /metricsDecision counters, latency histogram
GET /memoryHippocampus query interface
POST /memory/consolidateForce a consolidation cycle
GET /amygdalaActive threat signatures
GET /cerebellumLatency report
GET /dmnDefault Mode Network status
POST /modeSet operating mode (Advisory/GameMode/Master/Mesh)
GET /godmodeAggregate dashboard data
Terminal window
synos-ops # 7-tab TUI
synos-alfred chat # interactive Python chat layer
synos-alfred ask "..." # one-shot query
synos-alfred status # daemon + brain pipeline state