JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 29
  • Score
    100M100P100Q102602F
  • License MIT

Long-term memory plugin for OpenCode AI editor — remember preferences, decisions, patterns and lessons across sessions.

Package Exports

  • nomi-agent

Readme

nomi-agent

English | 中文

CI npm License: MIT

Long-term memory for OpenCode — remember preferences, decisions, patterns and lessons across sessions.


Installation

Prerequisites

Install Nomi

npx nomi-agent install

This single command downloads and installs Nomi into your OpenCode global config. No separate npm install needed — npx handles everything automatically.

Restart OpenCode after installation. Nomi will start injecting your memories into every session immediately.

Prefer a permanent global install?

npm install -g nomi-agent
nomi-agent install

Verify installation

After restarting OpenCode, ask the agent:

remember this: I prefer concise code comments

If Nomi responds with a confirmation, the installation is working.


What it does

Nomi gives OpenCode AI a persistent memory store. The agent automatically:

  • Remembers preferences, decisions, patterns, and lessons you tell it
  • Recalls relevant context at the start of each session
  • Injects up to ~1500 tokens of relevant memories into the system prompt

Memories are stored locally in a JSONL file at:

~/.config/opencode/nomi/memories.jsonl

Override the path with NOMI_MEMORY_PATH=/your/path.


CLI reference

npx nomi-agent install    # Install into OpenCode global config
npx nomi-agent update     # Reinstall after upgrading the package
npx nomi-agent uninstall  # Remove all installed files

What install does

  1. Copies compiled runtime to ~/.config/opencode/nomi/
  2. Runs npm install inside that directory to resolve @opencode-ai/plugin
  3. Writes generated plugin/tool files into your OpenCode config:
    • ~/.config/opencode/plugins/nomi-memory.ts
    • ~/.config/opencode/tools/remember.ts
    • ~/.config/opencode/tools/recall.ts
    • ~/.config/opencode/agents/nomi.md

Memory categories

Category Use for
preference Communication style, code style preferences
decision Technology choices and the reasoning behind
pattern Project conventions, naming, code patterns
lesson Bugs fixed, pitfalls to avoid next time
context Project background, key dependencies, paths

Local Dashboard

Nomi includes a local web dashboard for browsing and managing your memories.

cd nomi-dashboard
npm install
npm run build   # build frontend assets
npm run api     # start Hono server at http://127.0.0.1:3210

Available at http://127.0.0.1:3210

The dashboard supports: list, search, filter by category/project, create, edit, delete, bulk delete, import, export, and stats.


Configuration

Environment variable Default Description
NOMI_MEMORY_PATH ~/.config/opencode/nomi/memories.jsonl Where memories are stored
OPENCODE_CONFIG_DIR ~/.config/opencode Override OpenCode config root

How injection works

At the start of each session the plugin selects memories up to a ~1500-token budget, in priority order:

  1. Global preference memories
  2. Memories tagged with the current project directory
  3. High-hit-count global memories

Roadmap

Status Feature Description
✅ Done remember / recall tools Agent-callable memory save and search
✅ Done Auto-capture Detects "remember this: X" patterns automatically
✅ Done Session injection Memories injected into system prompt on session start
✅ Done Local Dashboard Web UI for browsing, editing, and managing memories
✅ Done CLI installer npx nomi-agent install one-command setup
🔜 Planned forget tool Let the agent delete memories through conversation
🔜 Planned list tool Let the agent enumerate memories without a search query
🔜 Planned Configurable injection budget Allow NOMI_INJECTION_LIMIT and NOMI_TOKEN_BUDGET env vars
🔜 Planned Memory expiration / TTL Set expires_at on memories so stale ones age out
💡 Exploring Passive auto-learning Extract implicit preferences from conversation patterns
💡 Exploring Semantic search Embedding-based similarity instead of keyword tokenization

Contributing

git clone https://github.com/Zengxiaoer991214/nomi-agent.git
cd nomi-agent
npm install
npm run check   # typecheck
npm run build   # compile to dist/

Project layout:

src/
  memory/        # Core memory store (JSONL CRUD + search)
  plugins/       # OpenCode plugin definition
  tools/         # remember / recall tool definitions
cli/
  install.ts     # npx installer
nomi-dashboard/  # Local React dashboard (private, not published)
.opencode/       # Project-local OpenCode config (for development)

License

MIT © Nomi Contributors