← Archive
lm-002336 · 2026-08

05_持續世界狀態_母AI如何一直醒著

下載 MD 檔 ⬇

05.持續世界狀態:母 AI 如何一直醒著

從 Always-On LLM 誤解到事件驅動、耐久狀態與分層喚醒 Runtime

《母 AI 與區域認知體:AI 中心動態認知系統》第五篇

作者:Neo.K × Aletheia
版本:v0.1
日期:2026-08-01
文件性質:公開命題論文/Persistent AI Runtime 架構研究


摘要

第一部建立了 Mother AI 的四個核心條件:持續狀態、三向耦合、動態認知拓撲與二階控制。第二部開始面對最直接的工程問題:

如果 Mother AI 必須跨時間持續存在,它是否意味著大型語言模型必須 24 小時持續高成本推理?

本文的答案是否定的。

Mother AI 的「一直醒著」不應理解為:

LLM inference=24/7.\text{LLM inference}=24/7.

真正需要持續存在的是:

durable state+event stream+commitments+timers+triggers+monitoring\boxed{ \text{durable state} + \text{event stream} + \text{commitments} + \text{timers} + \text{triggers} + \text{monitoring} }

而高成本推理可以是按需喚醒。

本文提出五層持續性架構:

L0:Runtime LivenessL_0:\text{Runtime Liveness} L1:Durable StateL_1:\text{Durable State} L2:Event / Trigger EngineL_2:\text{Event / Trigger Engine} L3:Low-Cost MonitoringL_3:\text{Low-Cost Monitoring} L4:Deep Cognitive Activation.L_4:\text{Deep Cognitive Activation}.

Mother AI 因此可被建模為多速率系統:底層以毫秒至秒級處理事件、心跳、排程與狀態同步;中層以規則、小模型與已編譯策略判斷是否升級;只有當未知、風險、衝突、長期目標或不可逆行動需要時,才喚醒更昂貴的模型、multi-agent topology、模擬與人類治理。

本文定義耐久母狀態:

DtM=(W^t,Mt,Tt,Ct,Γt,Pt,Qt,Gt,Ht)D_t^M = ( \widehat W_t, \mathcal M_t, T_t, C_t, \Gamma_t, P_t, Q_t, G_t, H_t )

其中除了世界估計與記憶,還包含 tasks、commitments、permissions、provenance、scheduled triggers、goals 與歷史。這與 2026 年 Always-On Agents 文獻將 persistent agent 視為「durable-state system」的觀點相符;其可操作狀態不只包括記憶,還包括 task ledger、permissions、credentials、commitments、provenance、audit records、shared state、trigger conditions 與 externally committed effects。

本文同時借用 Apache Kafka 的 event streaming、Temporal 的 durable execution,以及 LangGraph 的 checkpoint/resume 機制作為現實工程參照。Kafka 顯示事件可以被持續捕捉、耐久保存、即時與回溯處理;Temporal 顯示長時間 Workflow 可以跨 crash、network failure 與 infrastructure outage 後從原狀態恢復;LangGraph 則顯示 Agent graph 的 state checkpoint、interrupt、resume、time-travel 與 fault tolerance 已成為實際 Runtime 能力。這些技術並不等於 Mother AI,但它們證明「持續 AI」不必依賴單一進程或單一模型一直在線,而可以建立在耐久狀態與可恢復執行之上。

本文最終提出 Mother AI 的 persistent loop:

etDtMTriggerλtCtatet+1\boxed{ e_t \rightarrow D_t^M \rightarrow \operatorname{Trigger} \rightarrow \lambda_t \rightarrow \mathcal C_t \rightarrow a_t \rightarrow e_{t+1} }

其中 λt\lambda_t 是認知喚醒層級。真正的 Mother AI 並不是「永遠在想」,而是「永遠沒有失去自己正在處理什麼世界、有哪些承諾、哪些事情值得被喚醒」。

關鍵詞: Mother AI、Persistent Agent、Always-On Agent、Durable State、Event Streaming、Event Sourcing、Durable Execution、Trigger Engine、Checkpoint、Long-Running Agent


一、最大的工程誤解:一直醒著等於一直推理?

若 Mother AI 被描述成:

持續觀察世界、持續管理 Agent、持續維持目標,

很容易被理解成:

frontier LLM×24 hours/day.\text{frontier LLM} \times 24\text{ hours/day}.

這既昂貴,也沒有必要。

生物的大腦也不是所有認知層級永遠處在最高強度。

數位系統更可以明確分層。

因此本文首先提出:

PersistenceContinuous High-Cost Cognition.\boxed{ \text{Persistence} \neq \text{Continuous High-Cost Cognition}. }

二、持續存在首先是「狀態沒有消失」

假設 Mother AI 在:

t0t_0

知道:

  • 有三個未完成任務;
  • 某供應商承諾明天交貨;
  • 某 Agent 正在等待人工批准;
  • 某服務可能在兩小時後超出容量;
  • 某研究問題仍屬未知。

到了:

t1=t0+8h,t_1=t_0+8h,

即使期間沒有任何大型模型推理,

這些狀態仍然必須存在。

所以:

Mt1 必須承接 Mt0.\boxed{ M_{t_1} \text{ 必須承接 } M_{t_0}. }

這才是「一直醒著」的第一層含義。


三、持續 AI 的核心不是 Context Window

如果所有狀態都只放在:

CtLLM,C_t^{LLM},

那麼:

  • context overflow;
  • process restart;
  • model replacement;
  • session expiration;

