StarMenory = Star + Memory — Persistent Stellar Memory
OpenCode Long-term Memory Plugin & Skill System. Let AI remember your preferences, rules, and project context.
Auto record fragment memory
Manual query memory
StarMenory uses a layered memory management system with hot and cold data circulating to ensure efficient access and long-term persistence.
┌─────────────────────────────────────────────────────────────────┐
│ Memory Cycle Flow │
└─────────────────────────────────────────────────────────────────┘
User adds memory
│
▼
┌─────────────────┐
│ fragments.json │ ◀── Hot data (JSON format)
└─────────────────┘
│
▼
┌─────────────────┐ ┌──────────────┐
│ Normal search │ ──▶ │ JSON only │
└─────────────────┘ └──────────────┘
┌─────────────────────┐ ┌──────────────┐
│ Deep search │ ──▶ │ JSON不够时查 │
└─────────────────────┘ │ SQLite archive│
│ └──────────────┘
▼ │
┌──────────────┐ ▼
│ Auto restore │ ◀── Restore found items to JSON
└──────────────┘
│
▼
┌─────────────────┐ ┌──────────────────────┐
│ Periodic compact │ ──▶ │ Archive cold data │
└─────────────────┘ │ to SQLite │
└──────────────────────┘
| Layer | Storage | Description |
|---|---|---|
| Hot | memory.json | Long-term memory: user preferences, rules, project config |
| Hot | fragments.json | Fragment memory: experiences, habits, events (active data) |
| Hot | associations_map.json | Synonym mapping table |
| Cold | SQLite (fragment_archive.db) | Archived data: long-unaccessed fragment memories |
| Tool | Action | Description |
|---|---|---|
memory |
view | View all memory configurations |
memory |
add | Add memory (preferences/rules) |
memory |
update | Update memory |
memory |
delete | Delete memory |
memory |
search | Search memory |
| Tool | Action | Description |
|---|---|---|
memory_fragment_add |
- | Add fragment memory (keywords/category/layer) |
memory_fragment_view |
- | View fragment list (filter by category/layer) |
memory_fragment_search |
- | Normal search (JSON hot data only) |
memory_fragment_update |
- | Update fragment (content/weight/layer) |
memory_fragment_delete |
- | Delete fragment |
memory_fragment_stats |
- | View fragment statistics |
memory_fragment_compact |
gentle/auto/aggressive | Compact fragments, archive cold data to SQLite |
memory_fragment_restore |
list/id/query | Restore fragments from SQLite archive |
memory_fragment_deep_search |
- | Deep search (JSON + SQLite, auto restore) |
memory_fragment_archive_status |
- | View archive status and suggestions |
memory_fragment_diagnosis |
- | Diagnose memory status: config+stats+pie chart+AI suggestions |
| Tool | Action | Description |
|---|---|---|
synonym_map_view |
- | View synonym mapping table |
synonym_map_add |
- | Add synonym mapping |
synonym_map_update |
- | Update synonym mapping (replace all) |
synonym_map_delete |
- | Delete synonym mapping |
| Tool | Action | Description |
|---|---|---|
memory_sqlite |
set/get/delete/list | SQLite key-value storage tool (for testing) |
| Tool | Action | Description |
|---|---|---|
memory_manual |
keyword | Query plugin manual (AI exclusive) |
cold_data_days: Over 30 days unaccessed → considered cold datacold_data_age_days: Over 60 days since creation → considered cold datajson_max_count: Max 200 fragments in JSON (auto archive when approaching limit)
Copy and send this to AI for automatic installation:
Install StarMenory v1.4.0: https://github.com/owofile/opencode-starmemory-plugins/tree/main/v1.4.0
opencode-starmemory-plugins/
├── v1.4.0/ # Recommended version (Latest)
│ ├── INSTALL.md
│ ├── memory.json # Default configuration file
│ ├── plugins/opencode-memory/
│ ├── skills/
│ │ ├── memory-manager/
│ │ └── memory-fragment/
│ ├── associations_map.json
│ └── opencode.json
├── v1.3.1/
├── v1.3.0/
├── v1.2.0/
├── v1.1.0/
├── v1.0.0/
├── docs/
│ ├── StarMenoryLOGO.png
│ ├── 自动记录相关记忆.gif
│ └── 手动查询记忆演示.gif
├── README.md
└── README_CN.md
MIT
