Nexara Connect docs0.1.0

Memory protocol

Nexara Connect speaks the same memory verbs as GBrain's MEMORY_VERBS v1, so an agent that already knows recall, remember, forget, entity, context_pack, delta and synthesize works unchanged. The names and argument shapes are GBrain's; what sits behind them is the Nexara vault, so every verb runs through the same gate as every other read or write: authorize(), the sensitivity ceiling, block-level redaction, agent trust and the audit log.

A fact is one line with a source

A fact is a sentence, who said it, where it comes from and when. It is not a separate database. Facts live in the page's own markdown, in a table the app manages:

<!-- nexara:facts -->
| # | fact | source | who | when | status |
|---|---|---|---|---|---|
| 1 | ~~Quota is EUR 1.2M~~ | 2026 plan | human:Me | 2026-01-01T00:00:00Z | replaced by #2 |
| 2 | Quota is EUR 1.5M | board, June | human:Me | 2026-06-01T00:00:00Z | active |
| 3 | ~~Reports to Sam~~ | org chart | agent:scout <owner@example.com> | 2026-03-01T00:00:00Z | withdrawn: Sam left |
<!-- /nexara:facts -->

Because the table is in the page, git holds the whole truth: every remember and forget is a commit with an author, a clone shows the same facts as the app, and nexara reindex rebuilds the fact index from the pages. The SQLite facts table is only a mirror.

The table is a ledger. A save from anyone, by any route (app, REST, MCP, git push), may add rows and strike rows. It may never delete a row, reword one, or turn a struck row back on. The app refuses such a save with facts_ledger and the git pre-receive hook refuses the same push with the same reason, so there is no route around it.

A page can hold facts at more than one lock. A fact remembered with lock: confidential goes into the page's Restricted block (creating one if needed); a reader without that ceiling does not see the row, the fact id, or that it exists. remember and forget on a row above your ceiling return not_found, not forbidden, for the same reason.

Entities

An entity is a page whose type is person, company, project or deal. Its aliases list (frontmatter) counts as the same name. There is no separate entity store; the People and Companies views are the index read back, with each page's aliases, fact count and backlinks.

---
title: Priya Natarajan
type: person
aliases: [Priya, P. Natarajan]
---

Linking is zero-LLM. When a page is saved the body (never a fact row, never a code block, never an existing link) is scanned for the names and aliases of entity pages the saver can read. Companies, projects and deals are suggested; people are suggested unless the owner has switched on "Link people automatically" (Settings > Memory), in which case the first mention becomes a [[link]] on save. A suggestion is confirmed from the page's Facts tab or POST /nodes/:id/link. The candidate list is built from the saver's own ceiling, so a Guest's save never reveals the existence of a Restricted person by linking to it.

The verbs

VerbWhat it doesGrantRead?
recallFacts matching query words and/or an entity, newest first, active unless include_expired. Every fact carries fact_id, source (also returned as provenance), who, when, state (active, replaced or withdrawn) and the page it is on.readyes
rememberAdd a fact to a page (node id, path, title or alias). A source is required, as either source or provenance: the reply is provenance_required with a fix without it. replaces: fact_id strikes the old row as replaced by #n. The reply states state: "active", id and fact_id for the new fact and node_id for its page; when the same text was already there it adds unchanged: true and writes nothing.write (Direct trust) else proposalno
forgetStrike a fact as withdrawn with your reason. The reply states state: "withdrawn" and id = the fact_id. Idempotent: a second call answers the same with unchanged: true.write (Direct trust) else proposalno
entityOne entity by name, alias, path or id: page (redacted to your ceiling), type, aliases, active facts, links and backlinks.readyes
context_packA bundle for an intent within budget_tokens: matching facts first (they are cheap and sourced), then pages, then the entities you name. Fenced like context_bundle.readyes
deltaWhat changed since a cursor (the next_cursor from a previous call, or nothing for the last 24 hours): pages written, facts added, facts expired. Agents use it to catch up instead of re-reading.readyes
synthesizeNot offered. Returns use_ask with a fix that names the Ask tool, because an agent summarising other people's pages at machine speed is how private material leaks. Ask answers from pages you can read, with sources, and its answers are logged.anyno

node, node_id and entity are accepted as aliases on remember, and so are source and provenance for the source, so GBrain-shaped calls and Nexara-shaped calls both work. A fact has one set of state words everywhere it is read or written back: active, replaced, withdrawn. Over REST, DELETE /api/v1/facts/<fact_id> does the same as POST /api/v1/facts/<fact_id>/forget.

The trust gate

remember and forget are writes. An agent on Suggest trust (or without a write grant on the page's folder) does not fail: the fact arrives as a proposal, the reply has status: "proposed" and proposal_id, and a person accepts it from the inbox, after which the row lands with the agent as who. An agent on Direct trust writes the row itself. An agent that a person has paused (undo-all or the breaker) is back on proposals until a person chooses a trust level again. The same rules as context_write; nothing about facts bypasses them.

Errors

Every refusal has a machine-readable code, a sentence, and a fix an agent can act on, in GBrain's error shape:

CodeMeansFix the reply suggests
provenance_requiredremember without a sourcepass source (or provenance)
invalid_paramsmissing or over-long fieldwhat to shorten or add
not_foundno such page, entity or fact at your ceilingcheck recall; or the fact is above your access
facts_ledgera save removed, reworded or un-withdrew a rowuse forget or remember(replaces)
target_withdrawn / target_supersededreplaces points at a struck rowreplace the live one
replaces_duplicatethe new text equals the one it replacesnothing to do
invalid_cursora delta cursor that is not ourscall delta without a cursor
use_asksynthesizecall Ask

Privacy probe

The test suite runs the same probe over the vault, MCP and REST: a Guest session and a project-scoped agent key call every verb and route against a workspace with Restricted facts and a Restricted deal page. Every answer is 404, 403 or empty, and the response bodies contain no fragment of the Restricted page, its path, its facts or its fact ids. The git hook test pushes a clone that deletes a row and is refused, then strikes the row and is accepted.