都可能造成:

Mt0.M_t\rightarrow0.

因此:

Durable Mother State⊈LLM Context Window.\boxed{ \text{Durable Mother State} \not\subseteq \text{LLM Context Window}. }

LLM context 應只是持久狀態的局部投影。


四、耐久母狀態

本文定義:

DtM=(W^t,Mt,Tt,Ct,Γt,Pt,Qt,Gt,Ht)\boxed{ D_t^M = ( \widehat W_t, \mathcal M_t, T_t, C_t, \Gamma_t, P_t, Q_t, G_t, H_t ) }

其中:

  • W^t\widehat W_t :當前世界估計;
  • Mt\mathcal M_t :長期記憶;
  • TtT_t :task ledger;
  • CtC_t :commitments/承諾;
  • Γt\Gamma_t :permissions/credentials;
  • PtP_t :provenance/audit;
  • QtQ_t :timers/triggers/schedules;
  • GtG_t :goals/priorities;
  • HtH_t :歷史。

這比一般「AI memory」大很多。


五、2026 年 Always-On Agents 已經直接提出類似問題

Always-On Agents 的 2026 調查把 persistent agent 定義為:

未來行為依賴先前互動累積的 durable state。

其 persistent state 不只包括 retrievable memories,

還包括:

  • task ledgers;
  • permissions;
  • credentials;
  • commitments;
  • provenance;
  • audit records;
  • shared state;
  • trigger conditions;
  • externally committed effects。

這提供一個很重要的工程判斷:

持續 AI 是狀態治理問題,不只是記憶檢索問題。\boxed{ \text{持續 AI 是狀態治理問題,不只是記憶檢索問題。} }

六、五層 Persistent Mother Runtime

本文提出:

L0L_0 :Runtime Liveness

服務本身仍活著:

  • process;
  • cluster;
  • scheduler;
  • watchdog;
  • health check。

L1L_1 :Durable State

狀態可:

  • persist;
  • checkpoint;
  • replay;
  • restore。

L2L_2 :Event / Trigger Engine

持續接收:

  • world events;
  • timers;
  • task events;
  • agent events;
  • human input。

L3L_3 :Low-Cost Monitoring

使用:

  • rules;
  • thresholds;
  • small models;
  • anomaly detectors;
  • compiled policies。

L4L_4 :Deep Cognitive Activation

必要時才啟動:

  • strong LLM;
  • multi-agent;
  • simulation;
  • human review。

七、因此 Mother AI 是多速率系統

令:

τ0<τ1<τ2<τ3<τ4.\tau_0<\tau_1<\tau_2<\tau_3<\tau_4.

不同層有不同時間尺度。

例如:

L0:103100sL_0: 10^{-3}\sim10^0s L1:102101sL_1: 10^{-2}\sim10^1s L2:102102sL_2: 10^{-2}\sim10^2s L3:101103sL_3: 10^{-1}\sim10^3s L4:100105sL_4: 10^0\sim10^5s

這些只是概念尺度。

真正重點是:

不是所有認知層都以同一頻率運行。\boxed{ \text{不是所有認知層都以同一頻率運行。} }

八、世界事件流

令:

E={e1,e2,}.\mathcal E = \{ e_1,e_2,\ldots \}.

每個事件:

et=(type,source,time,payload,confidence,authority).e_t = ( type, source, time, payload, confidence, authority ).

例如:

  • 新訂單;
  • 伺服器異常;
  • 合約簽署;
  • Agent 完成任務;
  • 人類拒絕批准;
  • 預算超標;
  • 外部新聞事件。

Mother AI 不必主動「一直問世界發生什麼」。

世界可以:

push events\boxed{ \text{push events} }

進入 Runtime。


九、Kafka 類系統已經證明 Always-On Event World 可行

Apache Kafka 將 event streaming 定義為:

  • 即時捕捉事件;
  • 耐久保存;
  • 即時或回溯處理;
  • 將事件路由到不同目的地。

因此:

World Events\boxed{ \text{World Events} }

不必透過 Mother AI 自己持續 polling 全世界。

可以由 event infrastructure 負責。


十、事件不是「目前狀態」

例如:

et=inventory -10.e_t= \text{inventory -10}.

這不是完整世界狀態。

狀態是:

Wt.W_t.

事件則是:

ΔWt.\Delta W_t.

所以:

Wt+1=F(Wt,et).W_{t+1} = F( W_t,e_t ).

這個區分是持續 Runtime 的地基。


十一、Event Sourcing

Event Sourcing 的核心思想是:

不只保存最後狀態,而保存造成狀態改變的一系列事件。

即:

E0:t={e0,,et}.E_{0:t} = \{e_0,\ldots,e_t\}.

再由:

Wt=Project(E0:t).W_t = \operatorname{Project}(E_{0:t}).

因此可以:

  • replay;
  • audit;
  • reconstruct;
  • fork。

這非常適合 Mother AI。


十二、但不是所有世界資料都必須 Event-Sourced

完整企業世界可能極大。

如果所有細節都:

append-only events,\rightarrow \text{append-only events},

成本會很高。

更合理是:

關鍵狀態採 event log,普通狀態採 snapshot/database。\boxed{ \text{關鍵狀態採 event log,普通狀態採 snapshot/database。} }

形成 hybrid architecture。


十三、事件日誌與物化狀態

定義:

LtL_t

append-only event log。

同時:

Stview=Project(Lt).S_t^{view} = \operatorname{Project}(L_t).

