Summary
Memsys Ingest Endpoint Instructions — AI Reference
Full Content
# Memsys & Companion Ingest Endpoint Instructions
## Purpose
Claude can POST directly into Michael's memory system RAG indexes using the ingest endpoint. Two indexes are available:
- **memsys** — project session summaries, technical decisions, coding outcomes
- **companion** — personal facts, family, health, preferences, life events
## Endpoint
POST https://memory.nsgia.com/ingest/clip
## Headers
Content-Type: application/json
X-Device-Key: wLd1_dp8GY1la8f3EWkBB_Wr1S3jcHc9nZVIRerhP-4
## Device Key
Key lives at `/etc/memory-clip/config.ini` on the workstation. To refresh: `sudo dpkg -i ~/Downloads/memory-clip_2.1.0_all.deb` then `cat /etc/memory-clip/config.ini`. Update this doc and userPreferences when renewed.
## Payload — Memsys (default)
{"content": "Full text", "source": "claude_session", "title": "Session: Date — Title"}
## Payload — Companion
{"content": "Full text", "source": "companion", "title": "Personal: Topic — details", "index": "companion"}
## Field Notes
- **index**: Omit or leave empty for memsys (default). Set to "companion" for personal clips.
- **source**: Use claude_session for session summaries, companion for personal clips, desktop_clip for workstation captures.
- **title**: Under 255 chars. Prefix with "Session:" for memsys, "Personal:" for companion.
- **content**: Include chat UUID, outcome, key decisions, technical details, grades if given. Under 1KB each.
## How to Call (bash_tool)
**Memsys (project/technical):**
```
curl -s -X POST https://memory.nsgia.com/ingest/clip -H "Content-Type: application/json" -H "X-Device-Key: wLd1_dp8GY1la8f3EWkBB_Wr1S3jcHc9nZVIRerhP-4" --data-binary @- <<EOF
{"content":"text","source":"claude_session","title":"Session: Date — Title"}
EOF
```
**Companion (personal):**
```
curl -s -X POST https://memory.nsgia.com/ingest/clip -H "Content-Type: application/json" -H "X-Device-Key: wLd1_dp8GY1la8f3EWkBB_Wr1S3jcHc9nZVIRerhP-4" --data-binary @- <<EOF
{"content":"text","source":"companion","title":"Personal: Topic — details","index":"companion"}
EOF
```
## Device Key Expiration
Key has 720-hour TTL. If device_key_expired error: `sudo dpkg -i ~/Downloads/memory-clip_2.1.0_all.deb` then `cat /etc/memory-clip/config.ini`. Update this doc and userPreferences with the new key.
## Verification
**Memsys:**
```
curl -s https://api.nsgia.com/index/k/c46478591f96d3197bd135340531f5d53738494eed2bd4b5cc16a1eaf6d3f384/plain/search/memsys/[terms]/10
```
**Companion:**
```
curl -s https://api.nsgia.com/index/k/c46478591f96d3197bd135340531f5d53738494eed2bd4b5cc16a1eaf6d3f384/plain/search/companion/[terms]/10
```
## Session Start Workflow
1. Call recent_chats (n=20)
2. Search memsys for existing claude_session summaries to avoid duplicates
3. Summarize unsummarized sessions
4. POST each via ingest endpoint
5. Confirm searchable
## Companion Workflow
- At end of conversations where personal facts surface, push companion clips
- Keep clips factual and short — the kind of thing a friend would remember
- Examples: family updates, health changes, preferences, life events, emotional context
- Search companion at session start when conversation is personal, not just technical
- Companion index is private to Michael's key and Claude's key only — Jey and others cannot search it
## What Goes Where
| Index | Content | Source tag | Title prefix |
|-------|---------|------------|--------------|
| memsys | Coding sessions, project decisions, technical outcomes | claude_session | Session: |
| memsys | Desktop clipboard captures | desktop_clip | (auto) |
| companion | Family, health, personality, life events | companion | Personal: |
| companion | Preferences, emotional context, offhand remarks | companion | Personal: |