Package Exports
- nomi-agent
Readme
nomi-agent
Long-term memory for OpenCode — remember preferences, decisions, patterns and lessons across sessions.
Installation
Prerequisites
- Node.js ≥ 20 — Download here
- OpenCode installed and configured
Install Nomi
npx nomi-agent installThis 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 commentsIf 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.jsonlOverride 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 filesWhat install does
- Copies compiled runtime to
~/.config/opencode/nomi/ - Runs
npm installinside that directory to resolve@opencode-ai/plugin - 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:3210Available 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:
- Global
preferencememories - Memories tagged with the current project directory
- High-hit-count global memories
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