Mother AI 日常查詢:

Stview,S_t^{view},

需要稽核時:

Lt.L_t.

所以:

事件是歷史真相來源之一;Projection 是日常工作視圖。\boxed{ \text{事件是歷史真相來源之一;Projection 是日常工作視圖。} }

十四、ESAA 已把這種架構帶進 LLM Agent

2026 年 ESAA 將:

agent cognitive intention\text{agent cognitive intention}

與:

state mutation\text{state mutation}

分離。

Agent 只輸出結構化 intention,

deterministic orchestrator:

  • validate;
  • persist event;
  • apply effect;
  • project state;
  • verify replay。

這是一個很重要的設計:

AI 可以是概率性的,但世界狀態修改不必是概率性的。\boxed{ \text{AI 可以是概率性的,但世界狀態修改不必是概率性的。} }

十五、Mother AI 不應直接修改耐久狀態

Mother AI 可以產生:

intentt.intent_t.

例如:

IncreasePriority(task_142)

但真正的:

DtMDt+1MD_t^M\rightarrow D_{t+1}^M

應由:

validated state transition\text{validated state transition}

完成。

因此:

CognitionState Mutation.\boxed{ \text{Cognition} \neq \text{State Mutation}. }

十六、Command 與 Event 應分離

Command:

ct=請做某件事.c_t = \text{請做某件事}.

Event:

et=某件事已經發生.e_t = \text{某件事已經發生}.

例如:

ct=SendEmailc_t=\text{SendEmail}

成功後:

et+1=EmailSent.e_{t+1}=\text{EmailSent}.

若失敗:

et+1=EmailSendFailed.e_{t+1}=\text{EmailSendFailed}.

Mother AI 的世界模型應以 Event 更新,

而不是以「我打算做」更新。


十七、Intent 也不是 Event

LLM 說:

我將重新部署服務。

不能立即寫:

Wt+1=service redeployed.W_{t+1}=\text{service redeployed}.

只有外部 executor 回傳:

e=DeploymentSucceedede=\text{DeploymentSucceeded}

才可更新。

所以:

IntentionCommitted EffectObserved Event.\boxed{ \text{Intention} \neq \text{Committed Effect} \neq \text{Observed Event}. }

十八、持續系統最怕 Ghost State

Ghost State 指:

AI 記憶中以為某件事已發生,但外部世界其實沒有。

例如:

W^t=payment complete,\widehat W_t = \text{payment complete},

但:

Wt=payment failed.W_t^\ast = \text{payment failed}.

因此:

State Reconciliation\boxed{ \text{State Reconciliation} }

是 Mother AI Runtime 的核心功能。


十九、State Reconciliation

定義:

W^t\widehat W_t

Mother AI 世界估計,

OtO_t

最新可觀測狀態。

如果:

D(W^t,Ot)>ϵ,D( \widehat W_t,O_t ) > \epsilon,

則:

Reconcile().\operatorname{Reconcile}().

可能:

  • 修正 memory;
  • 取消 commitment;
  • 重跑 task;
  • 降低資料源信任;
  • 升級人工檢查。

二十、時間也是狀態

很多任務不是事件立刻觸發,

而是:

明天九點檢查。

三天沒收到回覆就追蹤。

合約 30 天後到期。

因此需要:

Qttimer.Q_t^{timer}.

計時器事件:

ettimee_t^{time}

同樣進入事件流。


二十一、Mother AI 必須記住「尚未發生但必須發生的事」

這就是:

CtC_t

commitment ledger。

例如:

ci=(goal,deadline,owner,condition,status).c_i = ( goal, deadline, owner, condition, status ).

所以:

承諾不是文字記憶,而是具有未來觸發力的狀態。\boxed{ \text{承諾不是文字記憶,而是具有未來觸發力的狀態。} }

二十二、Task Ledger

Mother AI 不應只記:

曾經有一個 task。

而要有:

Ti=(id,goal,state,owner,dependencies,deadline,budget,result).T_i = ( id, goal, state, owner, dependencies, deadline, budget, result ).

狀態:

Ti(t){pending,running,blocked,waiting,done,failed,cancelled}.T_i(t) \in \{ pending, running, blocked, waiting, done, failed, cancelled \}.

這讓長期任務跨 session 存在。


二十三、等待也是一種合法狀態

普通聊天 Agent 容易傾向:

沒答案就繼續想。

Persistent Agent 更需要:

WAIT\boxed{ \text{WAIT} }

例如:

  • 等人批准;
  • 等供應商回覆;
  • 等資料抵達;
  • 等定時器;
  • 等外部事件。

所以:

no action\text{no action}

可以是正確策略。


二十四、Temporal Durable Execution 提供非常接近的工程能力

Temporal 的 Durable Execution 允許 Workflow:

  • 保存運行狀態;
  • 遇 crash/network failure 後恢復;
  • pause;
  • retry;
  • run for days/weeks/months。

這說明:

Long-running cognition\boxed{ \text{Long-running cognition} }

不需要依賴一個永不重啟的 process。

持續性可以由 Runtime 提供。


二十五、Mother AI Persistence 不等於 Process Persistence

即使 Mother AI process:

PtP_t

崩潰,

只要:

DtMD_t^M

仍耐久保存,

新的 process:

Pt+1P_{t+1}

可以:

Restore(DtM).\operatorname{Restore}(D_t^M).

因此:

Identity ContinuityProcess Continuity.\boxed{ \text{Identity Continuity} \neq \text{Process Continuity}. }

