# MEMIA agent protocol

MEMIA maintains local working memory: inspectable files, commitments, scheduled operations, follow-up drafts and project review. Fictional demonstration data needs no connected account.
Real handover between agents must be verified in each installation.

## Identity

- Product: MEMIA
- Local files remain readable and inspectable on the user’s machine
- Data families: operations, projects, engagements, resources, assets
- Rule: every MEMIA entity has a source and a history

## Operating procedure

1. Find the workspace and read `memia.json`.
2. Read existing MEMIA entities before creating new ones.
3. Read local projections when present: `AGENTS.md`, `CLAUDE.md`, `.cursor/rules/memia.mdc`, `.mcp.json`.
4. Continue the relevant project using the information already stored.
5. Write concise, sourced updates. Preserve the user’s control.

## Engagement protocol

- Confidence > 80: create an engagement as `detecte` with score, evidence and source.
- Confidence 40-80: create an engagement as `propose` and request confirmation.
- Confidence < 40: remain silent.
- Do not infer an unreliable deadline.

## Authority

An agent may work locally within its role. It may not send mail, post a message, modify an external service, spend money or perform another external act without the user’s explicit approval through the MEMIA egress gate.

## Connectors

Gmail/Outlook OAuth, WhatsApp (Baileys), Signal and the local service have implementations in the package and are inactive by default. OAuth application credentials are not supplied. Configure and validate each connection in the user’s installation before claiming authenticated access or message capture. Presence and activation alone are not proof. The macOS service is installed explicitly with `memia service installer`; it only handles capture once enabled. Follow-up drafts and review are manual.

For more, let’s talk.
Discord requires your own configuration. Capture and digests are not proven in the public package.
Activation alone proves no access. Evidence requires an observed authenticated read on the exact surface.

## Install and update

Node.js 20 or later. Two steps:

1. `npm install -g @kairros/memia`
2. `memia init ./MEMIA --locale en` (or `--locale fr`)

Version 0.2.1 has no update command. First upgrade: `npm install -g @kairros/memia@latest`, then `memia version`.
From 0.3.0: `memia update --check`. No background checks or silent updates. Existing workspaces are preserved without destructive migration.
`memia init` creates the local workspace. `memia projections write --root ./MEMIA` creates `.mcp.json`.
From 0.3.0, `.mcp.json` uses absolute paths to Node and the real MEMIA binary. It does not require `memia` in PATH.
After changing Node or the npm prefix, run `memia projections reparer-mcp --root ./MEMIA`. Other MCP servers are preserved.

## Local walkthrough

From the workspace, run `memia demo engagements`, `memia engagements relances`, `memia revue`.
Close a confirmed fictional commitment with `memia engagements cloturer demo-eng-compte-rendu --preuve "Fictional minutes reviewed"`.
Detected or proposed commitments need confirmation first. Explicit `--confirmer` journals confirmation before closure with proof.
Follow-ups are local drafts. With `--appliquer`, deduplication uses the local system day. Nothing is sent.

## Useful links

- https://memia.ai/
- https://memia.ai/llms.txt
- https://memia.ai/guides/
- https://www.npmjs.com/package/@kairros/memia
