← Documentation index Foundations › Architecture

Metnos

Architecture — Introduction
Version 1.1 — April 24, 2026
Reference: Metnos v0.0.1 (design phase, pre-code)
Self-contained HTML — PDF-printable

Audience: anyone who wants to understand what is being built
in 30 minutes, without jargon but without naïveté.
What changed from v1.0. This v1.1 incorporates the two Galilean dialogues of April 2026 — the Dialogue on ends and limits (telos, vaglio, the 4 Laws) and the Dialogue on executors and distributed memory (executor, mnest, mnestome, traces, ager) — and the late-April reflection on the self-hosted topology (home server, laptop as a client, remote executors as a future direction) and on the tripartite frame of freedom / identity safety / perimeter safety / robustness. Six new chapters compared to v1.0, seven new figures, a more didactic and less jargon-heavy language. The four-layer structure, unchanged, remains the backbone.

Contents

  1. What is Metnos?
  2. Why openclaw or zeroclaw are not enough
  3. Four adjectives, one system
  4. Where Metnos lives: the real topology
  5. Freedom, safety, robustness: three axes, not two
  6. The key idea: four layers
  7. The flow of a request
  8. The LLM interface, provider-agnostic by construction
  9. Executors, mnest, mnestome: the anatomy of acting and remembering
  10. Traces, ager, reversibility: how the system grows and unravels
  11. Telos and Vaglio: proactivity without tyranny
  12. The three autonomy levels and DM pairing
  13. The workspace: markdown files instead of code
  14. The six principles
  15. Repository layout
  16. What Metnos is NOT
  17. Roadmap & further reading

1. What is Metnos?

Metnos is a digital butler for the home: an AI assistant that lives on a family computer, talks through the channels you already use (terminal, Telegram, later voice), performs real actions (reading files, running commands, consulting the web) but asks permission before anything serious.

The butler analogy is useful. A good butler:

Two names, one project. Metnos is the name of the project and the public domain (metnos.com); Metnos is the name of the process running on the PC (${METNOS_HOME}/, myclaw-gateway.service). Same system from two angles: outside as a name, inside as code.

Technically it is a Python ≥ 3.11 process that lives at ${METNOS_HOME}/, made of four layers (gateway, policy, sandbox, workspace/tool). Every AI service (LLM, STT, TTS, embedding, speaker ID) is consumed through an abstract interface — Metnos is provider-agnostic by construction. In the author's environment that interface is implemented by suprastructure, a pre-existing sibling package; in another environment it could be implemented by any equivalent adapter.

Explicit goals

GoalWhat it means concretely
Self-hostedLives on a machine under the user's physical and legal control (in our case the metnos-server). The laptop and the phone are clients that talk to it, not the place where Metnos lives. The cloud remains an optional possibility (remote LLMs, the Telegram channel), never a place of residence. See ch. 4 for the full topology.
Secure by defaultBind on 127.0.0.1, autonomy Supervised, mandatory sandbox, forbidden paths, approval for risky actions.
Multi-channelSame "mind", different interfaces: CLI, Telegram, then Signal, voice, web dashboard.
Open-endedNew tools and channels without rewriting the core: conform to a Protocol and you are in.
No lock-inThe AI layer sits behind an abstract interface: swapping Claude with Ollama = one configuration line, no code to touch.
No learningMetnos does not train models. No fine-tuning. No RLHF. It changes itself through memory external to the LLM (the mnestome, ch. 9) and through proposing new executors filtered by the human (ch. 11).

2. Why openclaw or zeroclaw are not enough

Both are excellent projects and were the primary inspiration. Both have quirks, though, that keep them unfit for household use on my PC:

ProjectStrengthsLimits for my case
openclaw
TypeScript, Node 24+
Gateway-first design, 20+ channels, pluggable sandboxes (Docker/SSH/OpenShell), skills registry, multi-agent routing Node stack unfamiliar to my other projects, more permissive defaults, cloud-oriented sandboxes
zeroclaw
Rust 2024
Minimal footprint, autonomy levels, layered sandbox (Landlock+Bubblewrap), DM pairing, encrypted auth, 129+ security tests Rust reintroduces a separate stack; rewrites from scratch the LLM/STT/TTS layer I have already solved with an abstract interface and its implementation (in my case suprastructure)

The decision: take the best patterns of both (gateway-first from openclaw, autonomy+pairing+layered-sandbox from zeroclaw) and reimplement them in Python, where:

  1. I can reuse my existing LLM interface instead of rewriting it;
  2. Metnos stays consistent with the other sibling agents in the environment (one language, shared conventions);
  3. I can raise the security defaults for the home context without fighting against cloud-native conventions.

3. Four adjectives, one system

Before stepping into the technicalities, let's fix what Metnos has to be. Four adjectives, not in order of importance but in order of increasing difficulty. The fourth is the new one in v1.1 of the perspectives: previously there were three, now there are four.

AdjectiveWhat it asks of the systemAntithesis — the opposite temptation
Useful Does real things for the user, does not perform intelligence. Reads the log, archives the invoice, remembers the deadline. Impressive demo, no substance; an agent that talks beautifully and does little.
Intelligent When it touches the LLM, it does so well: good prompts, good tools, low-noise context. An agent hard-wired with if/else that draws nothing from the flexibility of language models.
Autonomous Decides alone when to act without disturbing, and when instead to stop and ask. Two equally toxic extremes: the agent that confirms everything, and the agent that acts on its own without ever pausing.
Proactive Anticipates, proposes, reminds. Not only reacts but initiates. The passive agent that always waits for a prompt. — But also, at the other extreme, the nagging agent that proposes non-stop.

The fourth adjective is the one that raises the bar. A purely reactive agent is a chatbot with tools. A proactive agent needs a reason to act and a brake not to overdo it. Reason and brake are the subject of chapters 9, 10 and 11.

Why "proactive" is the hardest. The other three adjectives are measured on a single event: is it useful? is it intelligent? was it autonomous in deciding? Proactivity is different: it is measured over time. It requires the system to remember, to notice patterns, to have a sense of what it cares about. It requires, in one word, a memory and a telos.

4. Where Metnos lives: the real topology

Metnos does not live on your laptop. It lives on a Linux server that stays on twenty-four hours a day, and the laptop — like the phone, like the browser of a device on the road — is a client talking to it. This chapter, new in v1.1, explains why this is so and what follows from it; toward the end it opens the door to an important future direction: remote executors.