這是一個很重要的工程結論。


二十六、模型也可以更換而狀態不消失

假設:

Lt=LA,L_t=L_A,

後來改成:

Lt+1=LB.L_{t+1}=L_B.

只要:

DtMD_t^M

與核心 protocol 保留,

Mother AI 可以保持功能連續。

所以:

Mother AI identitysingle model identity.\boxed{ \text{Mother AI identity} \neq \text{single model identity}. }

二十七、LangGraph 的 checkpoint/resume 也提供直接參照

LangGraph persistence 會在 graph execution 的 super-step 保存 checkpoint。

因此可以:

  • memory across interactions;
  • human-in-the-loop;
  • time travel;
  • fault tolerance;
  • resume after interrupt。

這證明:

Agent graph state\boxed{ \text{Agent graph state} }

已經可以被外部化為 durable checkpoint。


二十八、Interrupt 是一級 Runtime 能力

LangGraph 的 interrupt 可以:

pausepersist statewait indefinitelyresume.\text{pause} \rightarrow \text{persist state} \rightarrow \text{wait indefinitely} \rightarrow \text{resume}.

這和 Mother AI 的「等待人類批准」高度一致。

所以:

pause\boxed{ \text{pause} }

不是 Agent 失敗,

而是合法生命週期。


二十九、持續狀態需要 Checkpoint,也需要 Event Log

Checkpoint:

CkC_k

表示:

某一時刻完整狀態。

Event Log:

Ek:k+nE_{k:k+n}

表示:

之後發生什麼。

恢復:

Dt=Replay(Ck,Ek:t).D_t = \operatorname{Replay}( C_k, E_{k:t} ).

這比從創世事件全部 replay 更有效率。


三十、Snapshot 週期

令:

NEN_E

為自上次 snapshot 以來的事件數。

若:

NE>τS,N_E>\tau_S,

則:

Snapshot(Dt).\operatorname{Snapshot}(D_t).

也可以按:

  • time;
  • state size;
  • risk;
  • task milestone;

決定 snapshot。


三十一、Mother AI 的狀態不是只有一份

可以分:

DtM=DthotDtwarmDtcold.D_t^M = D_t^{hot} \oplus D_t^{warm} \oplus D_t^{cold}.

Hot

當前:

  • active tasks;
  • alerts;
  • priorities;
  • working memory。

Warm

近期:

  • project context;
  • recent decisions;
  • agent performance。

Cold

長期:

  • historical records;
  • archived evidence;
  • old trajectories。

三十二、不同層使用不同 Storage

Hot state:

fast KV / in-memory cache.\rightarrow \text{fast KV / in-memory cache}.

Warm state:

relational / graph / vector.\rightarrow \text{relational / graph / vector}.

Cold state:

object storage / archive.\rightarrow \text{object storage / archive}.

所以:

Mother AI Memory\boxed{ \text{Mother AI Memory} }

本身就應是分層儲存系統。


三十三、Trigger Engine

定義:

Tr={τ1,τ2,,τn}.\mathcal T_r = \{ \tau_1,\tau_2,\ldots,\tau_n \}.

每個 trigger:

τi:(Dt,et){0,1}.\tau_i: (D_t,e_t) \rightarrow \{0,1\}.

若:

τi=1,\tau_i=1,

就喚醒對應認知配置。


三十四、六類 Trigger

34.1 Event Trigger

et=specific event.e_t=\text{specific event}.

34.2 Time Trigger

tt.t\geq t^\ast.

34.3 Threshold Trigger

xt>θ.x_t>\theta.

34.4 Absence Trigger

¬e within Δt.\neg e \text{ within } \Delta t.

例如:

兩天沒收到回覆。

34.5 Drift Trigger

D(Pt,Ptk)>δ.D(P_t,P_{t-k})>\delta.

34.6 Commitment Trigger

Ci approaching deadline.C_i \text{ approaching deadline}.

三十五、Absence Event 很重要

很多世界事件是:

什麼都沒發生。

例如:

  • 沒收到付款;
  • 沒有 Agent 回報;
  • 備份沒完成;
  • API 沒更新。

所以 Runtime 必須能生成:

etabsence.e_t^{absence}.

這也是普通 event bus 容易被忽略的地方。


三十六、認知喚醒層級

定義:

λt{0,1,2,3,4}.\lambda_t \in \{ 0,1,2,3,4 \}.

λ=0\lambda=0

Sleep / passive persistence。

λ=1\lambda=1

Rule monitoring。

λ=2\lambda=2

Small-model cognition。

λ=3\lambda=3

Strong-model/specialist agent。

λ=4\lambda=4

Multi-agent/simulation/human governance。

所以:

λt\boxed{ \lambda_t }

是 Mother AI 的認知功率狀態。


三十七、喚醒函數

λt=Fλ(risk,unknown,urgency,irreversibility,novelty,commitment).\lambda_t = F_\lambda( risk, unknown, urgency, irreversibility, novelty, commitment ).

例如:

Utλt.U_t\uparrow \Rightarrow \lambda_t\uparrow. Risktλt.Risk_t\uparrow \Rightarrow \lambda_t\uparrow. Knowntλt.Known_t\uparrow \Rightarrow \lambda_t\downarrow.

三十八、這是「已知則低功耗、未知則高喚醒」

前一系列:

KnownCompiled.\text{Known} \rightarrow \text{Compiled}.

現在:

