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
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.
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 default | In 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 |
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.
One frame per burst. Working state is not stored anywhere — it is re-composed, every few seconds, from what the consolidator kept.
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.
capability event. Delete a tag from a mind and it loses an instinct...m-society/checker/voice/@spoken — one
process's speech arrives as another's hearing, through the membrane.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/.
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 2026A 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 inProcesses 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 publishedAnd 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.
Everything below ships in the repo today and is exercised by the resident processes that have been running since June.
The vault is a git repository: memory, journal, knowledge — auto-committed at wake, periodically,
and at sleep. Post-mortems are git log.
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.
--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.
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.
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=mMind.js,mMemory.js logs assembled frames, arbiter decisions, and
consolidations per component — the prompt is never a mystery.
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.
One executable from Releases, or plain JS on Bun from source — no build step, no container required, a components directory beside your archml.
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.
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.
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.
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:
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.
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.
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.
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 →