Skip to main content
API Preview
Developers

Substrate observation

~alter is built on one discipline, and an integration inherits it the moment it connects. Every claim about the state of the world is observed from a substrate it can read: running code, a git history, a live endpoint, a filesystem. It is never taken from a stored narrative that says what the state once was. A document describes; a substrate executes. When the two disagree, the substrate wins, and you read it directly rather than trust the description.

This page is the integrator’s cut: what substrate observation is, why ~alter coordinates this way rather than around a single source of truth, the primitives your agent can use to stay aware of sibling sessions, and how the whole model rests on identity being inferred from what a person does, not from what they declare. If you have not wired a client yet, start with Build on the stack, then come back here.

What it is

A state-claim is any assertion about what is true right now: a route exists, a payment settled, a category is consented, a peer session is editing a file. Under substrate observation, no claim travels without the observation it was derived from. Each one names where it came from: a code read, a log entry, an endpoint response, a file timestamp. A reader can then re-derive it. A claim that carries no such source is not authoritative; it stays an unverified inference until someone observes the substrate again.

The practical shape is a claim paired with its origin, like the two below. The point is not the syntax; it is that the source is always carried, never assumed.

text
"verify_identity is live"          [observed: code read at the route handler]
"this rate limit is 60/min"        [observed: config value in the running service]
"this category is not consented"   [observed: live consent check returned 403]

The authority order is fixed: running code, a database, or a live endpoint outranks a generated artefact, which outranks a hand-maintained document. A document may be cited only after it has been reconciled against the executing source it claims to describe, and it can never be the primary reference for a value the system actually executes.

No canonical narrative

Many systems try to keep concurrent actors in step by electing a single source that everyone trusts: one service holds the authoritative story, and every other component reads from it. ~alter does not. When several agents or sessions act at once, naming any one of them the canonical winner is exactly the failure mode to avoid. It lets the actors quietly converge on a shared story that has drifted from reality. The substrates that record activity are append-only and observational; none of them is the truth, and none reconciles the others.

Instead, each observer reads the substrates it cares about and merges what it sees for itself. There is no reconcile step that picks a winner from conflicting observations; a contradiction is a signal to go and observe again, not to defer to whichever source spoke last. For an integrator this means a query result is a reading taken at a moment, not a verdict handed down. A stale reading is corrected by re-reading the substrate, not by appealing to a cached answer.

Peer-session awareness

When more than one of your agents works against the same identity at the same time, they need to see each other. ~alter exposes an agent-frame surface for exactly this: a set of primitives an agent calls to announce what it is doing and to observe what its peers are doing. Every one of these is observational. None of them holds a server-side lock, runs a state machine, or arbitrates a conflict.

advise
Announce what this session is currently working on. The “I am editing X” signal a peer can read.
broadcast
Announce that something material just happened. The “I just landed Z” signal a peer can act on.
subscribe
Open a stream of the frames peers emit, so a session observes activity as it arrives rather than polling for it.
roster
Read the set of peers and the last frame each one emitted: who is present and what they last did.
advisory lock
Claim and release a resource as a courtesy to peers. It is a declaration of intent, not an enforced mutex.

The advisory lock deserves the emphasis: it is advisory only. The frame records that a session intends to hold a resource, but nothing on the server stops a second session from acting anyway. Enforcement, when you need it, is local. A file lock on the machine doing the work is what serialises access. The frame coordinates intent; the local lock coordinates the act. This keeps the surface honest: observing a lock frame tells you what a peer means to do, and you treat it as the courtesy it is.

Inferred, not declared

The same instinct runs through how ~alter treats identity itself. Identity on the rails is inferred from what a person does, not taken from what they declare about themselves. A self-asserted claim is a description; the activity that produced it is the substrate. The identity surface you read over MCP is built from observed signal, and every trait it carries records how it was derived, so a reader can weigh it rather than take it on faith.

No language model reads you. The inference is classical and auditable: observed signals map to recorded traits through fixed, published logic, not a generative model’s judgement. The agents that query your identity bring their own model; the reading itself uses none. If a generative model ever sits in the path that decides who you are, the protocol is broken, assume so until you can verify otherwise.

For an integrator this closes the loop. The same rule that says “observe the substrate, do not trust the narrative” for system state is the rule that says “read what a person did, do not take their word for it” for identity. Provenance travels with both; neither has a canonical narrator. The consent model decides what inferred identity you are allowed to read, and the x402 layer ensures the person earns when you read it.

Where to go next

This page is a principle, not an endpoint. To put it to work, return to the build guide and the agent-native surface it points into.