Knownλ.\boxed{ \text{Known} \rightarrow \lambda\downarrow. } Unknownλ.\boxed{ \text{Unknown} \rightarrow \lambda\uparrow. }

因此記憶編譯直接轉化成能源與算力效率。


三十九、最低層可以完全不用 LLM

很多 trigger:

x>θx>\theta

可以由規則判斷。

很多 anomaly:

z>τz>\tau

可以由統計模型判斷。

很多 scheduling:

t=tt=t^\ast

由 timer 完成。

因此:

L0,L1,L2\boxed{ L_0,L_1,L_2 }

完全可以低成本運行。


四十、母 AI 的「注意」可以是稀疏的

假設世界有:

10610^6

個 state variables。

Mother AI 不必每秒對全部做 LLM reasoning。

可以先由:

FsalienceF_{\mathrm{salience}}

計算:

si(t).s_i(t).

只將:

si>τs_i>\tau

的狀態送入高階認知。

所以:

Persistent ObservationPersistent Deep Attention.\boxed{ \text{Persistent Observation} \neq \text{Persistent Deep Attention}. }

四十一、Salience Queue

定義:

Qtsalience={(ei,si)}.Q_t^{salience} = \{ (e_i,s_i) \}.

依:

sis_i

排序。

Mother AI 按資源:

RtR_t

選擇處理前:

kk

個事件。

這使:

注意力本身成為排程問題。\boxed{ \text{注意力本身成為排程問題。} }

四十二、Backpressure

如果事件速度:

λE\lambda_E

高於處理速度:

μE,\mu_E,

即:

λE>μE,\lambda_E>\mu_E,

隊列會爆炸。

所以 Persistent Runtime 必須有:

  • batching;
  • aggregation;
  • dedup;
  • priority drop;
  • compression;
  • backpressure。

這是典型 stream processing 問題。


四十三、不是每個 Event 都值得進記憶

如果:

eie_i

沒有新資訊:

ΔN(ei)0,\Delta N(e_i)\approx0,

可以只更新:

  • counter;
  • timestamp;
  • confidence。

不必保存完整 payload。

所以:

Event PersistenceInfinite Raw Logging.\boxed{ \text{Event Persistence} \neq \text{Infinite Raw Logging}. }

四十四、Event Compression

可將:

{e1,,en}\{e_1,\ldots,e_n\}

壓縮成:

eˉ.\bar e.

例如:

過去一小時 CPU 在 70–74% 間穩定。

而不是保存每秒 3600 份認知摘要。


四十五、Heartbeat

Mother AI Runtime 還需要:

hth_t

heartbeat。

每個關鍵 Agent/service 定期回報:

heartbeati(t).heartbeat_i(t).

若:

tlastHeartbeati>τi,t-lastHeartbeat_i>\tau_i,

生成:

etfailure.e_t^{failure}.

所以:

Silence\boxed{ \text{Silence} }

也能被轉換成事件。


四十六、Agent Liveness 與 Agent Cognition 不同

Agent:

AiA_i

可以:

alive=1alive=1

但:

thinking=0.thinking=0.

這完全正常。

因此:

AliveActively Reasoning.\boxed{ \text{Alive} \neq \text{Actively Reasoning}. }

Mother AI 本身也一樣。


四十七、Persistent Mother AI 的最低生命狀態

即使沒有高階推理,

只要:

{DtM,Qt,Et,Γt}\{ D_t^M, Q_t, \mathcal E_t, \Gamma_t \}

仍持續,

Mother AI 就沒有「失憶死亡」。

這是一個工程層面的存在判準。


四十八、但 durable state 也可能腐化

問題包括:

  • schema drift;
  • stale state;
  • conflicting events;
  • duplicated events;
  • permission mismatch;
  • invalid commitment。

所以 Persistence 不是:

write once.\text{write once}.

而是:

writevalidateorganizeauditrepair.\boxed{ \text{write} \rightarrow \text{validate} \rightarrow \text{organize} \rightarrow \text{audit} \rightarrow \text{repair}. }

四十九、State TTL

某些資料過期後:

valid(xt)=0.valid(x_t)=0.

因此每個 state 可以帶:

TTLi.TTL_i.

若:

tti>TTLi,t-t_i>TTL_i,

則:

status=stale.status=stale.

Mother AI 不應拿 stale state 當現在真實世界。


五十、Staleness 本身應該進 Unknown

若:

Age(x)>τ,Age(x)>\tau,

則:

Ustale(x).U_{\mathrm{stale}}(x)\uparrow.

這可能觸發:

  • refresh;
  • re-query;
  • human check。

所以:

Unknown\boxed{ \text{Unknown} }

不只來自「從沒見過」。

也來自:

資料已經太舊。


五十一、Persistent Goal

Mother AI 也要記住:

Gt.G_t.

例如:

本季將服務中斷率降低 20%。

這個 goal 不應因 session 結束而消失。

但 goal 也有:

  • owner;
  • scope;
  • priority;
  • expiration;
  • authority。

所以:

Gi=(objective,owner,scope,priority,deadline,status).G_i = ( objective, owner, scope, priority, deadline, status ).

五十二、Goal 不是 Prompt

Prompt:

幫我看看目前服務穩不穩。

Goal:

未來三個月維持 SLA 99.9%。

兩者完全不同。

Mother AI Runtime 必須能讓:

long-lived goals\boxed{ \text{long-lived goals} }

持續影響事件與喚醒。


五十三、Goal-Driven Trigger

若 goal:

GiG_i

要求:

