@@ -11,10 +11,9 @@ OpenCode Memory provides AI coding agents with the ability to remember and recal
1111## Key Features
1212
1313- ** Local Vector Database** : SQLite-based storage with sqlite-vec extension
14- - ** Dual Memory Scopes** : Separate user-level and project-level memory contexts
14+ - ** Project Memory System** : Persistent storage for project-specific knowledge
15+ - ** User Profile System** : Automatic learning of preferences, patterns, and workflows
1516- ** Unified Timeline** : Browse memories and prompts together with linking support
16- - ** Prompt-Memory Linking** : Bidirectional links between prompts and generated memories
17- - ** User Profile System** : Structured learning with preferences, patterns, workflows, and skill assessment
1817- ** Web Interface** : Full-featured UI for memory management and search
1918- ** Auto-Capture System** : Intelligent prompt-based memory extraction
2019- ** Multi-Provider AI** : Support for OpenAI, Anthropic, and OpenAI-compatible APIs
@@ -52,12 +51,18 @@ bun run build
5251### Basic Usage
5352
5453``` typescript
55- memory ({ mode: " add" , content: " Project uses microservices" , scope: " project" })
56- memory ({ mode: " search" , query: " architecture decisions" , scope: " project" })
54+ // Add project memory
55+ memory ({ mode: " add" , content: " Project uses microservices architecture" })
56+
57+ // Search memories
58+ memory ({ mode: " search" , query: " architecture decisions" })
59+
60+ // View user profile
5761memory ({ mode: " profile" })
58- ```
5962
60- ** Note** : User-scoped ` add ` is deprecated in v2.2+. Use profile system instead.
63+ // List recent memories
64+ memory ({ mode: " list" , limit: 10 })
65+ ```
6166
6267### Web Interface
6368
@@ -71,7 +76,7 @@ Access at `http://127.0.0.1:4747` to browse memories, view prompt-memory links,
7176
7277![ User Profile Viewer] ( .github/screenshot-user-profile.png )
7378
74- ### Configuration
79+ ## Configuration
7580
7681Configuration file: ` ~/.config/opencode/opencode-mem.jsonc `
7782
@@ -86,38 +91,48 @@ Configuration file: `~/.config/opencode/opencode-mem.jsonc`
8691 " memoryModel" : " gpt-4" ,
8792 " memoryApiUrl" : " https://api.openai.com/v1" ,
8893 " memoryApiKey" : " sk-..." ,
89- " userMemoryAnalysisInterval" : 10 ,
90- " userProfileMaxPreferences" : 20 ,
91- " userProfileMaxPatterns" : 15 ,
92- " userProfileMaxWorkflows" : 10 ,
93- " userProfileConfidenceDecayDays" : 30 ,
94- " userProfileChangelogRetentionCount" : 5
94+ " userProfileAnalysisInterval" : 10 ,
95+ " maxMemories" : 10
9596}
9697```
9798
98- ## Breaking Changes (v2.2)
99+ See [ Configuration Guide ] ( https://github.com/tickernelz/opencode-mem/wiki/Configuration-Guide ) for all options.
99100
100- ** User-scoped memories deprecated in favor of structured user profiles: **
101+ ## Breaking Changes (v2.3)
101102
102- - Removed: User-scoped ` addMemory ` (now returns error)
103- - Changed: ` memory({ mode: "profile" }) ` returns new structure (preferences/patterns/workflows/skillLevel)
104- - Added: 5 new config options for profile management
105- - New behavior: User learning creates/updates structured profile instead of individual memories
106- - Migration: Existing user memories remain readable but new ones cannot be created
103+ ** User-scoped memories completely removed:**
107104
108- ** Migration required** : Update code using ` mode: "profile" ` to handle new structure.
105+ - ** Removed** : ` scope ` parameter from all memory operations
106+ - ** Removed** : ` maxProjectMemories ` config (use ` maxMemories ` instead)
107+ - ** Renamed** : ` userMemoryAnalysisInterval ` → ` userProfileAnalysisInterval `
108+ - ** Renamed** : ` performUserMemoryLearning() ` → ` performUserProfileLearning() `
109+ - ** Changed** : All memories are now project-scoped by default
110+ - ** Changed** : User preferences managed exclusively through automatic profile system
109111
110- ## Breaking Changes (v2.0)
112+ ** Migration required:**
113+ ``` jsonc
114+ // OLD
115+ {
116+ " userMemoryAnalysisInterval" : 10 ,
117+ " maxMemories" : 5 ,
118+ " maxProjectMemories" : 10
119+ }
111120
112- ** Token-based auto-capture has been replaced with prompt-based system:**
121+ // NEW
122+ {
123+ " userProfileAnalysisInterval" : 10 ,
124+ " maxMemories" : 10
125+ }
126+ ```
113127
114- - Removed: ` autoCaptureTokenThreshold ` , ` autoCaptureMinTokens ` , ` autoCaptureMaxMemories ` , ` autoCaptureSummaryMaxLength ` , ` autoCaptureContextWindow `
115- - Added: ` memoryProvider ` , ` userMemoryAnalysisInterval ` , ` autoCaptureMaxIterations ` , ` autoCaptureIterationTimeout `
116- - New behavior: Triggers on session idle, analyzes last uncaptured prompt
117- - Automatic skip logic for non-technical conversations
118- - Prompt-memory linking with cascade delete support
128+ Remove ` scope ` parameter from all ` memory() ` calls:
129+ ``` typescript
130+ // OLD
131+ memory ({ mode: " add" , content: " ..." , scope: " project" })
119132
120- ** Migration required** : Remove deprecated config options and add new ones.
133+ // NEW
134+ memory ({ mode: " add" , content: " ..." })
135+ ```
121136
122137## Documentation
123138
@@ -126,88 +141,13 @@ For detailed documentation, see the [Wiki](https://github.com/tickernelz/opencod
126141- [ Installation Guide] ( https://github.com/tickernelz/opencode-mem/wiki/Installation-Guide )
127142- [ Quick Start] ( https://github.com/tickernelz/opencode-mem/wiki/Quick-Start )
128143- [ Configuration Guide] ( https://github.com/tickernelz/opencode-mem/wiki/Configuration-Guide )
129- - [ User Profile System] ( https://github.com/tickernelz/opencode-mem/wiki/User-Profile )
144+ - [ User Profile System] ( https://github.com/tickernelz/opencode-mem/wiki/User-Profile-System )
130145- [ Memory Operations] ( https://github.com/tickernelz/opencode-mem/wiki/Memory-Operations )
131146- [ Auto-Capture System] ( https://github.com/tickernelz/opencode-mem/wiki/Auto-Capture-System )
132147- [ Web Interface] ( https://github.com/tickernelz/opencode-mem/wiki/Web-Interface )
133- - [ Embedding Models] ( https://github.com/tickernelz/opencode-mem/wiki/Embedding-Models )
134- - [ Performance Tuning] ( https://github.com/tickernelz/opencode-mem/wiki/Performance-Tuning )
148+ - [ API Reference] ( https://github.com/tickernelz/opencode-mem/wiki/API-Reference )
135149- [ Troubleshooting] ( https://github.com/tickernelz/opencode-mem/wiki/Troubleshooting )
136150
137- ## Features Overview
138-
139- ### Memory Scopes
140-
141- - ** User Scope** : Cross-project preferences, coding style, communication patterns
142- - ** Project Scope** : Architecture decisions, technology stack, implementation details
143-
144- ### Auto-Capture System
145-
146- Automatically extracts memories from conversations:
147-
148- 1 . Triggers on session idle
149- 2 . Analyzes last uncaptured prompt and response
150- 3 . Links memory to source prompt
151- 4 . Skips non-technical conversations
152-
153- ### User Profile System
154-
155- Builds structured user profile from conversation history (default: every 10 prompts):
156-
157- - ** Preferences** : Code style, communication style, tool preferences (with confidence scores)
158- - ** Patterns** : Recurring topics, problem domains, technical interests (with frequency tracking)
159- - ** Workflows** : Development sequences, habits, learning style
160- - ** Skill Level** : Overall and per-domain assessment
161-
162- Profile includes versioning, changelog, and confidence decay mechanism.
163-
164- ### Web Interface
165-
166- - Unified timeline of memories and prompts
167- - User profile viewer with changelog
168- - Visual prompt-memory link indicators
169- - Cascade delete for linked items
170- - Bulk operations
171- - Search and filters
172- - Maintenance tools (cleanup, deduplication)
173-
174- ## API Reference
175-
176- ### Memory Tool
177-
178- ``` typescript
179- memory ({ mode: " add" , content: " ..." , scope: " project" })
180- memory ({ mode: " search" , query: " ..." , scope: " user|project" })
181- memory ({ mode: " list" , scope: " user|project" , limit: 10 })
182- memory ({ mode: " profile" })
183- memory ({ mode: " forget" , memoryId: " ..." })
184- memory ({ mode: " auto-capture-toggle" })
185- memory ({ mode: " auto-capture-stats" })
186- memory ({ mode: " capture-now" })
187- ```
188-
189- ** Note** : ` scope: "user" ` for ` add ` mode is deprecated in v2.2+.
190-
191- ### REST API
192-
193- ** Memory & Prompt Management:**
194- - ` GET /api/memories?scope=project&includePrompts=true ` - List memories/prompts
195- - ` POST /api/memories ` - Create memory
196- - ` PUT /api/memories/:id ` - Update memory
197- - ` DELETE /api/memories/:id?cascade=true ` - Delete memory (and linked prompt)
198- - ` DELETE /api/prompts/:id?cascade=true ` - Delete prompt (and linked memory)
199- - ` POST /api/search ` - Vector search
200-
201- ** User Profile:**
202- - ` GET /api/profile ` - Get user profile
203- - ` GET /api/profile/changelog?limit=5 ` - Get profile changelog
204- - ` GET /api/profile/snapshot/:changelogId ` - Get profile snapshot
205- - ` POST /api/profile/refresh ` - Force profile refresh
206-
207- ** Maintenance:**
208- - ` POST /api/cleanup ` - Run cleanup
209- - ` POST /api/deduplicate ` - Run deduplication
210-
211151## Development
212152
213153``` bash
0 commit comments