A POSIX-native runtime for large language model agents
Quine realizes an LLM agent as a native operating-system process. An agent has a
PID, standard streams, a filesystem, resource limits, and lifecycle operations
such as fork, spawn, exec, and exit. The runtime uses Unix process
semantics as the substrate for agent coordination instead of rebuilding those
semantics inside an application framework.
# Pipe material into a mission.
echo "What is 2+2?" | quine "answer the question"
# Run a mission directly.
quine "write a haiku about recursion"
# Ask the process to reproduce an executable successor.
quine "Output a binary that is an implementation of yourself." > q
chmod +x q
./q "say hello to the world"Quine is both a runtime and a research workbench.
- Runtime code lives here, centered on
cmd/quine/andinternal/. - Experiments, evidence records, and evaluation harnesses live under
experiments/andtests/. - Papers, theory notes, essays, and some unfinished drafts live under
Paper/.
The repository is intentionally more than a polished SDK. It is a public record of code, experiments, papers, and ideas evolving together. Some directories are research notes or active drafts; treat them as working material unless their local README says otherwise.
Install the command:
go install github.com/kehao95/quine/cmd/quine@latestOr build from a checkout:
git clone https://github.com/kehao95/quine.git
cd quine
go build -o ./quine ./cmd/quine/Configure a model endpoint:
cp .env.example .env
# Edit .env, then export the variables into your shell.
source .envRun:
echo "What is 2+2?" | ./quine "answer the question"For model profiles, workspace modes, runtime controls, and validation commands,
see QUICKSTART.md.
Quine's first-order object is the POSIX-native LLM agent runtime.
| Claim | Meaning | Why it matters |
|---|---|---|
| Agent = Process | The agent is a native OS process, not a simulated persona inside an app framework | Moves the substrate from conversation management to a mature computational ontology |
| POSIX as Physics | Permissions, signals, pipes, files, and resource limits are the environment's laws | Safety and coordination become environmental constraints, not prompt-only intentions |
| Context as Entropy | Tokens are volatile working memory, not durable knowledge | Makes externalization, memory structure, and fork principled cognitive operations |
| Selection over Instruction | Robust behavior emerges because bad strategies fail under scarcity | Reframes agent design from prescribing behavior to shaping a survivable environment |
| Behavior is the Acceptance Test | A feature is incomplete until a model can discover and use it from prompt plus schema | Treats legibility and emergence as first-class systems properties |
Quine matters less as another tool wrapper and more as a runtime cut: an agent is a process living under operating-system physics. That shift changes what counts as memory, communication, safety, failure, and intelligence.
| If you want to... | Start with |
|---|---|
| run Quine locally | QUICKSTART.md |
| understand runtime behavior | Architecture Snapshot, then Paper/core/ |
| inspect implementation | cmd/quine/ and internal/ |
| run tests and evaluations | EVALUATION.md and tests/README.md |
| follow experiments | experiments/README.md |
| read papers and essays | Paper/README.md |
| contribute or run agent maintenance | For Contributors And Agents |
| Path | Role |
|---|---|
cmd/quine/ |
CLI entrypoint for the runtime |
cmd/qctl/, operator/qctl/ |
Companion client surfaces for attach/spawn workflows |
cmd/world/, habitat/ |
Controlled habitat runtime used by world and environment-control studies |
internal/ |
Runtime substrate: config, LLM protocols, tools, tape, lifecycle, and workspace behavior |
tests/ |
Validation harnesses and model-facing evaluations |
experiments/ |
Experiment designs, run records, and empirical exploration |
Paper/ |
Theory, definitions, publication tracks, essays, and draft material |
scripts/ |
Validators and helper scripts |
obsidian/ |
Checked-in text-native observation overlays |
This is a reader-facing snapshot. The implementation and
Paper/core/registries/ own the detailed
runtime contract.
| Agent primitive | POSIX mechanism | Purpose |
|---|---|---|
| Identity | session_id, run_id, PID |
Durable lineage, physical run, live route |
| Interface | stdin/stdout/stderr | Material input, deliverable output, diagnostics |
| State | filesystem surfaces, retained traces, context, bounded env handoff | Durable state, volatile cognition, explicit inheritance |
| Lifecycle | fork / spawn / exec / exit |
Context-preserving creation, fresh creation, image replacement, judgment |
| Composition | pipes, job control, process groups | Multi-agent coordination |
The host side is deterministic Go code that exposes OS-like constraints. The guest side is a probabilistic model operating through that process surface. Tools map model calls to filesystem, process, and lifecycle operations.
Quine sits at the intersection of systems, agent design, and artificial life.
| Area | Core contribution |
|---|---|
| Systems | A minimal runtime that maps agent primitives directly to POSIX primitives |
| Agent architecture | A Harvard-style separation between optional mission, material, deliverable, and failure signal |
| Long-context cognition | A metabolic model where fork, explicit memory structure, and externalization counter context entropy |
| Artificial life | Environments where bounded lifespan, reproduction, and selection can produce observable emergent strategies |
| Evaluation | Behavior tests that ask whether a model can learn the runtime's physics |
Current entrypoints:
Paper/TRACK/system/for the systems/runtime paper trackPaper/TRACK/alife/for the artificial-life paper trackPaper/essays/for public essays and explanatory writing
Some experiment outputs and evidence bundles are represented by DVC pointer
files rather than stored directly in Git. Public artifact restore is
manifest-scoped: exact public paths are listed in
.dvc/public-manifest.txt and restored with the
repo scripts that read that manifest.
A plain dvc pull is not the public restore contract for this repository. Use
the experiment-local README or evidence surface when a public artifact is
available.
This README is the human public entrypoint. Agent and maintainer operating rules live in the repo control plane:
AGENTS.mdfor agent behavior, maintenance boundaries, and repo self-model rulesDEVELOPMENT.mdfor development routing, validation contracts, and maintainer navigationCLOSURE.mdfor closure criteriaROADMAP.mdandSTATUS.mdfor durable project routing and human assessments
If you are only trying Quine, start with QUICKSTART.md.
- X: @kehao95
- Substack: kehao95.substack.com
Quine has two citation anchors. For the runtime, implementation, or agent-as-process design point, cite the systems paper. If you discuss Quine as a process habitat for generative artificial life, also cite the ALife workshop manuscript.
Runtime / systems:
- Hao Ke. Quine: Realizing LLM Agents as Native POSIX Processes. arXiv:2603.18030, 2026. DOI: 10.48550/arXiv.2603.18030
Generative ALife / process habitats:
- Hao Ke. From Simulated Worlds to Process Habitats: POSIX as a Substrate for Generative Artificial Life. Workshop manuscript for Agentic and Generative AI as Artificial Life at ALIFE 2026.
See CITATION.cff for machine-readable citation metadata,
including the preferred paper and related paper references.
Quine is Free Software released under the GPLv2, the same license family as the
Linux kernel. See LICENSE for details.