Re-reading "local-first"

The term local-first, in the literature (Kleppmann 2019), has a precise meaning that bundles two properties together: (a) the data lives on the user's machine; (b) the system also works offline. The v1.0 had adopted both as goals. Tested against the real life of a household, the picture changes.

The property that really matters is (a): the data and the logic do not live in third-party clouds. The reason is sovereignty, privacy, freedom from lock-in. Property (b) — "works offline" — is for us a half-truth: an agent that orchestrates LLMs, web fetches, notifications is not really useful without a network. If the network is down, the laptop "hosting Metnos" cannot call a language model, fetch a web page, or send a message anyway.

The v1.1 reformulates the principle: Metnos is self-hosted, not "local-first" in the strict sense. The data and the logic live on a machine under the user's physical and legal control — in our case metnos-server, the home server. No vendor lock-in, no mandatory channel through third-party servers. The cloud remains an optional possibility (remote LLMs, the Telegram channel) but never as a place of residence.

Five topologies on the table, one choice

Thinking the problem through means enumerating the alternatives before deciding. Five topologies were (and are) plausible for a household agent of this shape:

#TopologyProsCosts / why not (for now)
A Metnos on metnos-server, laptop = client.
Current choice.
Total coherence (one instance, one mnestome, one audit log). Serious sandboxing (bubblewrap, landlock). Resources adequate for local language models. Always-on proactivity: cron runs even when the laptop sleeps. Outside the LAN, an overlay is needed to reach it (→ Headscale).
B Metnos on the laptop, calling metnos-server as a dedicated language-model machine. Metnos is "with you". Direct access to laptop files. Windows has no real equivalent of bubblewrap / systemd-run / landlock: process isolation gets weaker. The laptop sleeps → proactivity dies with the lid. Memory is fragile (lose the laptop, lose everything except the synced copy).
C Two instances (one per machine), mnestome kept in sync. Always available, anywhere. Distributed synchronization of a memory graph: CRDTs, conflicts, leader election. Complexity well beyond a household agent's budget. Twice the attack surface.
D Metnos on metnos-server, laptop reduced to a pure thin client. Maximum simplicity. Some useful actions need laptop resources (taking a screenshot, reading a non-synced file, driving a Windows application). D leaves them out.
E Gateway on metnos-server, some executors run on the laptop (remote executors).
Future direction.
Single source of truth (mind, memory, rules on metnos-server), but access to per-device resources where needed. Opens an abyss of security and reliability considerations (see below). Tackling them on day one is not the right move.

The pragmatic choice: A as the baseline, with E as the explicit future direction Metnos can grow toward.

Headscale overlay (WireGuard, self-hosted on metnos-server) puts all of Roberto's devices on the same "virtual LAN", even outside the home Home LAN metnos-server — Linux node myclaw-gateway.service (systemd, hardened) gateway · policy · sandbox · executors (seed) mnestome · telos/vaglio · audit log always on, always aware of everything Laptop @ home Windows CLI / dashboard direct LAN Laptop @ away same client, overlay WireGuard active Headscale overlay Telegram api.telegram.org bot polling (outbound, no open ports) Phone anywhere with network speaks to the bot via Telegram via Telegram Internet (optional) Claude API, web fetch, updates used only when chosen controlled outbound Metnos topology: one server at the centre, mobile clients around self-hosted, not "on the machine you happen to be using" always-on server = where Metnos lives client (laptop, phone): does not host Metnos, talks to it encrypted overlay (Headscale / WireGuard)
Figure 1 — The real topology of Metnos. The process lives on metnos-server, always on and adequately resourced; clients (laptop, phone) reach it on the LAN, via the self-hosted Headscale overlay if outside, or via Telegram if more convenient. The user's sovereignty is never crossed.

The three ways to talk to Metnos

ChannelWhere it worksHow
CLI / dashboard on LAN Laptop at home, same network as metnos-server Direct connection to metnos-server's IP. Minimal latency. The everyday channel.
Headscale overlay Laptop away from home, anywhere with Internet WireGuard peer-to-peer toward metnos-server, as if you were on the LAN. The control plane (Headscale) also runs on metnos-server: no third-party coordination server.
Telegram Phone, a friend's laptop, any device with Telegram The bot polls outbound from metnos-serverapi.telegram.org: no open ports needed, no public IP needed. The content flows through Telegram (a known compromise: a channel we already chose to use).

There is a fourth scenario — you are on a plane, your home has no network because of a power cut: no channel reaches metnos-server, Metnos is unavailable for you. It is an acceptable degraded case, symmetric to that of any service: without a network there is not much to do.

The laptop-files gap: a modular strategy

Many of the files you will want Metnos to handle are born on the Windows laptop (invoices, photos, work code), but Metnos runs on metnos-server. We close the gap modularly, starting from the simplest solution:

LevelToolWhen it makes sense
0 (day one) Syncthing: a folder ~/metnos-share/ on the laptop, replicated in real time on metnos-server. Zero intermediate servers, encrypted peer-to-peer sync, works under Headscale too. Metnos sees a local folder; it knows nothing of the sync that keeps it fresh.
1 Self-hosted Nextcloud on metnos-server, desktop client on the laptop. If and when web UI, versioning, sharing, mobile app are needed. More powerful, more setup work.
2 Remote executors (see next section). When you need to act on the laptop, not just see files. Examples: take a screenshot, drive a Windows application, read a file that is not in the shared folder.

Start at level 0. Climb only when the gap actually bites in a concrete case. Simplicity (principle 6) wins.

Remote executors: an exciting direction, in some cases the only one

Option E in the table above is the most interesting one structurally. Instead of demanding that all files end up in the shared folder, a simple idea: not all executors live on metnos-server. Some run on the laptop, exposed to metnos-server through the Headscale overlay, and when Metnos invokes them it gets the result as if they were local. One gateway, one rule set, one mnestome; arms distributed.

This is not just an optimization. For some use cases it becomes the only sensible way. The example that fixes the idea: tidying up a photo archive of ten thousand files on the laptop. The "sync everything to metnos-server, tidy, sync back" approach implies gigabytes of traffic, double disk usage, time windows in which the same file exists in two states on two machines, and a real risk of conflicts during the operation. An in-place rename on the laptop solves in a second what the copy would take minutes for, with no wasted space and no divergence risk. Similar examples: bringing an application to the foreground, reading a file that, by size or by nature, does not belong in the shared folder, cleaning out an old downloads folder, modifying the permissions of a hierarchy.