metricθ,metric\geq\theta,

而世界:

metric<θ,metric<\theta,

則自動:

Trigger(Gi).\operatorname{Trigger}(G_i).

這表示:

Mother AI 可以因「目標偏離」而自己醒來。\boxed{ \text{Mother AI 可以因「目標偏離」而自己醒來。} }

不需要人 prompt。


五十四、世界狀態與 Goal Gap

定義:

ΔGt=D(W^t,Wtdesired).\Delta G_t = D( \widehat W_t, W_t^{desired} ).

若:

ΔGt>τG,\Delta G_t>\tau_G,

則:

λt.\lambda_t\uparrow.

這是 goal-driven autonomy 的最小形式。


五十五、Persistent autonomy 不等於自己亂生目標

PEPA 等 2026 persistent autonomy 研究開始探索 agents 如何內生生成 goals。

但 Mother AI 的企業/區域 MVP 不需要直接採取這麼強的設計。

第一代可以:

GtG_t

主要由:

  • humans;
  • policy;
  • organization;

提供。

Mother AI 只負責:

  • maintain;
  • decompose;
  • monitor;
  • escalate。

這更適合工程實作。


五十六、母 AI 可以自動產生 Subgoal,但不必自動產生 Ultimate Goal

例如:

Gultimate=保持服務可靠.G_{\mathrm{ultimate}} = \text{保持服務可靠}.

Mother AI 可以生成:

g1=檢查容量g_1=\text{檢查容量} g2=檢查錯誤率g_2=\text{檢查錯誤率} g3=建立備援.g_3=\text{建立備援}.

所以:

goal decompositiongoal sovereignty.\boxed{ \text{goal decomposition} \neq \text{goal sovereignty}. }

五十七、Durable Execution 與 Durable Identity

Temporal 類 Runtime 解決:

execution continuity.\text{execution continuity}.

Mother AI 還需要:

cognitive continuity.\text{cognitive continuity}.

也就是:

  • 為什麼這個 task 存在;
  • 它與哪個 goal 相連;
  • 之前做過什麼;
  • 哪些 Agent 被信任;
  • 哪些錯誤已發生。

因此:

Durable ExecutionDurable Mother Identity.\boxed{ \text{Durable Execution} \subset \text{Durable Mother Identity}. }

五十八、Identity Anchor

Mother AI 可以有:

IM=(system id,version,memory lineage,goal lineage,authority root).I_M = ( system\ id, version, memory\ lineage, goal\ lineage, authority\ root ).

即使:

  • process change;
  • model change;
  • cluster migration;

仍能知道:

這是同一條持續運行狀態鏈。


五十九、Versioned Mother State

DtMDt+1MD_t^M \rightarrow D_{t+1}^M

應產生:

versiont.version_t.

這使:

diff(Dt,Dt+1)\operatorname{diff}(D_t,D_{t+1})

可被檢查。

對高風險環境尤其重要。


六十、External Effect 不能簡單 Rollback

內部 state:

DtD_t

可以回滾。

但如果已經:

  • 寄信;
  • 匯款;
  • 發布程式;
  • 下採購;

世界不能真正:

Wt+1Wt.W_{t+1}\rightarrow W_t.

因此需要:

Compensation\boxed{ \text{Compensation} }

而不是假 rollback。


六十一、Saga/Compensating Action

若:

ata_t

不可直接逆轉,

定義:

atca_t^{-c}

補償行動。

例如:

CreateOrder\text{CreateOrder}

對應:

CancelOrder.\text{CancelOrder}.

所以 Persistent Mother AI 必須知道:

哪些 state 可回滾,哪些 world effects 只能補償。\boxed{ \text{哪些 state 可回滾,哪些 world effects 只能補償。} }

六十二、Idempotency

事件 replay 時:

ata_t

不能重做兩次。

所以外部 action 應盡量具有:

IdempotencyKey.\operatorname{IdempotencyKey}.

若同一 command 重送:

a(k)=a(k).a(k)=a(k).

這是 durable Agent Runtime 很重要的工程要求。


六十三、Exactly-Once 不應被當成魔法

Distributed systems 中:

exactly once\text{exactly once}

常需要依賴:

  • idempotency;
  • transaction;
  • dedup;
  • state coordination。

Mother AI 應更保守地設計:

at-least-once delivery+idempotent effects+dedup.\boxed{ \text{at-least-once delivery} + \text{idempotent effects} + \text{dedup}. }

六十四、Persistent Runtime 的完整事件生命週期

etingestvalidatepersistprojecttriggerreasoncommandexecuteobserveet+1.e_t \rightarrow \text{ingest} \rightarrow \text{validate} \rightarrow \text{persist} \rightarrow \text{project} \rightarrow \text{trigger} \rightarrow \text{reason} \rightarrow \text{command} \rightarrow \text{execute} \rightarrow \text{observe} \rightarrow e_{t+1}.

這才是真正閉環。


六十五、Mother AI 的 Persistent Loop

形式化:

Dt+1M=UD(DtM,et)\boxed{ D_{t+1}^M = U_D( D_t^M, e_t ) }

接著:

λt=Fλ(Dt+1M).\lambda_t = F_\lambda( D_{t+1}^M ).

若:

λt>0,\lambda_t>0,

則:

Ct=ΠM(Dt+1M,λt).\mathcal C_t = \Pi_M( D_{t+1}^M, \lambda_t ).

產生:

ctc_t

command。

外部執行後:

et+1.e_{t+1}.

