Skip to content

Architecture

Last updated 12 Nov 2026

One background process owns your notes and the record of changes. Everything else is a client of it.

One process, many clients ​

Alter is a single background process. It is the only writer of your vault, the version store and the record of changes. The alter command, the macOS app, the browser UI, Slack, Telegram and Discord are all clients of that process.

The CLI and the app reach the process over a private socket that only your user can open. The browser UI listens on 127.0.0.1 and signs in with one-time links. Slack, Telegram and Discord are outbound connections that Alter opens, so no public address is needed.

Because there is one writer, edits cannot race each other. A client never changes a note itself. It asks the process to, and the process applies the change, records it and keeps the previous version. This is also why only one process may open a data folder.

The agent loop ​

Every provider goes through the same loop. Alter speaks two protocols: the Anthropic API, and any OpenAI-compatible API (OpenAI, Ollama, LM Studio, OpenRouter and others). Requests are plain HTTP, with no vendor SDK. See Models.

In a turn:

  1. Alter assembles the standing context and your message, and sends it to the planner model with the available tools.
  2. The model proposes tool calls. Alter checks each against a strict schema, and then against policy in code.
  3. Allowed calls run. Calls that need approval wait for you.
  4. Results come back to the model, and the loop continues until it answers.
  5. The exchange is written to the record of changes.

Outside content, such as mail, web pages and tool results, is marked when it comes in. What that marking does is covered in the security model.

Roles ​

Different kinds of work can use different models.

RoleDoes
PlannerConversation and planning. The only role that uses tools.
Private readerReads mail, web pages and private notes with no tools. Internally called quarantine.
TaggerTags notes, sorts them, and widens searches.
Daily reflectionThe nightly pass over the day. Uses the planner's model if you do not set one.

Search by meaning uses a separate embeddings model. A routine or a realm can have its own model.

Standing context ​

Each conversation starts with what Alter already knows, within budgets: SOUL.md, USER.md, MEMORY.md, your stances, feedback and writing voice, a conventions note at the vault root if there is one (README, AGENTS, CLAUDE, CONVENTIONS or index), yesterday's and today's daily notes, recent changes, and a map of the vault. Markers like <!-- core:start --> and <!-- core:end --> limit what a note contributes. A note marked provenance: untrusted or external is never loaded into the standing context. A note marked private is read only by the private reader.

Sessions ​

Conversations are stored on disk under objects/, so a conversation survives a restart. The app, Slack, Telegram, Discord and the terminal all use the same sessions and the same agent. A quiet conversation is written into that day's note after 20 minutes. A Slack thread continues if you reply within 20 minutes.

The record of changes ​

Every change Alter makes is appended to ledger.jsonl together with its effects. Nothing is edited in place. The timeline in the app and alter events are views over it.

KindWhat it records
heartbeatAlter being alive and what it checked.
ownerSomething you did.
decisionSomething Alter decided, and why.
documentA change to a note.
correlationA link Alter found between things.
sh
alter events --kind document --since 2026-11-01

Versions and revert ​

Each version of each note is kept in objects/, addressed by its content. A recorded change points at the versions it replaced, and Revert restores them. Revert undoes edits, renames, moves, and notes that were archived or deleted. Reverting is itself recorded, so it can be reverted too. An import is one change, and reverting it removes the whole import.

If a program other than Alter edits a note, Alter notices and records it as "edited outside Alter". Those edits can be reverted too, and Alter never overwrites one: a conflict is reported instead.

Full-text search uses SQLite FTS5. The index lives under objects/index/ and can be rebuilt from the notes. If you set an embeddings model, Alter also searches by meaning.

Where to go next ​

Security model explains what is enforced in code. Data and folders shows where each of these pieces lives on disk.

Proprietary software. Alter runs on your computer, and your notes stay there.