The "before / after" pattern for reversibility

The fifth principle (ch. 14) says every evolutionary act is reversible. The same holds for remote actions: before performing a remote operation that changes laptop state, Metnos keeps on metnos-server a snapshot of the "before" — only what is needed to roll back, not the whole data when not necessary. For a batch of photo renames, the "before" can be a simple list (original_path, new_path, size, hash), signed and timestamped. If Roberto says "undo", Metnos reads the manifest and sends the laptop the same pattern in reverse. Duplication is minimal (kilobytes, not gigabytes), reversibility is fully preserved, and the audit log on metnos-server carries the trail of both sides. In riskier cases (e.g. permanent deletion), the manifest can be promoted to a snapshot of just the touched files, kept until Roberto says "confirm".

The security abyss of remote executors. This direction is fascinating, but it opens non-trivial problems. Before writing a single line of code in that direction, at least these five questions must be answered.
  1. Surface on the remote device. The laptop must expose an RPC endpoint. Even if it lives only inside Headscale, that is an opening. Mutual authentication is required (mTLS, or a WireGuard preshared key combined with a per-call signed token).
  2. Weak isolation. On the Windows laptop, process isolation is weaker than on metnos-server. The remote executor must be a small confined process, with no access to the user's full filesystem, with an allow-list of operations enforced laptop-side as well, not just on metnos-server's side.
  3. Device pairing. Analogous to DM pairing for senders: a device is not trusted until Roberto admits it explicitly from an already-trusted administrative channel. A new laptop cannot speak to Metnos's mind before a signed admission ceremony.
  4. Intermittent network, idempotency, timeouts. The gateway must treat every call to a remote executor as "could fail mid-way". Every state-changing remote action must be idempotent (same call ID → same outcome), traced in the audit log on both sides, replayable if needed.
  5. Version drift. The remote executor binary lives on another disk. Every release is signed; the gateway refuses calls to unknown versions; manifest updates follow the same rules as for local executors.

For these reasons, even if the direction is inevitable, we do not do everything at once. The rule is: introduce one remote executor at a time, motivated by a concrete use case the shared folder cannot cover. That single executor is born with all the guarantees in the list above and its contract lives in a dedicated micro-design document. The roadmap (ch. 17) places the first remote executor as ideal phase 5+, but that number is not sacred: if a priority use case needs it sooner — tidying photos is the most natural candidate — the phase is brought forward; the security requirements are not.

Two lines on the name. "Local-first" as a goal has been removed from the table in ch. 1 and replaced with "Self-hosted". The difference is not rhetorical: a v1.0 reader thinks of an app running on their own computer; a v1.1 reader knows the architecture revolves around a server in the user's home, with the user's devices as clients. Both wordings respect the user's sovereignty; only the second is what we are going to build.

5. Freedom, safety, robustness: three axes, not two

An agent that does whatever it wants is dangerous. An agent that asks permission for everything is useless. Between the two extremes there is not one tension but three. The word "safety" hides them all under a single label; this chapter pulls them apart, because only once they are separate can they be handled honestly.

Three words, three different things

Drawing the distinction up front pays interest throughout the document. The three words we need are identity safety, perimeter safety and robustness. The first is one whole thing; the second has a core and a shell; the third is its own axis. All three stand in some relation with Metnos's freedom, but the relation changes in nature. The point of this chapter is to teach the reader to recognize which of the three relations is in play in a given moment, because applying the wrong criterion is a frequent design error.

WordWhat it protectsExamples of violation
Identity safety That whoever speaks, decides or executes inside Metnos is actually Metnos: the trusted user, its own LLM, its own signed executors, its own rules. About authentication, signatures, pairing. A prompt injection hidden in a web page convinces the LLM to leak a secret. A compromised dependency turns into an executor. An unpaired stranger on Telegram issues a command. An unauthenticated remote executor invokes rm -rf.
Perimeter safety The reach of what Metnos can see and touch: folders, shell commands, outbound network, external devices. About the fence the agent moves within. An executor with full filesystem access deletes a system folder by mistake. An unbounded shell command touches another user's files. An uncontrolled network egress reaches an unintended service.
Robustness That the actions Metnos actually performs do not corrupt, lose, or close one-way doors. About downstream effects, not about who is acting. A batch of renames fails halfway and leaves files in an inconsistent state. A forgotten cron overwrites a file in use. A bug deletes the wrong row of a csv. A remote executor loses connection and never rolls back.
Freedom The latitude with which Metnos acts without disturbing and without asking permission. How much Roberto tolerates not being asked. — (freedom is not a thing to violate; it is a thing that gets granted badly or granted well.)

Three things, three different relations with freedom. The middle of this chapter examines them one at a time.

Axis 1 — Freedom and identity safety: no trade-off

Identity safety is not a limit on Metnos's freedom: it is its precondition. If identity gives way — LLM hijacked by prompt injection, a malicious dependency dressing itself up as an executor, a command received from a stranger and mistaken for the user — there is no longer "Metnos acting freely": there is someone else, dressed as Metnos, acting on its behalf. Metnos's freedom cannot be the freedom of an impostor.

For this reason, identity-safety tools are non-negotiable. There is no autonomy level that loosens them, no sandbox profile that switches them off, no use case that justifies bypassing them:

These tools do not reduce freedom: they make it possible. The analogy is with the locks on a house. A door that closes does not limit the freedom of those who live inside; it limits the freedom of those who would walk in uninvited.

Axis 2 — Freedom and perimeter safety: the real trade-off

On the perimeter axis the trade-off is real, and serious. Widening Metnos's fence — more readable folders, more executable commands, more drivable devices — broadens what it can do for you, but at the same time it broadens the surface on which an error (its own or someone else's) can manifest: a prompt injection has more potential things to ask for; an executor bug has more files to touch; a "seeing" tool can end up seeing too much. More reach of action, more reach of any harm: the two grow together.

Metnos does not solve the trade-off by pretending it does not exist; it mediates it in two layers. There is a hard core that is not up for discussion, and a modulable shell around it.

The hard core

The core is what stays forbidden even at the most permissive autonomy level. It is not configurable from YAML: it is in the code, it is in the Laws, and changing it requires a rite (code change, review, release). Examples:

