luci-memory
by @gimlettt
Search personal video memory — media content (videos, images, keyframes, transcripts) and portrait data (traits, events, relationships, speeches). Use when t...
clawhub install luci-memory📖 About This Skill
name: luci-memory description: "Search personal video memory — media content (videos, images, keyframes, transcripts) and portrait data (traits, events, relationships, speeches). Use when the user asks about their videos, what happened, what was said, who they know, or their personality." metadata: {"clawdbot":{"emoji":"🧠","requires":{"bins":["python3"],"env":["MEMORIES_AI_KEY"]},"primaryEnv":"MEMORIES_AI_KEY"}}
luci-memory
Setup
Requires an MEMORIES_AI_KEY. On first use, if no key is found, the script will error and ask for one.
When the user provides their key, save it to {baseDir}/.env:
MEMORIES_AI_KEY=sk-their-key-here
After that, everything just works — the key is loaded automatically from .env on every run.
Timezone
All timestamps in Luci-memory are stored and returned in UTC. Skill output labels them with " UTC" so this is unambiguous. The user's local timezone is in USER.md (e.g. Asia/Shanghai). You are responsible for converting in both directions:
1. Reading results. When presenting captured_time to the user, convert from UTC to the user's local timezone. Never show raw UTC labels to the user.
2. Writing filters. --after and --before are interpreted as UTC. If the user says relative dates like "yesterday" or "this morning", convert their local-time intent to a UTC range before passing the dates.
Example (user in Asia/Shanghai, UTC+8, asks "what did I do yesterday" on 2026-04-08):
--after 2026-04-06T16:00:00 --before 2026-04-07T16:00:00If USER.md has no timezone and the user uses relative dates, ask them first.
Unified search across personal media and portrait data from the Luci-memory API.
The user's videos go through two processing pipelines that produce different data:
When to use
Choosing the right type
search_video, query_audio, etc.)traits, events, speeches, etc.)Relevance guidelines
No hallucination — ground every claim in retrieved data
--video-ids to get complete transcripts. You can also use search_audio / search_visual scoped to those video IDs to find specific moments — use both flexibly as needed.
How to invoke
Note: --after / --before are UTC. Convert from the user's local timezone first (see Timezone section above).
Returning Images/Keyframes to User
When search results include signed URLs (keyframes, images), follow this pipeline to send them in chat:
1. Download the signed URL to the workspace:
curl -sL -o /path/to/workspace/image.jpg ""
bash
2. Send via OpenClaw message CLI:
openclaw message send --channel ============ Media content (personal) ============
--- Video ---
bash {baseDir}/run.sh --query "cooking in kitchen" --type search_video bash {baseDir}/run.sh --query "what did I do" --type search_video --location "Heze" bash {baseDir}/run.sh --query "meeting" --type search_video --after 2025-12-01 --before 2026-01-01 bash {baseDir}/run.sh --type query_video bash {baseDir}/run.sh --type query_video --location "Suzhou" --after 2025-12-01--- Image ---
bash {baseDir}/run.sh --query "sunset" --type search_image bash {baseDir}/run.sh --query "food" --type search_image --location "Beijing" bash {baseDir}/run.sh --type query_image--- Audio Transcripts (what was said) ---
bash {baseDir}/run.sh --query "talking about work" --type search_audio bash {baseDir}/run.sh --query "budget" --type search_audio --video-ids VI123,VI456 bash {baseDir}/run.sh --type query_audio --video-ids VI123,VI456--- Visual Transcripts (what was shown) ---
bash {baseDir}/run.sh --query "walking in park" --type search_visual bash {baseDir}/run.sh --type query_visual --video-ids VI123,VI456--- Keyframes ---
bash {baseDir}/run.sh --query "person waving" --type search_keyframe bash {baseDir}/run.sh --type query_keyframe --video-ids VI123,VI456============ People & knowledge (portrait) ============
--- Traits ---
bash {baseDir}/run.sh --type traits bash {baseDir}/run.sh --type traits --person "Alice" bash {baseDir}/run.sh --query "outdoor activities" --type search_traits--- Events ---
bash {baseDir}/run.sh --type events bash {baseDir}/run.sh --type events --person "Alice" bash {baseDir}/run.sh --type events --person "Alice,Bob" bash {baseDir}/run.sh --type events --after 2025-12-01 --before 2026-01-01 bash {baseDir}/run.sh --query "cooking in kitchen" --type search_events bash {baseDir}/run.sh --query "meeting" --type search_events --person "Bob" --after 2025-12-01--- Relationships ---
bash {baseDir}/run.sh --type relationships bash {baseDir}/run.sh --type relationships --person "Alice"--- Speeches ---
bash {baseDir}/run.sh --type speeches bash {baseDir}/run.sh --type speeches --person "Alice" bash {baseDir}/run.sh --type speeches --event-ids EVT123,EVT456 bash {baseDir}/run.sh --type speeches --person "Alice" --event-ids EVT123 ``Parameters
| Flag | Short | Description |
|------|-------|-------------|
|
--query | -q | Search term (required for search_* types) |
| --type | -t | Operation type (default: search_video) |
| --top-k | -k | Max results (default: 10) |
| --location | -l | Filter by location name, geocoded via Google Maps (e.g. "Suzhou") |
| --after | | Only results after this date (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS) |
| --before | | Only results before this date |
| --video-ids | | Comma-separated video IDs (media types) |
| --person | -p | Filter by person name(s), comma-separated (portrait types). Use user for self. |
| --event-ids | | Comma-separated event IDs (portrait types) |Signed URLs
Image and keyframe results include a
signed_url field — a temporary (1-hour) direct link to view/download from Google Cloud Storage. No authentication needed, but they expire after 1 hour.Types reference
Media search types (require
--query)
| Type | What it searches | Supports |
|------|-----------------|----------|
| search_video | Video summaries by meaning | --location, --after/before |
| search_image | Image descriptions by meaning | --location, --after/before |
| search_audio | Audio transcripts by meaning | --video-ids, --after/before |
| search_visual | Visual transcripts by meaning | --video-ids, --after/before |
| search_keyframe | Keyframe images by meaning | --video-ids, --after/before |Media query types (list/filter)
| Type | What it returns | Requires | Supports |
|------|----------------|----------|----------|
| query_video | Recent videos | — | --location, --after/before |
| query_image | Recent images | — | --location, --after/before |
| query_audio | Audio transcripts for videos | --video-ids | --after/before |
| query_visual | Visual transcripts for videos | --video-ids | --after/before |
| query_keyframe | Keyframes for videos | --video-ids | --after/before |Portrait query types (list/filter)
| Type | What it returns | Supports |
|------|----------------|----------|
| traits | Personality traits, hobbies, interests | --person |
| events | Events with participants | --person, --after/before, --event-ids |
| relationships | How user relates to people | --person |
| speeches | What people said | --person, --event-ids |Portrait search types (semantic, require
--query)
| Type | What it searches | Supports |
|------|-----------------|----------|
| search_events | Events by meaning | --person, --after/before |
| search_traits` | Traits by meaning | — |
⚡ When to Use
⚙️ Configuration
Requires an MEMORIES_AI_KEY. On first use, if no key is found, the script will error and ask for one.
When the user provides their key, save it to {baseDir}/.env:
MEMORIES_AI_KEY=sk-their-key-here
After that, everything just works — the key is loaded automatically from .env on every run.