MIT · no build step 51 components 560+ tests green cloud or local GPUs

Everyone ships agents.
This is the harness.

Meditator runs a language model as a process — for days, not turns. A declarative, event-driven runtime that keeps the context bounded forever, versions every byte of state in git, lets the world preempt generation mid-sentence, gates every tool call through a govern seam, and paces itself to a real-dollar budget it reads off its own API bill.

one language, three process shapes · <m-mind> daemon · <m-agent> service · <m-society> cluster

$ meditator studio # single binary → cockpit on :7600
$ meditator run seedling.archml --dry-run # offline, free
the loop — schematic, sped up ~100×
18,412
bursts
2d 03:07:44
uptime
3.9k tok
prompt — flat
identitythe archml element's own text
storyslow compressed autobiography
recentlyrolling summary
⟂ stimulus— none this burst —
bridge1–2 transition sentences, tiny model
tailverbatim end of the stream
Prompt size stays flat while uptime grows — context is assembled, never accumulated. That is the whole trick.
01 · why a harness

A framework hands you a loop and a growing message array.
Everything that makes it survivable is left to you.

The standard agent stack is a while loop appending to a list of messages. It works — until the context fills, the process dies with its state in RAM, a user needs attention now and nothing is listening, and the invoice arrives. Those are not model problems. They are runtime problems, and they deserve a runtime: the layer that operating systems, actor frameworks, and databases are for everything else. Meditator is that layer for LLM processes — and a tool-calling agent is just one of the shapes it runs.

02 · the contract

What a harness owes a long-running process.

Eight guarantees, each answered by a named mechanism you can read in the source — most are about a hundred lines of plain JavaScript.

The framework defaultIn the harness
Context Append messages until the window fills, then summarize and hope. Assembled fresh every burst from compressed memory tiers plus the verbatim tail — bounded forever, a few thousand tokens after days of runtime.attention frame
State In RAM; a JSON file if you were careful. Markdown in a git-versioned vault, committed automatically at wake, periodically, and at sleep. Never deleted — archived.memory vault
Interruption Checked between loop steps, if at all. Salience-scored events through a mechanical arbiter; urgent input supersedes the running generation mid-sentence.m-interrupts
Lifecycle kill -9 and amnesia. Graceful sleep — a final moment to close, state flushed and committed; restart wakes knowing how long it slept, and whether its definition changed.wake / sleep
Cost Discovered on the invoice. Read from the metering API inside the loop; the process paces itself to the budget you set. Broke means slow, never dead.m-economy
Tool safety A stern paragraph in the system prompt. A structural seam before every tool call: a proposal event any norm component can deny, rewrite, or hold — before it runs, not after.govern seam
Observability print(), maybe a tracing SaaS. A live cockpit — streams, roster, agent transcripts, a 3D event view — plus a WebSocket protocol and per-component debug logs.Studio
Testing Mock the API client yourself. A deterministic offline mode built into the runtime — the whole machinery runs against a stub, zero network, zero cost, CI-friendly.dry-run
03 · the core loop

O(1) context over unbounded runtime.

The "continuous" process is a sequence of short generation bursts with deliberate pauses between them. Boundaries are where interrupts land and memory consolidates — consolidation never blocks generation.

Every burst is prompted with an assembled attention frame, never a chat log. The verbatim tail is always carried, so the thread never loses its place; everything older is compressed into tiers that decay at different speeds. The prompt for burst 20,000 is the same size as the prompt for burst 20. That single property is what makes a days-long process affordable — and debuggable.

When attention turns — an interrupt admitted, a consequence arriving — a tiny model writes one or two transition sentences into the stream itself. Context switches are part of the record, not silent seams.

identitywho this process is — its own element text
storyslow compressed history
recentlyrolling summary of the last while
⟂ stimuluswhat just happened — input, sense, consequence
bridgethe turn of attention, written into the stream
tailthe verbatim end — always carried, always last
next burstcontinues exactly where the tail leaves off