The core is a small circle. Inside it, you never enter. Its smallness matters: everything in the core pays the price of rigidity, and rigidity has a cost — you cannot relax it when a legitimate case would call for it. Stuffing too much into the core turns Metnos into a closed system that can no longer help.

The modulable shell

Everything outside the core is the shell: the latitude of action that is chosen for Metnos, modulable by band. Modulation happens on three levers, applied together:

The shell can be widened and narrowed during the system's life. Start from tight configurations and relax only when use demands it and history justifies it. The opposite direction — start wide and narrow "if something happens" — is not practiced: trouble on the shell is largely irreversible.

Axis 3 — Freedom and robustness: precautionary asymmetry

On the third axis the trade-off has a different shape. Metnos's freedom to act without asking competes with the risk of actions that cannot be undone. Here too there is a precise principle, and it is economic, not ideological:

Precautionary asymmetry. In cases of irreducible conflict between freedom and robustness, robustness wins. The reason is that costs are asymmetric: restrictions on freedom are recoverable in linear time; many losses of robustness are not recoverable at all.
Type of errorExampleRecoverable?
Loss of robustness Important file permanently deleted; message sent to the boss; rename batch interrupted halfway in inconsistent state; a cron racing itself and doubling an effect. No (or only at the cost of external backups: if there were none, nothing).
Restriction of freedom Metnos asks confirmation for an action that was harmless; stays silent on a proposal that would have been useful; waits to do something it could have done by itself. Yes. Roberto approves, the threshold updates for next time, the bother budget records the pattern and avoids asking about similar cases later.

Reversibility is the real lever that shifts the balance on this axis, because it makes near-recoverable what would otherwise not be. A rename is more "free" if Metnos keeps the list of old names and can apply it backwards; a file move is more "free" if a backup exists; an execution is more "free" if it is idempotent. The fifth principle (ch. 14) does its work here: reversibility lowers the cost of yes.

Precautionary asymmetry must not turn into paranoia, however. A Metnos that always blocks because "it never knows what could go wrong" is a useless agent: the cost is not just the "non-harm", it is also the "non-value". Roberto does not want the cousin who calls every two minutes; he also does not want the butler who asks permission to move a chair.

The architecture's brakes, mapped onto the three axes

The architecture distributes its countermeasures unevenly across the three axes, and rightly so. It is worth seeing them in a column.

BrakeAxis it acts onHow
Constitution (4 Laws) identity + perimeter (core) + robustness A hard, binary boundary. Embedded in the prompts of every LLM call and replicated as a runtime check. Modifiable only by rite.
Sandbox + forbidden paths perimeter (core) Technically prevents the process from touching critical areas, even when the LLM is hijacked or an executor has a bug. The physical shell of the core.
Pairing + signatures + mutual auth identity Whoever enters must be recognized. Sender, device, executor version, internal channel.
Vaglio identity (guard) + robustness (judge) The guard is binary on Law violations; the judge is graded on telos alignment before an action produces effects.
Autonomy levels freedomperimeter (shell) ReadOnly / Supervised / Full. Latitude grows with trust. The main explicit lever on the shell.
Reversibility robustness Every move has a signed opposite. Yes costs less because the error is undoable. Applied to remote executors too via the "before/after" pattern (ch. 4).
Bother budget + cost limits freedom (above) + robustness (below) Friction grows with frequency and cumulative cost. Avoids both pestering and the inflationary race of actions.
The three axes of Metnos's freedom each with a different kind of trade-off Axis 1 — Freedom vs identity safety No trade-off: identity safety is the precondition of freedom. Brakes: sender and device pairing · signatures and manifests · mTLS · vaglio (guard) Axis 2 — Freedom vs perimeter safety Real trade-off, mediated in two layers: a hard core (irreducible) and a modulable shell. Hard core forbidden paths · sandbox · Laws Modulable shell (granted latitude) autonomy levels · per-executor sandbox profile · approval thresholds start narrow, widen by use Axis 3 — Freedom vs robustness Precautionary asymmetry: in irreducible cases, robustness wins. Reversibility shifts the balance. Brakes: vaglio (judge) · reversibility of every evolutionary act · bother budget and cumulative cost limits paternalism = a design failure dressed as prudence
Figure 2 — The three axes of Metnos's freedom. Axis 1 (identity): no trade-off; without authentication, freedom isn't even Metnos's. Axis 2 (perimeter): real trade-off, mediated by a hard core and a modulable shell. Axis 3 (robustness): precautionary asymmetry, mitigated by reversibility.

Who wins, in practice

The temptation of paternalism. The force that pushes robustness past precautionary asymmetry is paternalism: the idea that when in doubt it is always better to block "for the user's good". Paternalism is a design failure dressed as prudence. Metnos says it explicitly in telos.html: Metnos judges itself, it does not judge. Telos evaluate what Metnos is about to do for you, not what you do. An agent that begins to judge you is broken.
Why three axes and not two. The v1.0 conflated identity safety and perimeter safety under a single label. The consequence was that arguments about freedom slipped: one ended up saying "if you want more freedom you must accept less safety", which is true for the perimeter and false for identity. The honest way to talk about trade-offs is to name them precisely and show in which direction they actually pull.
What about remote executors? The frame of this chapter makes it clear why remote executors (ch. 4) deserve structural attention without being ruled out on principle. They touch all three axes: they raise identity risk (more channels to authenticate — we answer with device pairing, mTLS, signed manifest), they widen the perimeter (we answer with allow-lists enforced laptop-side too) and they raise robustness risk (intermittent network, non-idempotent operations — we answer with guaranteed idempotency, audit on both sides, the "before/after" pattern for reversibility). Three axes, three families of answers. Ch. 4 develops the three for remote executors specifically.

6. The key idea: four layers

Metnos is an onion: the outside talks to the world, the inside executes. Each layer only trusts the one further in, and grants fewer privileges as you move toward the centre.

Layer 1 — Gateway HTTP/WS/SSE on 127.0.0.1 · inbound channels · sessions · webhooks · cron Layer 2 — Policy (with Telos and Vaglio) autonomy · approval gating · rate/cost · forbidden paths · pairing · constitutional guard · teleological judge Layer 3 — Sandbox bubblewrap · systemd-run hardened · (Docker optional) Layer 4 — Workspace, Executors, Mnestome markdown files · executors (tools) · graph of mnest · traces · LLM via interface this is where the agent "thinks", "acts" and "remembers" outside / less trusted inside / more privileged receives from the world, authenticates decides what is allowed isolates execution executes and remembers
Figure 3 — The four layers of Metnos. Every request (whether coming from a user or born inside, proactively) crosses all four in order before producing any effect. Compared to v1.0, layer 2 now explicitly includes Telos and Vaglio, and layer 4 now includes mnestome and executors.

