Context: Proactive Goal-Directed Intelligence via Composable Sandboxed Programs, Declarative Wiring, and Structured Interaction
Context: Proactive Goal-Directed Intelligence via Composable Sandboxed Programs, Declarative Wiring, and Structured Interaction
Title: Context: Proactive Goal-Directed Intelligence via Composable Sandboxed Programs, Declarative Wiring, and Structured Interaction 标题: Context:通过可组合沙盒程序、声明式连接与结构化交互实现的主动目标导向智能
Abstract: We present Context, the intelligence layer of the Magarshak Architecture, which replaces reactive query-response chatbots with proactive goal-directed agents that advance shared tasks without waiting for user prompts. 摘要: 我们提出了 Context,这是 Magarshak 架构的智能层。它将传统的被动式“查询-响应”聊天机器人替换为主动式“目标导向”智能体,能够在无需等待用户提示的情况下推进共享任务。
The architecture rests on three mutually reinforcing mechanisms. Write-time context assembly precomputes enriched typed attributes via Groker agents, assembling interaction context as a deterministic pure function of graph state; context blocks are byte-identical across turns between semantic changes, enabling near-100% KV-cache reuse. 该架构基于三个相互强化的机制。写入时上下文组装(Write-time context assembly)通过 Groker 智能体预计算丰富的类型化属性,将交互上下文组装为图状态的确定性纯函数;在语义发生变化前的各轮对话中,上下文块保持字节一致,从而实现了近乎 100% 的 KV 缓存复用。
Composable sandboxed wisdom programs form a governed library of LM-generated imperative programs declaratively wired to goal types via typed stream relations, composed via phase ordering, and executed at interaction time without further LM calls. 可组合的沙盒智慧程序(Composable sandboxed wisdom programs)构成了一个受控的库,其中包含由大语言模型(LM)生成的指令式程序。这些程序通过类型化流关系声明式地连接到目标类型,通过阶段排序进行组合,并在交互时执行,无需额外的 LM 调用。
Proactive goal stream state machines drive conversations toward terminal states by inspecting graph state and emitting structured interaction content (option arrays, governance affordances, clarification prompts) without awaiting user input. 主动目标流状态机(Proactive goal stream state machines)通过检查图状态并输出结构化交互内容(如选项数组、治理功能、澄清提示),在无需等待用户输入的情况下,驱动对话向最终状态发展。
We prove six formal results: the Context Stability Theorem, bounding per-turn LM cost as a function of semantic change rate; a Program Composition Correctness Theorem; a Declarative Wiring Soundness Theorem; the Proactive Dominance Theorem, proving proactive agents weakly dominate reactive agents on expected turns-to-terminal-state; Coordination Overhead Elimination and Quality Preservation, establishing Pareto improvements in multi-participant goal chats; and a Cross-Platform Vote Consistency Theorem. 我们证明了六项形式化结果:上下文稳定性定理(Context Stability Theorem),将每轮 LM 成本限制为语义变化率的函数;程序组合正确性定理;声明式连接可靠性定理;主动优势定理(Proactive Dominance Theorem),证明了主动式智能体在预期到达最终状态的轮数上弱优于被动式智能体;协调开销消除与质量保持,确立了多参与者目标聊天中的帕累托改进;以及跨平台投票一致性定理。
Implemented in the open-source Qbix / Safebox / Safebots stack. 该研究已在开源的 Qbix / Safebox / Safebots 技术栈中实现。