3.2 KiB
type, status, updated, tags
| type | status | updated | tags | |||
|---|---|---|---|---|---|---|
| agent-integration | proposed | 2026-05-05 |
|
mem9 Integration
Goal
Use mem9 as a cross-session, cross-agent recall layer without replacing the workspace's auditable Markdown memory.
Source Of Truth
project-knowledge/ remains the canonical human-readable Fidelity project memory.
agent-memory/ remains the canonical operating memory for agent behavior, workflows, promotion rules, and integration guidance.
mem9 should recall and surface relevant facts, but durable project updates must still be promoted into the correct Markdown file when they become canonical.
Recommended Scope
Use a project-scoped mem9 profile for this workspace when possible so Fidelity context, agent behavior, and personal/global memories do not collapse into one undifferentiated pool.
Do not bulk-import raw inboxes, generated sync output, full chat transcripts, or broad project folders by default. Import only curated facts, stable preferences, and distilled summaries.
What To Store
- Stable user/workspace preferences that should survive sessions.
- Durable agent behavior rules that are useful across Codex/OpenCode sessions.
- Verified project facts already present in canonical Markdown.
- Short summaries of current work that help recall where to begin.
What Not To Store
- Secrets, credentials, API keys, tokens, auth cookies, or private environment values.
- Raw Mattermost/Slack inbox dumps.
- Fidelity product source code or proprietary implementation snippets.
- Unverified assumptions, temporary sync failures, or tooling chatter.
- Duplicates of every daily note without curation.
Efficient Use Pattern
- Recall mem9 early for user preferences and relevant workspace history.
- Load hot Markdown context from
AGENTS.md/opencode.jsoninstructions. - For current-work questions, still inspect
project-knowledge/01-current/current-work.mdand the latest relevant daily note. - Answer or act from verified context.
- When the interaction adds durable knowledge, update canonical Markdown first; store a compact mem9 memory only if it improves future recall.
Codex Setup Notes
The upstream mem9 Codex integration uses a marketplace plugin and managed hooks. $mem9:setup is the primary setup command. It manages shared profiles, credentials, user/project scope, and hook repair.
Expected local surfaces include:
$CODEX_HOME/hooks.json$CODEX_HOME/config.toml$CODEX_HOME/mem9/$MEM9_HOME/.credentials.json<project>/.codex/mem9/config.jsonfor project overrides
Keep $MEM9_HOME/.credentials.json outside the repository and never commit API keys.
Validation Checklist
- Confirm Codex CLI is at least the version required by the mem9 plugin.
- Confirm Node.js 22 or newer is available to the Codex runtime.
- Install the mem9 Codex plugin from the mem9 marketplace.
- Run
$mem9:setupand choose hosted API or self-hosted API. - Apply project scope for this workspace if using a dedicated Fidelity profile.
- Verify
$mem9:recallreturns relevant memories. - Verify
$mem9:storestores one approved non-sensitive memory. - Inspect mem9 dashboard / memory list for accidental sensitive content.
- Keep canonical Markdown updates auditable through git.