发表机构
Institute of Computing Technology, CAS; University of Chinese Academy of Sciences; Nanjing University; Institute of Automation, CAS; Nanyang Technological University(中国科学院计算技术研究所; 中国科学院大学; 南京大学; 中国科学院自动化研究所; 南洋理工大学)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
本文提出一种将LLM视为预言机的抽象机器,通过双栈下推自动机统一工作流与智能体,并实现ArchNights系统验证其可行性。
AI 中文摘要
智能体系统使用大型语言模型(LLM)来执行具体任务。先前的工作往往从操作系统中零散地借用诸如调度、缓存或隔离等抽象,因此其构建的机制缺乏共同基础,并且对两种形式的智能体系统(工作流和智能体)的共享视图是有限的。我们构建了一个抽象机器,它同时提供这两种形式。我们将LLM视为预言机,并扩展了一个双栈下推自动机,增加了一条指令,该指令将整个栈作为查询交给预言机,并将答案追加到同一个栈上。该机器因此执行两种计算:预言机的计算和一种图灵完备的计算,我们称之为“女祭司”。程序仅追加的栈会自回归地增长,正如智能体的上下文那样。两种对称性破缺——存储中的S和转移中的T——使得女祭司程序成为预言机所运行程序的操作系统,并产生智能体和工作流作为任务程序的两种放置方式。对于内部自回归的预言机,在特定条件下,两种计算在每次答案结束时同步,通过这种同步,我们建模了缓存并分析了调度。对于每个预言机都成立的保证无法确定哪种内容在两种计算之间传递,但这样的保证确实确定了边界本身。构造V使该机器适配冯·诺依曼计算机。为了证明其可实现性,我们提出了ArchNights,一个扩展的RISC-V ISA和一个Linux风格的操作系统,按设计实现该机器。ArchNights-SE在gem5上作为计算机系统运行,当它运行LLM作为预言机时成为智能体系统,并将开源。智能体系统随后可以像计算机系统一样被设计。随着基础建立和统一视图的形成,未来的工作可以共享不变量和界限,每个都带有其条件。
英文摘要
Agentic systems use large language models (LLMs) to carry out concrete tasks. Prior work often borrows abstractions such as scheduling, caching or isolation piecemeal from operating systems, so the mechanisms it builds share little common ground, and the shared view of the two forms of agentic system, Workflows and Agents, is limited. We construct an abstract machine that provides both. We treat the LLM as an Oracle and extend a two-stack pushdown automaton with one instruction, which hands the Oracle a whole stack as its query and appends the answer to that same stack. The machine thus performs two computations, the Oracle's and a Turing-complete one that we call the Priestess. A stack that the program only appends to grows autoregressively, as an agent's context does. Two symmetry breakings, S in storage and T in transitions, make a Priestess program the operating system of the programs the Oracle runs, and produce the Agent and the Workflow as the two placements of a task's program. For internally autoregressive Oracles, the two computations synchronize at the end of every answer under certain conditions, and through that synchronization we model caching and analyse scheduling. No guarantee that holds for every Oracle can fix which content crosses between the two computations, but such a guarantee does fix the boundary itself. The construction V fits the machine to a von Neumann computer. To show that it is realizable, we propose ArchNights, an extended RISC-V ISA and a Linux-style operating system implementing the machine by design. ArchNights-SE runs on gem5 as a computer system, becomes an agentic system when it runs an LLM as the Oracle, and will be open source. Agentic systems can then be designed as computer systems are. With a foundation built and a unified view, future work can share invariants and bounds, each with its conditions.
Comments86 pages, 11 figures, 17 tables