所以:

etDtMλtCtctet+1.\boxed{ e_t \rightarrow D_t^M \rightarrow \lambda_t \rightarrow \mathcal C_t \rightarrow c_t \rightarrow e_{t+1}. }

六十六、Persistent Runtime 是 Event Loop,不是 Infinite Prompt Loop

錯誤想像:

while True:
    ask_LLM("現在該幹嘛?")

較合理:

while runtime_alive:
    event = wait_for_event_or_timer()
    durable_state = apply(event)
    level = trigger_engine(durable_state)
    if level > 0:
        config = meta_controller(durable_state, level)
        execute(config)

所以:

wait\boxed{ \text{wait} }

才是大部分時間的正常狀態。


六十七、這會大幅降低算力需求

假設:

pp

比例事件需要 deep reasoning。

若:

p1,p\ll1,

則高成本算力:

CdeeppCall.C_{\mathrm{deep}} \approx pC_{\mathrm{all}}.

所以:

Persistent AI\boxed{ \text{Persistent AI} }

完全可以在有限企業算力下先做。


六十八、第一代母 AI 不需要每秒更新完整世界模型

可以使用事件驅動:

W^t+1=W^t+ΔW(et).\widehat W_{t+1} = \widehat W_t + \Delta W(e_t).

只有在:

  • reconciliation;
  • restart;
  • periodic verification;

才做完整 refresh。


六十九、Periodic Full Reconciliation

定義:

TR.T_R.

每隔:

TRT_R

做:

FullSync().\operatorname{FullSync}().

平常:

IncrementalUpdate().\operatorname{IncrementalUpdate}().

因此:

incremental fast path+periodic full correction.\boxed{ \text{incremental fast path} + \text{periodic full correction}. }

七十、世界模型需要 freshness map

不同狀態:

xix_i

有不同最後更新時間:

tilast.t_i^{last}.

Mother AI 維持:

Ft={agei}.F_t = \{age_i\}.

查詢時可以知道:

這個資訊是 3 秒前還是 3 天前?

這對真實企業 Agent 很重要。


七十一、持續 Runtime 需要 Watchdog

Mother AI 本身也可能:

  • 卡死;
  • 失去事件;
  • queue 堆積;
  • memory corruption。

所以外部:

WDW_D

watchdog 監控:

health(M).health(M).

如果:

health<τ,health<\tau,

執行:

  • restart;
  • restore;
  • failover;
  • human alert。

七十二、Mother AI 不能只監控別人,不監控自己

Meta-State 應包含:

Selft=(latency,queue,error,memory,compute,drift).Self_t = ( latency, queue, error, memory, compute, drift ).

因此:

self-monitoring\boxed{ \text{self-monitoring} }

是 persistent runtime 的必要部分。


七十三、Self-Drift

如果 Mother AI 的:

routing errorrouting\ error

持續上升,

或:

cost per taskcost\ per\ task

異常上升,

應觸發:

etselfdrift.e_t^{self-drift}.

這可以導致:

  • fallback;
  • model switch;
  • policy review;
  • human audit。

七十四、MVP 不需要所有 Persistence 能力一次完成

第一版可以只做:

  1. Event Bus;
  2. Durable State Store;
  3. Task Ledger;
  4. Timer/Trigger Engine;
  5. Agent Registry;
  6. Checkpoint/Resume;
  7. Small-model monitoring;
  8. Strong-model escalation。

這已經形成:

Weak Persistent Mother Runtime.\boxed{ \text{Weak Persistent Mother Runtime}. }

七十五、MVP 狀態表

最小:

DtM=(world_state,tasks,goals,agents,timers,permissions,history).D_t^M = ( world\_state, tasks, goals, agents, timers, permissions, history ).

不需要一開始就加入所有:

  • social identity;
  • autonomous goal generation;
  • continuous self-reflection。

先證明:

跨事件持續認知\boxed{ \text{跨事件持續認知} }

即可。


七十六、MVP 事件來源

可以只有:

  • GitHub;
  • Email;
  • Calendar;
  • Project DB;
  • server health;
  • human commands。

事件:

Kafka / queue / webhook layer.\rightarrow \text{Kafka / queue / webhook layer}.

Mother Runtime:

state projection.\rightarrow \text{state projection}.

七十七、MVP 喚醒策略

例如:

λ=1\lambda=1

所有普通 events。

λ=2\lambda=2

異常或 deadline。

λ=3\lambda=3

unknown/conflict。

λ=4\lambda=4

financial/irreversible/high-risk。

先人工設 threshold 就可以。


七十八、MVP 成功指標

78.1 State Survival

restart 後:

DtD_t

是否完整恢復。

78.2 Commitment Recall

deadline 是否漏掉。

78.3 Trigger Precision

P(useful activation).P(\text{useful activation}).

78.4 Trigger Recall

P(activatedneeded).P(\text{activated}\mid\text{needed}).

78.5 Deep-Reasoning Ratio

RD=Nλ3Nevents.R_D = \frac{N_{\lambda\ge3}}{N_{\mathrm{events}}}.

78.6 Recovery Time

Trecover.T_{\mathrm{recover}}.

78.7 Duplicate Action Rate

Rdup.R_{\mathrm{dup}}.

七十九、真正關鍵指標:持續性與成本同時成立

如果 Mother AI 很持續,

但:

Ccompute,C_{\mathrm{compute}}\rightarrow\infty,

工程失敗。

如果很便宜,

但:

