Skip to main content

ZEOS -- a transformer operating system

ci pypi python license docs

ZEOS programs complex, real-time, transformer-mediated systems the way real-time operating systems are programmed: a hierarchy of task descriptors scheduled by a kernel, with interrupts driving preemptive switching, pipes providing both dataflow and blocking-based scheduling, and a stack of suspended job states enabling resumption.

Jobs block, never poll; the kernel wakes, never asks.

Initial release. ZEOS is under active development. This release covers jobs, interrupts, and pipes; future releases will expand to other ZEOS features. The public API and journal formats may change between releases.

Key paradigms

  • Scheduling belongs to a kernel, not the model -- jobs block on pipes at zero cost, and a higher-priority event preempts within one token boundary instead of waiting to be noticed.
  • One behaviour, one file -- you write each behaviour on its own, as if it were the robot's only job, and the kernel combines them into the whole system.
  • Text can persuade; only the kernel can permit -- content carries the ring of where it came from, effects are capability-checked at pipe boundaries, and prompt injection becomes a managed fault class instead of an open-ended vulnerability.
  • Resume is not transparent -- a suspended job's saved state contains beliefs about a world that moved, so the kernel injects a diff of exactly what changed before the job acts again.

Quick start

Run the kernel on two jobs that count to five, spawn a successor and exit.

# 1. Install (needs uv: curl -LsSf https://astral.sh/uv/install.sh | sh)
git clone git@github.com:metacognitionai/zeos.git
cd zeos
uv sync

# 2. Run it
uv run python demo/counter/run.py --case simple_count

Every line is one journal event, prefixed by the tick that produced it, with the text of each decode beneath it. demo/counter/ explains the events and puts the same case on a live model instead -- the Claude API, or a local llama.cpp Qwen. The kernel cannot tell the difference.

For ZEOS driving a real model at more interesting scale, see demo/coop-count/: two agents that hand a baton to each other through a pipe, interrupted by a keypress that rewrites the count. See demo/coop-count/TUTORIAL.md for a better idea of how the mechanics of ZEOS work.

The ZEOS design

The design is specified in docs/ProjectDescription/:

Document Covers
Transformer-OS.md <-- Start Here! Core: jobs, priorities, pipes, interrupts, the suspension stack, resume
MP-Protected-Mode.md Protection: segments, rings, integrity watermark, capability-checked effects
Programming-Model.md The paradigm, with a worked household-robot example
Fleet.md Teams of robots: the same mechanisms reused
NLI.md Why a malicious instruction fails structurally rather than by refusal
Abstract-Machine.md The machine ZEOS runs on: the five ops, blocks, masking. Normative for zeos.machine, and the contract a real serving stack must meet
Implementation.md The system layout: what is real vs. simulated, the module map, and the backend interface

Demonstration cases are not included in the kernel. ZEOS proper contains no application-specific information, code, data or dependencies. Cases are application-specific by definition: it describes a particular operation, with particular pipes, particular world objects and particular thresholds. Cases live with the demo that needs them, under demo/, and nothing in src/zeos/ imports from there.

Citing ZEOS

If you use ZEOS in your research, please cite it (see also CITATION.cff):

@software{zeos2026,
  author  = {van den Hengel, Anton and Avraham, Gil and Zhang, Jiahao and Gould, Stephen},
  title   = {{ZEOS}: A Transformer Operating System},
  year    = {2026},
  url     = {https://github.com/metacognitionai/zeos},
  version = {0.1.0}
}

Licence

ZEOS is free software under the GNU Affero General Public License v3.0 only (AGPL-3.0-only).

Metadata

Release files for zeos 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zeos 0.1.0
File Size Uploaded
zeos-0.1.0.tar.gz 751.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zeos 0.1.0
File Interpreter ABI Platform
zeos-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / zeos-0.1.0.tar.gz

Download URL zeos-0.1.0.tar.gz
Size 751.9 kB
Tags Source
SHA-256 checksum
How to use checksums
50f11c0afdcb3f1fc345a6a64e112d6df89f49712eb74cb40b2abd62c26e7ec1
BLAKE2b-256 checksum
How to use checksums
4aeb39fbbc11c66094f646b6b052718fe1cab1e5a18ec200bf07ceb79d13d302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / zeos-0.1.0-py3-none-any.whl

Download URL zeos-0.1.0-py3-none-any.whl
Size 269.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3895fc22898085acb7e24fd900e4cb715886c31860a6f1cf6ebdd4be13a713f7
BLAKE2b-256 checksum
How to use checksums
1401a6a367b7b37c927fbceb62dab02b1b86ef82f4dd273ec3b64a839d41f595
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page