49 lines
1.2 KiB
Markdown
49 lines
1.2 KiB
Markdown
# Memory
|
|
|
|
**Long-term memory** extracted from conversations. The system
|
|
identifies facts, preferences, and context about the user and stores
|
|
them for injection into future conversations.
|
|
|
|
### User Memory
|
|
|
|
```
|
|
GET /memories → { "data": [memory objects] }
|
|
GET /memories/count → { "count": 42 }
|
|
PUT /memories/:id ← { "content": "updated text" }
|
|
DELETE /memories/:id
|
|
POST /memories/:id/approve → approve a pending memory
|
|
POST /memories/:id/reject → reject a pending memory
|
|
```
|
|
|
|
Memory object:
|
|
|
|
```json
|
|
{
|
|
"id": "uuid",
|
|
"user_id": "uuid",
|
|
"persona_id": "uuid|null",
|
|
"scope": "user|persona",
|
|
"content": "User prefers Go for backend work",
|
|
"source_channel_id": "uuid",
|
|
"status": "pending|approved|rejected",
|
|
"confidence": 0.85,
|
|
"created_at": "...",
|
|
"updated_at": "..."
|
|
}
|
|
```
|
|
|
|
`scope`: `user` memories apply across all conversations. `persona`
|
|
memories are specific to interactions with that Persona.
|
|
|
|
### Admin Memory Review
|
|
|
|
```
|
|
GET /admin/memories/pending → { "data": [memory objects with user info] }
|
|
POST /admin/memories/bulk-approve ← { "ids": ["uuid1", "uuid2"] }
|
|
```
|
|
|
|
Platform admin can review and bulk-approve pending memories across
|
|
all users.
|
|
|
|
---
|