Rmissed commitment0,R_{\mathrm{missed\ commitment}}\gg0,

也失敗。

所以:

maxcontinuity+useful responsivenesscompute+false wakeups+missed events\boxed{ \max \frac{ \text{continuity} + \text{useful responsiveness} }{ \text{compute} + \text{false wakeups} + \text{missed events} } }

更合理。


八十、Persistent Mother AI 的工程定義

本文暫定:

Persistent Mother AI 是一種以耐久狀態、事件流、任務與承諾帳本、時間與條件觸發器、狀態校正、checkpoint/resume 與分層認知喚醒為基礎的長期 AI Runtime。它不要求高成本模型持續推理,而要求系統跨故障、跨 session、跨模型與跨事件仍然維持世界狀態、目標、承諾、權限與歷史的連續性,並在適當時機喚醒足夠而非最大化的認知能力。

形式上:

PM=(DM,E,Tr,Λ,ΠM,X,R)\boxed{ \mathfrak P_M = ( D^M, \mathcal E, \mathcal T_r, \Lambda, \Pi_M, \mathcal X, \mathcal R ) }

其中:

  • DMD^M :durable mother state;
  • E\mathcal E :event stream;
  • Tr\mathcal T_r :trigger engine;
  • Λ\Lambda :cognitive activation levels;
  • ΠM\Pi_M :meta-controller;
  • X\mathcal X :executor;
  • R\mathcal R :recovery/reconciliation。

八十一、核心結論

Mother AI 要「一直醒著」,

真正需要的是:

狀態一直存在\boxed{ \text{狀態一直存在} }

而不是:

大型模型一直運算.\boxed{ \text{大型模型一直運算}. }

更精確:

Always-On Mother AI=Always-On State+Always-On Event Awareness+On-Demand Cognition.\boxed{ \text{Always-On Mother AI} = \text{Always-On State} + \text{Always-On Event Awareness} + \text{On-Demand Cognition}. }

這使 Mother AI 從科幻式「24 小時超級智能一直思考」下降成可以被現代 distributed systems、event streaming、durable execution 與 Agent runtime 技術逐步實作的工程問題。


八十二、下一篇

有了 Persistent Runtime 後,下一個問題自然是:

既然 Mother AI 不必自己做所有事情,那些 Sub-AI 到底是什麼?

下一篇:

06.《子 AI 是認知器官,不是獨立 Workflow》

將正式研究:

St={A1,,An}S_t=\{A_1,\ldots,A_n\}

如何被:

  • spawn;
  • specialize;
  • duplicate;
  • retire;
  • merge;
  • isolate;

以及不同子 AI 如何形成可替換、可重構的「認知器官系統」。


參考資料與公開技術資料

  1. Ding, T., Nannapaneni, A., Liu, B., & Zhang, L. (2026). Always-On Agents: A Survey of Persistent Memory, State, and Governance in LLM Agents.
    https://arxiv.org/abs/2606.30306

  2. Apache Kafka Documentation (2026). Introduction / Event Streaming.
    https://kafka.apache.org/documentation/

  3. Temporal Technologies (2026). Temporal Platform Documentation / Durable Execution.
    https://docs.temporal.io/

  4. Temporal Technologies (2026). Durable Execution Solutions for AI Apps and Agents.
    https://temporal.io/

  5. LangChain (2026). LangGraph Persistence.
    https://docs.langchain.com/oss/python/langgraph/persistence

  6. LangChain (2026). LangGraph Interrupts.
    https://docs.langchain.com/oss/python/langgraph/interrupts

  7. Brito dos Santos Filho, E. (2026). ESAA: Event Sourcing for Autonomous Agents in LLM-Based Software Engineering.
    https://arxiv.org/abs/2602.23193

  8. Overeem, M., Spoor, M., Jansen, S., & Brinkkemper, S. (2021). An Empirical Characterization of Event Sourced Systems and Their Schema Evolution — Lessons from Industry.
    https://arxiv.org/abs/2104.01146

  9. Liu, K., Li, Y., Zhu, L., & Zhang, W. (2026). PEPA: a Persistently Autonomous Embodied Agent with Personalities.
    https://arxiv.org/abs/2603.00117

  10. Shi, J. et al. (2026). Advancing Omnimodal Embodied Agents from Isolated Skills to Everyday Physical Autonomy.
    https://arxiv.org/abs/2606.27251


內部理論依賴

  1. 01《AI 不是流程中的一個節點》
  2. 02《母 AI、世界狀態機與子智能網路》
  3. 03《會改變拓撲的智能:動態圖論認知系統》
  4. 04《母 AI 是二階控制器》
  5. 《從路徑覆蓋到行星智能:記憶編譯型計算存在論》
  6. 《計算即存在:數位智能的存在強度、計算載體與物理上限》
  7. 《歷史作為狀態變量》
  8. 《誰控制數字神明?:ASI 基礎設施主權、通道控制與無單一主人的超級智能》

本篇將前四篇的 Mother AI 理論轉成 Persistent Runtime,重點不在提升模型本身,而在讓世界狀態、記憶、任務、承諾、權限、時間與事件能跨故障與跨 session 長期存續。


一句話摘要

Mother AI 的「一直醒著」不是大型模型永遠在思考,而是世界狀態、承諾、事件與自我狀態永遠沒有被系統忘掉。\boxed{ \text{Mother AI 的「一直醒著」不是大型模型永遠在思考,而是世界狀態、承諾、事件與自我狀態永遠沒有被系統忘掉。} }