Manuscript Offprint

arXiv:2610.09243

We Query, Therefore We Compute: On Oracle Computation beyond the Machine, with an Application to Agents

Kefan Liu, Fengning Ou, Yelin Luo, Jingdi Lei

Abstract

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.

Extended Abstract

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. An analogy reaches only as far as what it borrows, so the mechanisms share little common ground on which to state or compare them. Moreover, agentic systems appear in two forms, Workflows and Agents, and the shared view that subsumes them is limited. We thus construct an abstract machine that provides this common ground and a unified view.

We treat the LLM as an Oracle and extend a two-stack pushdown automaton with an instruction that queries the Oracle with a whole stack 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. For the Oracle's computation, a stack that the program only appends to grows autoregressively, as an agent's context does. We then colour the two stacks, type the machine with call-by-push-value, give it two modes and break its symmetry in storage and in transitions. The storage (S) symmetry breaking makes the Oracle execute a program only in the Oracle colour, while content stays data in the Priestess colour. Under T, the Oracle mode can switch to the Priestess mode only at a fixed entry. Together they make the O-2-PDA-TS, on which a Priestess program is the operating system of the programs the Oracle runs. On this machine, when an LLM is the Oracle, a task whose program runs on the Oracle is an Agent. When the task's program is placed differently, we find the Agent and Workflow forms on this machine. At this point the machine is defined and the operating system is derived, but what invariants hold between the Oracle and the Priestess remains open.

We then study Oracles that are autoregressive inside, and link their one-step transitions to the machine's history through the encoder and decoder of the Oracle. The two computations synchronize at the end of every answer that yields, and through that synchronization we model caching and analyse scheduling behaviour, once for both forms. We further analyse the boundary between the Oracle and the Priestess and find that no guarantee that holds for every Oracle can fix which content crosses, but that such a guarantee does fix the boundary itself.

To build a practical machine, we first ask which Oracle can be part of it, and then analyse how to fit the Oracle into the Priestess. The answers to these questions are the construction V, which fits the O-2-PDA-TS to a von Neumann computer. To show that the machine is realizable, we propose ArchNights: an extended RISC-V ISA and a Linux-style operating system. Accordingly, when it runs an LLM as the Oracle, ArchNights becomes an agentic system. ArchNights implements the machine by design, and we implement ArchNights-SE, in gem5's syscall-emulation mode, as a computer system. ArchNights-SE will be open source. We further discuss ArchNights-FS, which is designed to run on real hardware.

On this machine, agentic systems can be designed as computer systems are. With a foundation built and a unified view, future work can share invariants and bounds, each under the conditions it states.

References (100)

Couldn't load all references. Reload the page to try again.