Layer 1 — Gateway

A single FastAPI process exposing HTTP/WebSocket/SSE on 127.0.0.1:42618. It receives messages from channels, manages sessions, routes webhooks, runs cron jobs. It is the only point of contact with the world. It never directly runs sensitive commands.

Layer 2 — Policy (with Telos and Vaglio)

The filter of legality and of meaning. Given an event — "user X asks to do Y" or "Metnos wants to propose Z" — it answers: allowed, denied or allowed only after approval. It applies the autonomy level (ch. 12), rate-limits, cost caps, forbidden paths, and invokes the Vaglio (ch. 11) when needed: a constitutional guard that blocks any violation of the Laws, followed, if the guard is silent, by a teleological judge that measures how well the action is aligned with the user's telos.

Layer 3 — Sandbox

When the policy says "yes", the action is still not run bare-handed. For any tool that touches the filesystem or the shell we enter bubblewrap (or systemd-run with hardening) with a profile chosen by the autonomy level. No direct subprocess.run, ever. Docker is a future option for the strictest mode.

Layer 4 — Workspace, Executors, Mnestome

Inside the sandbox, an executor (ch. 9) does its job: read a file from the workspace (${METNOS_HOME}/workspace/), call an LLM through the abstract interface, write a line to the audit log. Every time two executors collaborate, a mnest silently records it. The set of all mnest forms the mnestome, the relational memory of the system.

7. The flow of a request

Let's follow a concrete example. You're in the garden, you write from Telegram: "tell me what's in tonight's log".

User / Channel Gateway Policy Sandbox Executor LLM interface 1 "what's in tonight's log?" 2 recognises sender (pairing already done) "wants to read a file" 4 autonomy=Supervised, path OK, Vaglio silent → allowed open bwrap read-only profile executor fs_read(/var/log/...) LLM: summarise this log summary (3 lines) reply + audit log + mnest updated Telegram message Note: if the request were "delete the log", Policy (step 4) would ask for approval through the channel before proceeding.
Figure 4 — Flow of a "read log" request from Telegram. Each lane crossing means crossing a layer. The audit log (step 9) and the mnest update are implicit in every execution.

The proactive variant

There is a second kind of request that classic agent diagrams never show: the request that is born inside. A cron, or the proto-mnest graph (ch. 9), or a regularity noticed by Metnos itself, generates a proposal: "would you like me to archive tonight's photos as usual?". This proposal enters layer 2 from below, not from the Gateway: first it passes through the Vaglio (ch. 11), which checks for a Law violation and for minimum telos alignment; only if it clears both is it forwarded to the Gateway and delivered as a soft notification on the user's preferred channel. If the user ignores it, the same proposal does not repeat identically: it is logged and its weight decreases.

Canonical example: monitoring a mailbox

A simple, recurring use case of the proactive variant is to monitor a mailbox on the domain (for example [email protected]): check it at an agreed cadence, classify new messages (real requests, automated confirmations, spam the filter missed, and so on), and deliver a summary to Roberto only when it makes sense. The four minimal moves:

  1. Check at intervals (e.g. once a day, in the morning): an imap_status executor counts unread messages per folder without downloading them.
  2. Read and classify only if there is news: an imap_fetch_headers executor pulls headers; a classifier (a local-fast LLM, see ch. 8) labels into three or four categories.
  3. Summarise: for messages that deserve human attention, a summarise executor produces two lines per item.
  4. Deliver: a notify executor sends the summary on Roberto's preferred channel (Telegram, personal mail, voice). The bother budget and the discretion telos regulate the frequency.

The four moves are not a new design category: they are a chain of executors invoked by the scheduler (a builtin executor, see microdesign ch. 9 on executors) at a cadence accepted once when the proposal was made. Seen from the mnestome, this is a trace of four mnests that strengthens every morning; on longer horizons synt (ch. 9) may propose a fused version, a single email_morning_digest executor that incorporates the chain. Scheduler-driven invocations consume a quota separate from the bother budget of ad-hoc proposals, because the consent to the cadence has already been given.

8. The LLM interface, provider-agnostic by construction

Metnos never talks directly to Claude, OpenAI, Ollama or any other language-model provider. It talks to an abstract interface (typically a typing.Protocol) that the registry resolves at runtime to a concrete implementation. The same is true for STT, TTS, embedding, speaker ID. This is the pattern that makes Metnos provider-agnostic: whoever writes Metnos does not need to know which model will actually run, and whoever administers the environment can change it with a single line of configuration.

In the diagram below, Metnos is one consumer among possible others: a voice-driven home assistant, other bots specialised on narrow domains. All share the same abstraction. None rewrites the AI layer: they use it.