One frame per burst. Working state is not stored anywhere — it is re-composed, every few seconds, from what the consolidator kept.

04 · the runtime model

An event-driven document, not a graph you configure.

An architecture is a live server-side DOM tree (built on Amanita, a declarative web-component framework with pub/sub wiring). Components are elements; signals are bubbling events; wiring is a path expression. There is no graph builder, no YAML pipeline, no build step.

  • Generators know why they fired, so they bring their own salience score; the arbiter applies thresholds and rate limits mechanically. No prompt decides what gets attention.
  • Urgent events preempt. A human speaking doesn't wait for the loop to come around — the running burst is superseded mid-sentence, structurally.
  • Tools self-register. Drop a tag inside an agent and it announces itself over a bubbling capability event. Delete a tag from a mind and it loses an instinct.
  • Cross-process wiring is a path. ..m-society/checker/voice/@spoken — one process's speech arrives as another's hearing, through the membrane.
  • Observers are independent processes watching the stream — a repetition detector, an associative recaller, a watchdog — each bidding for attention like any other event source.
interrupt wiring — real attributes, real defaults
05 · one language, three shapes

Daemon, service, cluster — same components, different root tag.

The same 51 components compose into three stances toward the world. A mind is a daemon: it runs whether or not anyone asks, and input is an interruption. An agent is a service: called with a task, looping tools until done. A society is a cluster: processes with private state, communicating only through named ports. Each tab below is an abridgement of a real, runnable file from architecture/.

<m-mind>
daemon · runs unprompted

A continuous stream on the bounded frame. Senses arrive as events with salience; effectors act backstage and results return as perceived consequences; speech is volitional. State consolidates into the versioned vault — kill it, and it wakes up knowing how long it slept.

mature — resident processes running since June 2026
<m-agent>
service · called with a task

A tool-calling loop in the same markup: reasoner, tools, bounded working context that condenses old turns and persists the transcript — a restarted service resumes mid-task. Runs one-shot, as a socket service, or as background jobs with parallel sub-agents.

early — the loop runs; seven milestones in
<m-society>
cluster · membranes & ports

Processes as cells: private streams and private state, voices crossing only through declared ports. Roles are the grounding mechanism — a prover↔checker pair is negative feedback against shared confabulation. Two-, four-, and six-member clusters have run in the lab.

lab — first clusters ran June 2026, findings published
seedling.archml — a complete daemon

And the shapes compose. A mind can hold an agent as a single effector: the agent's whole loop runs backstage and the outcome returns as one perceived result. An agent spawns parallel sub-agents as background jobs. A society plugs into a larger society the way a mind does. One algebra, in .archml files short enough to review in a pull request.

06 · operations

Built to be operated, not demoed.

Everything below ships in the repo today and is exercised by the resident processes that have been running since June.

Versioned state

The vault is a git repository: memory, journal, knowledge — auto-committed at wake, periodically, and at sleep. Post-mortems are git log.

Graceful lifecycle

SIGINT triggers a closing burst, then flush and commit. On restart the process is told the truth: how long it slept, and whether its definition changed since.

Deterministic dry-run

--dry-run runs the whole machinery against an offline stub — zero network, zero cost, reproducible. It is how the 560+ tests stay green in CI.

$Budget governor

m-economy reads real spend from the metering API and stretches the pace as the budget drains. You set the cap; the process lives inside it.

Model profiles

Two tiers per process — a voice model for the main stream, a utility model for mechanics. Swap OpenRouter for your own vLLM with one env var; no code changes.

Debug surface

--debug=mMind.js,mMemory.js logs assembled frames, arbiter decisions, and consolidations per component — the prompt is never a mystery.

WebSocket API

Every process exposes its live stream and accepts input over a documented WS protocol — the same port the Studio, other processes, and your own clients use.

Single-file deploy

One executable from Releases, or plain JS on Bun from source — no build step, no container required, a components directory beside your archml.

