Give your AI a brain that remembers, learns, and self-corrects

知境 · 自学习、防幻觉、永不忘的 AI 认知引擎

A self-learning, hallucination-resistant AI cognitive engine that never forgets — fully self-hosted on CPU.

version license stars python deepseek
8
Expert Modules
8
MetaCog Signals
4
Memory Layers
6
Ethics Gates

Live Demo

Click through the steps to see Aelvoxim 知境 in action

aelvoxim — localhost:9701
$ python3 src/run_server.py 9701
Starting Aelvoxim 知境 API server...
Memory system: 4-tier (working / episodic / semantic / procedural)
Learner loop: active
MetaCog: 8 signals monitored, auto-calibrated
Experts: 8 modules registered, parallel execution
Server ready at http://localhost:9701 ↗
$
$ curl -X POST /v1/llm/chat \
  -d '{"messages":[{"role":"user","content":"My name is Alice and I love Rust"}]}'
{ "content": "Nice to meet you, Alice! Rust is a great choice..." }
(entity extracted: Alice → memory.working, "loves Rust" → memory.semantic)

$ curl -X POST /v1/llm/chat \
  -d '{"messages":[{"role":"user","content":"What do I like?"}]}'
{ "content": "You told me earlier that you love Rust programming!" }
Cross-session memory: remembers across conversations.
$
$ tail -5 /root/.aelvoxim/learner/learner.log
[Learner] 🔍 New direction: 'Rust memory management'
[Learner] 🎯 Decomposed: 6 subtasks
[Learner] 📗 Searched: 'Rust ownership explained'
[Learner] ✅ Stored: Rust ownership rules (confidence=0.7)
Background loop autonomously discovers, searches, and validates knowledge.
$
$ cat /root/.aelvoxim/metacog_history.jsonl | tail -1
{ "timestamp":"2026-07-23", "overall_score":0.45,
"triggers": [ { "signal_name":"stagnation", "triggered":true },
{ "signal_name":"repeat_failure","triggered":true } ],
"suggested_actions":["switch_search_engine","rephrase_subtopics"] }
MetaCog detected stagnation — paused failing direction, switched search engine, logged reflection.
$
$ open http://localhost:9701/admin
Admin Dashboard loaded:
📊 5 learning directions | 2140 knowledge entries | 8 experts
🧠 Learner: running | MetaCognition: module loaded
🔐 SentriKit security: enabled (6 ethics gates)
📈 System health: all subsystems online
Full admin panel with cognitive dashboard, skill growth, and system logs.
$

What you get

Everything an AI needs to remember, learn, and think — out of the box

🧠

Persistent Memory

4-tier architecture: working → episodic (7d) → semantic (90d) → procedural (permanent). Cross-session entity extraction, confidence scoring, and forgetting curve.

memoryknowledge graph
🧩

Self-Learning

Background loop discovers topics, searches the web, extracts knowledge, validates quality, and stores it. Curiosity engine with gap analysis and meta-review.

learner loopauto-validation
⚠️

Metacognition

8 degradation signals monitored in real time: success rate, stagnation, repeat failure, external signal, introspection, memory health, trend, belief health. Auto-calibrates.

MetaCogTriggercircuit breaker
🤖

Expert System

8 expert modules run in parallel subprocesses with timeout protection. Router selects 2-4 per query. One crash never takes down others.

orchestratorvoting
📊

Admin Dashboard

Real-time cognitive engine dashboard: learner status, metacognition events, expert orchestration, knowledge stats, and system health. Skill growth timeline included.

FastAPISSE
🛡️

Security & Ethics

6 ethical gates (L1-L6) including rate limiting, circuit breaker, human supervision. Prompt injection guard. Tool permissions tiered by sensitivity.

ethics gatesinjection guard
🔄

Continuous Evolution

MetaCogMonitor runs every 5 minutes. Auto-calibrates thresholds, detects stagnation, triggers reflection, and adapts learning strategy. Self-correcting.

self-healingauto-calibration
🌍

LLM Agnostic

Works with DeepSeek, GPT, Claude, or any OpenAI-compatible API. Configurable per-request. No vendor lock-in. On-prem or cloud.

DeepSeek v4OpenAIAnthropic

Quickstart

Get Aelvoxim 知境 running in under 60 seconds

# Install
$ git clone https://github.com/macor24/aelvoxim.git
$ cd aelvoxim && uv sync

# Configure your LLM
$ cp .env.example .env
$ nano .env # set DEEPSEEK_API_KEY or OPENAI_API_KEY

# Start the API server
$ python3 src/run_server.py 9701
Server ready at http://localhost:9701

# Open the admin dashboard
$ firefox http://localhost:9701/admin

# Start a chat session
$ curl localhost:9701/v1/llm/chat \
  -d '{"messages":[{"role":"user","content":"Hello 知境!"}]}'

vs Agent Frameworks

Aelvoxim adds what other frameworks are missing

CapabilityLangChain / AutoGenAelvoxim 知境
Persistent memory❌ No built-in memory✔ 4-tier memory + knowledge graph
Self-learning❌ No autonomous learning✔ 7x24 curiosity + gap analysis
Metacognition❌ No self-awareness✔ 8-signal monitor + self-correction
Expert orchestration~ Few built-in experts✔ 8 domain expert modules
Hallucination resistance❌ No mechanism✔ Memory-grounded + belief scoring
Admin dashboard❌ No built-in UI✔ Real-time cognitive dashboard
Runs on CPU✔ Yes✔ Yes, no GPU needed
Self-hosted~ Cloud preferred✔ Fully self-hosted, offline capable