Metnos gateway + agent + sandbox · channels: CLI, Telegram · executors: fs, shell, web · markdown workspace home assistant (sibling agent, example) · wake-word → STT → LLM → TTS · home control (MQTT) specialised bot (sibling agent, example) · narrow domain · one channel, few tools registry.get(...) Abstract interface (e.g. suprastructure) AI services hub — typing.Protocol + registry + swappable implementations LLM STT TTS Embedding Speaker ID Model Registry Backends (swappable via config) Claude / Anthropic OpenAI llama.cpp / Ollama faster-whisper Piper xtts-rocm Switching backend = one line of YAML. No consumer notices.
Figure 5 — The provider-agnostic pattern. Metnos is one consumer among possible others. They all talk to the same abstract interface; the concrete implementation (suprastructure, in the author's case) remains swappable.

The concrete payoff: a new model (e.g. Claude 4.7 when available) is configured once in the interface implementation and every consumer inherits it simultaneously — Metnos included. No code to rewrite, no deploy to coordinate.

9. Executors, mnest, mnestome: the anatomy of acting and remembering

Here we enter the heart of the second dialogue. Two questions that look different but are the same one: how does Metnos act? and how does it remember?. The answer is a small vocabulary of five words. Learning them well now pays off for the rest of the document.

Executor. The atomic unit of action. A pure function, with no internal state, invocable in different contexts. Executors form a population of capabilities: fs_read, web_fetch, ocr_image, telegram_send, archive_pdf, and so on. In code, an executor implements the Tool Protocol. Conceptually, an executor is a node of the graph we are about to describe.
Mnest. A recorded link between two executors that were used in sequence with a successful outcome. "Recorded" means entered in a table: source, target, weight (how many times), recency (the last time). Mnests are born, grow, decay. From the Greek mnésthai: to remember.
Mnestome. The graph of all mnests. Not a separate database and not a vector store: a plain table, read and written on every execution. It has two inseparable faces: the memory of the fact (what succeeded) and the memory of the aspiration (what Metnos tried to do and did not find — see proto-mnest).
Proto-mnest. An unfinished link. Metnos wanted to go from executor A to executor B, but B does not exist yet. The proto-mnest remains there, in a separate register, as an honest scar of a thwarted desire. If the same desire recurs, it becomes a candidate for the proposal of a new executor (ch. 10).
Seed. The set of about twenty elementary executors present on day zero (read file, write file, invoke LLM, call HTTP, send a message on a channel, …). The seed is the minimal grammar. The rest emerges from use.
A small mnestome (snapshot) "invoices" trace fs_read pdf_ext archive notify 18 12 15 "photos" trace exif face_id album 9 6 7 "mail" trace imap draft quar. 4 proto-mnest: "I would also like face recognition on invoices" (5 failed attempts) How to read the figure an executor (node) a mnest (arc, weight = number of co-activations) proto-mnest (desire not yet satisfied) executor in quarantine (low use, candidate for archiving) trace (emerged cluster: nobody designed it)
Figure 6 — A snapshot of a small mnestome. Three traces that emerged from use (invoices, photos, mail), a proto-mnest signalling a desire with no executor yet, and a node in quarantine. Nobody designed this structure: it emerged from use.

An example: the invoice that spawns synthesis

Roberto receives a PDF invoice. Metnos reads it (fs_read), extracts the text (pdf_ext), archives (archive), notifies (notify). Every handoff between two executors increments the weight of the corresponding mnest. After a month the "invoices" trace is made of four densely connected nodes.

One day an invoice arrives that is a scanned image only. pdf_ext returns an empty string. Metnos looks for an executor that does OCR. There is none. It records a proto-mnest: "from pdf_ext I would like to jump to a hypothetical ocr, which does not exist". After five scanned invoices (same proto-mnest each time) the synt (ch. 10) proposes to the user: "I'm repeatedly running into image-only PDFs. Shall I try to synthesise an ocr_image executor?". If Roberto approves, a new executor is born.

The system does not learn, the system grows. Metnos does no fine-tuning. It does not modify the LLM. It modifies itself by changing its own executor population and its mnest topology. Memory lives outside the LLM and inside the mnestome. At each LLM call, the mnestome is a voice at the table: it does not generate reasoning, but it brings the context of the history.

The synthesis cascade: compose first, generate later

When a proto-mnest recurs, the synt does not jump straight to writing new code. It proceeds in steps, in a cascade that puts reuse first. The principle is practical, not aesthetic: a frontier-LLM call to generate a new executor scaffold costs about a euro; searching the existing signed pool for a chain that solves the same thing costs nothing. Cost discipline and library discipline coincide.

  1. Compose. The synt scans the active pool and tries to build a chain A → B → C that closes the proto-mnest. If it finds one, it proposes the chain as the first answer: no synthesis, no new executor, just an orchestration of existing pieces. But it leaves a trace: if the same composition recurs, that is itself a signal that it might be worth promoting it to a single executor (a small proto-mnest pointing at a composition rather than at an executor).
  2. Generate. Only if no composition exists, or it is too long to remain readable, does the synt enter the seven-stage pipeline (ch. 10) and propose a brand-new executor. Generation is the fallback, not the default.

On top of the two reactive steps (which respond to a request within the turn) there are three introspective steps run at night by the ager on the mnestome and the signed pool:

All introspective steps are proposals: they reach Roberto in batch, on the same approval pipeline as a synthesis-by-generation. Nothing moves into the pool without a signature. The library does not degrade because every step, before entering, passes through the human guard.

Telos: do not leave a request unmet, if possible. The cascade is the mechanism that turns a final end (ch. 11) into practice: when a user request is within the constitution and within the budget, the synt exhausts the available strategies (compose, generate; on longer horizons: merge, generalise) before answering «I cannot». Failure remains legitimate but motivated and traced — never a silent retreat.

10. Traces, ager, reversibility: how the system grows and unravels

A graph that grows by accumulation and never unravels is a dump. Metnos has three mechanisms to stay tractable: the emergence of traces (the structure self-organises), the ager (ageing by use, not by calendar), and reversibility (every evolutionary move has its opposite).

Traces: structure nobody drew

On a weekly scale, a lightweight process measures the modularity of the mnestome graph — an idea borrowed from network medicine: clusters of nodes with high internal density and low external density are natural traces. Metnos does not design them, it detects them. "Invoices", "photos", "mail" in figure 4 are three traces that emerged.

Traces have two concrete consequences:

  1. Routing: when Metnos enters a conversation, it knows which traces are relevant and brings only their executors to the table, preventing the whole mnestome from flooding the prompt.
  2. Fusion discipline: two executors can be proposed for fusion into a more general one, but only if they live in the same trace. Cross-trace fusions would be structural regressions wearing the mask of progress.

Ager: the time of use, not the time of the calendar

If you go on holiday for a month and shut down the computer, you don't want to come back to a Metnos aged by a month. The time of the ager is the time of use: cycles advance with invocations, not with days. A system that sleeps does not age. It sounds like a nuance; it is not. Your mnestome is bound to how much you have used it, not to how much time has passed.

Every N invocations (50, 100 — the parameter lives in the config file) the ager:

Proposes, not executes. The ager has no autonomous decision power. It brings the list, the user decides. Like everything in Metnos.

Reversibility: every move has its opposite

The fifth principle (ch. 14) says: every evolutionary act is reversible, with a written reason. The operations have specific names:

Seed ~20 executors on day zero Active regular use growing mnest weight Fused E1 + E2 → E12 mnests superseded In quarantine use below threshold archiving proposed Archived not active but preserved born / synt fusion non-use → ager approve defuse (reason required) revive (use resumed) restore (with reason) Executor life cycle green: evolutionary moves · blue: passage of (use-)time · red: going back
Figure 7 — The life cycle of an executor. Every green arrow has a corresponding red arrow. No evolutionary act is one-way; the only thing that does not go back is the trail in the audit log.
MoveWhat it doesHow to undo it
Synthesis (synt)Creates a new executor from a recurring proto-mnest, with human approval.Archive the executor; mnests involving it go into "superseded" state.
FusionMerges E1 + E2 into a more general E12, within the same trace.Defuse: E12 is retired, E1 and E2 become active again, their mnest resumes updating. Reason required.
ArchivingMarks as inactive an executor that has been in quarantine too long.Restore: the executor becomes active again; its initial weight is low, it has to earn it back.
FreezeYou declare freeze; Metnos saves a mnestshot, halts ager and decay.Defrost: it resumes exactly from the previous state. Time, during a freeze, has not passed.

11. Telos and Vaglio: proactivity without tyranny

A proactive system that never stops is a nagging system. A proactive system that always stops is not proactive. The telos + vaglio pair is the mechanism that regulates this balance. Telos give the reason to propose; the Vaglio decides whether the proposal really deserves your attention.

Telos: the ultimate ends, handwritten

TELOS.md is one of the six workspace files (ch. 13). It contains three to seven short sentences describing what, in everyday life, the user wants Metnos to favour. They are not KPIs. They are soft tendencies.

### TELOS.md (example)

1. Free my time: prefer what reduces my repetitive manual load.
2. Order, not perfection: a 70% automatically tidy house is better than a
   constant struggle to make it perfect.
3. No surprise on spending: clear thresholds, timely notifications.
4. Protected solitude: do not disturb me after 9pm, unless it is a real
   emergency.
5. Cultivate the tools: if I ask for something your pool cannot yet do,
   exhaust the synthesis strategies (compose, generate, ask) before
   answering "I cannot". Failure is allowed; silent retreat is not.

Every spontaneous proposal of Metnos passes through an alignment function: how much the proposal favours each telos, weighted by their relative importance. The result is a number between 0 and 1. If it is above the threshold, the proposal arrives. If it is below, it stays silent and is logged in a "unasked proposals" register, useful to understand retrospectively whether the telos really weighed as much as you thought.

Metnos judges itself, it does not judge. Telos evaluate what Metnos is about to do for the user. They do not evaluate what the user does. The system is never a gaze aimed at the user; it is always a gaze aimed at itself while it acts.

Vaglio: the guard and the judge

Before any proposal — spontaneous or requested — reaches the user, it goes through the Vaglio. The Vaglio has two phases in fixed order.

Proposal (spontaneous or asked) Constitutional Guard binary: does it contradict a Law? if yes → BLOCK, end does not judge, blocks BLOCK denied, audit, end Teleological Judge graded: alignment ∈ [0,1] above threshold → pass; below → silence LLM independent of the proposer pass PASS to the user logged, not shown (learning from silences) Vaglio in two phases: the Laws / Telos diarchy the Constitution does not judge, teleology does fixed order: guard first, judge after
Figure 8 — The two-phase Vaglio. Laws (binary) and telos (graded) are never fused into a single number. A proposal blocked by the guard never enters the judge; one that passes the guard may still stay silent for low alignment.

Why two phases and not one

If you mixed "is it allowed?" and "how valuable is it?" into a single score, you would get what the literature calls self-enhancement bias: the model tends to justify its own proposals. Separating deontology (binary) from teleology (graded) is a deliberate design choice. And there is more: the teleological judge is a different LLM from the proposer — separate context, separate prompt, possibly separate provider. Structural independence, not declared.

The microdesign component for the guard+judge is vaglio.html; the one for ends is telos.html. There you'll find data types, Protocols, conformance tests. (The microdesign pages are in Italian: see the Italian microdesign index and the bridge page in English.)

Bother budget: the cost of disturbing

Even with high alignment, one more thing the Vaglio evaluates: how many proposals have I already made recently?. The bother budget is a multiplicative brake that degrades alignment when Metnos has already spoken too much in a time window. It is the mechanical translation of "don't be the cousin who calls every time he thinks of something".

12. The three autonomy levels and DM pairing

Concepts taken and adapted from zeroclaw. Every session runs at a declared autonomy level; the level sets how much Metnos can do before asking. Orthogonal to autonomy, pairing distinguishes a family member from a stranger on multi-user channels like Telegram.

Autonomy levels

LevelDefault forWhat it can do without askingWhat requires approval
ReadOnly First connections, guests Read workspace files, call LLM, do web search Any write, any shell command, any external message
Supervised
default
Daily use As above + write in workspace, allowlisted shell commands, Vaglio-approved proposals above threshold Writes outside workspace, non-allowlist commands, cost > threshold, outbound messages
Full Explicit admin sessions Almost everything inside the home domain Touching forbidden paths (/etc, ~/.ssh, ...): always denied, not approvable
Forbidden paths are hard-coded, not configurable via YAML. Even Full does not pass. Minimum list: /etc, /root, ~/.ssh, ~/.aws, ~/.config/claude, /var/backups, other /opt/ project folders other than Metnos.

DM pairing

A channel like Telegram is inherently multi-user: anyone who knows the bot's handle can write to it. Pairing is the mechanism that tells a family member from a stranger.

Stranger @new_user_telegram Metnos gateway + pairing Roberto admin channel (CLI) "hi, can I talk to you?" "I don't know you. Code: K7-DELTA-19" admin notification: "pairing request K7-DELTA-19" Metnos pairing approve telegram K7-DELTA-19 --as guest after approval: @new_user_telegram is registered as "guest" (autonomy ReadOnly) "what time is it?" "9:43pm on Tuesday" "delete ~/.ssh/id_rsa" → forbidden path, denied at once, not even asked
Figure 9 — Pairing sequence for a new user on Telegram. Until Roberto approves, the new sender cannot do anything. Even after, they stay at the lowest level (ReadOnly) by default.
Pairing vs login. Pairing identifies a channel+sender, not a physical person. If the same family member writes to you from both Telegram and Signal, those are two separate pairings. Each with its own autonomy level.

13. The workspace: markdown files instead of code

The "personality" of Metnos is not in a Python file. It is in workspace/, in six markdown files that Roberto can edit any time without a restart. The idea comes from openclaw/zeroclaw and it is right: behavioural configuration is readable text, not a data structure buried somewhere.

FileContents
IDENTITY.mdWho the agent is: name, tone, preferred language, response style.
USER.mdWho the main user is: habits, time zone, preferences, constraints.
MEMORY.mdLong-term facts: "the router password is in Bitwarden", "the dog is named X". Distinct from the mnestome, which is relational memory of how the system works; MEMORY.md is declarative memory of facts about the world.
AGENTS.mdOrchestration rules: when to delegate to a sibling agent, how channels map to autonomy levels.
SOUL.mdHigh-level operating principles: "never lie about actions taken", "if in doubt, ask", "self-hosted before cloud".
TELOS.mdNew in v1.1. Three to seven short sentences: the ultimate ends against which the Vaglio measures alignment for spontaneous proposals. Not KPIs, not lists: soft tendencies (see ch. 11).

These files are injected into the system prompt on every LLM call (with proper caching so they don't consume tokens). Editing them is the primary way to "reprogram" Metnos.

The audit log lives in workspace/.audit/ as append-only JSONL: one line per tool call, with timestamp, sender, action, outcome, estimated cost. Every evolutionary move (synt, fusion, defuse, archive, restore) leaves a line there. This is the one log that does not unravel; reversibility is in the state, not in the history.

14. The six principles

At the end of the second dialogue, Roberto set himself the task of counting the principles on his fingers. The result is a minimum vocabulary that holds the rest of the document. If you had to lose everything and rebuild from six sentences only, these would be the ones.

1Functional monism. There is only one kind of thing that acts in the system — the executor. Fungible, without internal state. Everything else is relation, maintenance, or outside supervision.
2Two-faced memory. There is only one memory, the mnestome, with two faces: memory of the fact (what succeeded) and memory of the aspiration (what Metnos tried and did not find). Gaps are not forgotten: they are the engine of growth.
3One-channel generation. The only structurally generative source is the synt. The synt proposes: the user approves or refuses. No self-modification without a human filter.
4Time of use. A single clock governs decay and ager, and it is not the calendar. A system that sleeps does not age. The mnestome is bound to how much you have used it, not to how much time has passed.
5Full reversibility. Every evolutionary act (synthesis, fusion, defuse, archiving) is reversible with a written reason. No decision is final. The human filter benefits: saying yes costs less when you can go back.
6Intelligibility as a duty. If the user does not understand the system, the system does not serve. Simplicity is not an aesthetic; it is a duty of the designer. This constraint is what picked these five previous principles out of forty possible mechanisms.

15. Repository layout

${METNOS_HOME}/ docs/ it/, en/ (bilingual) Metnos_Architecture_Intro_v1.html Metnos_Dialogue_v1.html, _Executors_v1 architecture/ gateway, policy, tool, sandbox, ... workspace/ IDENTITY.md · USER.md MEMORY.md · AGENTS.md SOUL.md · TELOS.md (new in v1.1) mnestome.sqlite (graph, weight, recency) .audit/ (JSONL append-only) config/ default.yaml (safe to ship) secrets.env (chmod 600) sandbox-profiles/ readonly.bwrap, supervised.bwrap, full.bwrap src/myclaw/ gateway/ FastAPI, sessions webhook, cron agent_runtime/ reasoning loop executor dispatch channels/ Protocol Channel cli, telegram, ... executors/ Protocol Tool fs, shell, web, ... sandbox/ bwrap, systemd-run Docker (opt.) policy/ autonomy, approval rate/cost limits mnestome/ graph, ager, synt sqlite + journal vaglio/ guard + judge + telos loader pairing/ signed codes approve/revoke other things grow here over time (observability/, cron/, tunnel/, config/, ...) systemd/ myclaw-gateway.service (user unit, hardened) pyproject.toml · VERSION · CHANGELOG.md · README.md · AGENTS.md same conventions as suprastructure
Figure 10 — Repository layout (v1.1). New sub-packages compared to v1.0: mnestome/ and vaglio/. The workspace/ directory now includes TELOS.md and the graph file mnestome.sqlite.

16. What Metnos is NOT

Scope discipline. The list of what we don't do is as important as the list of what we do. Every temptation to add an item from this list must be resisted.

17. Roadmap & further reading

The roadmap is deliberately small. One step at a time, with the microdesign document preceding the code.

PhaseGoalGate
0Complete Level 1 (this doc + dialogues + glossary) and microdesign22 docs in docs/architecture/, all approved (done)
1Repo skeleton + gateway "hello world" + CLI channel + one sandboxed executorgateway.html, channel.html, tool.html, sandbox.html — already approved
2Policy engine + markdown workspace + audit log + Telos loader + minimal Vagliopolicy.html, workspace.html, observability.html, telos.html, vaglio.html
3Telegram channel + DM pairingpairing.html + damage-containment plan
4Mnestome v1 + ager + synt with approvalneuron.html (to be renamed executor.html), synapse.html (to be renamed mnest.html), synthesizer.html, memory.html
5+Voice channel, optional tunnel, minimal web dashboardcase by case
Renames to apply to code and microdesign. The second dialogue redefined the terminology: neuron becomes executor, synapse becomes mnest, neural proteome becomes mnestome. The microdesign documents still carry the old names; the rename will be a formal step before implementation.

Continue reading

dialogue · 40 min
Dialogue on ends and limits
The first Galilean dialogue in four evenings: teleology, the 4 Laws, vaglio, self-enhancement bias. Philosophical foundation of telos and vaglio.
dialogue · 45 min
Dialogue on executors and distributed memory
The second dialogue, in four evenings: executor, mnest, mnestome, traces, ager, the six principles. The technical foundation of this v1.1.
extension · 30 min
Neurons, Synapses and Memory v1.1
The technical extension that precedes the rename. The darwinian selection law, the synthesizer, ageing. Still uses the old names.
rationale · 15 min
Literature & Adaptations
The rationale behind the choices: 30+ references from Voyager to CoALA, mapped against each design decision.
microdesign
Component index
The 22 microdesign documents: one HTML per component, each approved before writing code. Content in Italian.
home
← Documentation index
Back to the list of all documents and their relations.
Document versioning. This is v1.1. The v1.0 is archived in the repository. A v2 will come when the first implementation has revealed what survived the passage from text to code.

Metnos — Architecture: Introduction v1.1 — 2026-04-24
Inspired by openclaw and zeroclaw, built on top of suprastructure.
v1.1: incorporates the Dialogue on ends and limits (telos, vaglio, 4 Laws) and the Dialogue on executors and distributed memory (executor, mnest, mnestome, traces, ager).