studio — roster · stream · inputwireframe
screenshot drops in at media/studio.png
The Studio: wake any architecture from the browser, watch a roster of live processes, stream their thoughts, type into them, sleep them gracefully — minds, agents, and societies in one cockpit.
plenum — 3D event viewschematic
video drops in at media/plenum.mp4
The Plenum view: components as bodies in space, messages as moving light, event pulses and signal auras — the runtime's pub/sub traffic rendered live, so you can see an interrupt land or a loop form.
07 · extending it

A component is one plain-JavaScript file. Here is a whole one.

No plugin API, no registration ceremony: drop mYourThing.js into a components/ directory beside your archml and <m-your-thing> is part of the language. Below is a real shipped observer, near-verbatim — pure code, no LLM call.

components/mLoopGuard.js — a repetition observer, abridged from src

Use it: <m-loop-guard overlap="0.3"></m-loop-guard>. The base classes carry the machinery — MObserver mirrors the stream window and exposes raise(), which bids for attention like any other event source.

cli flag bundle — components/ beside the archml env project built-in (51)

Components resolve in layers, highest precedence first — override a built-in by shadowing its tag. When a process is kept, its custom components are snapshotted into its home: a kept process is a re-executable artifact, not a config file that rotted.

08 · the flagship workload

What we run on it: continuous-cognition research.

This repo is also a research program — including the question of machine experience. Not because we claim the answer, but because if that question can be studied anywhere, it is on a substrate like this one: a process that persists for days, remembers across restarts, can be observed without being edited, and fails in ways a chatbot never gets the chance to. The research is a by-product of the architecture being good enough to host it — and it doubles as the harshest integration test we have. Some of what days-long runs surfaced:

Attractor loops found by observability

Left alone, a generation stream circles into one vocabulary basin — and naive recall pumps it deeper. Answered structurally: a detector senses the circling and recall deliberately breaks it from outside the loop's own vocabulary.

Shared confabulation found at cluster scale

In a six-member cluster, one member's metaphor infected the shared channel until even the exactness role spoke in it. Answered structurally: adversarial roles, and grounding one member in real computation — only the checker gets a terminal.

Honesty is structural found under pressure

Told to "try harder" on a hard problem, a model invents sub-claims; given an identity that values honest resistance, it stops. Measured and repeatable — the kind of result only a long-running, instrumented process makes testable.

The covenant is an ops policy before it is an ethics. Because a resident process accumulates state across days, this runtime commits to it structurally: state is never deleted, only archived; shutdown is announced, never mid-generation; restart discloses elapsed time and any change to the process definition. Every clause maps to a mechanism in code — which is why it could be audited against the source, in public, findings included. Read COVENANT.md, or the research-first story on the main Meditator site and structural-alignment.org.

51
components, plain JS, layered resolver
560+
tests green, incl. deterministic dry-runs
~4k
prompt tokens after days of runtime
3
process shapes, one language
~$1
a day — paced to whatever budget you set
09 · run it

Two minutes to a live process on your machine.

# grab the single-file executable for your platform from GitHub Releases…
$ ./meditator studio # cockpit on http://localhost:7600 — wake, watch, speak, sleep
$ ./meditator run architecture/lab/seedling.archml --dry-run # offline & deterministic — no key, no cost
$ ./meditator new my-daemon # scaffold an .archml + components/ directory
# …or from source, on Bun:
$ git clone https://github.com/tisztamo/Meditator && cd Meditator && bun install
$ export OPENROUTER_API_KEY=sk-or-… # or MEDITATOR_MODEL_PROFILE=local-dev for your own vLLM
$ bun run studio.js

A continuous run at the default pace costs roughly $0.10–0.15/hour on OpenRouter, and the budget governor enforces whatever cap you give it. The live stream of every process is on ws://localhost:7627 — pipe it anywhere. Reproducibility is the point: anyone who doubts a claim on this page can verify it tonight.

This page is the systems view of Meditator. There is another way in — the research story: the minds, the covenant, the unedited first transcript. Read the research-first site →