You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Media sidecars: write one for every media file, from any source, in any indexed folder #13
A media file (image, PDF, audio, video) is embedded on its own, but it only gets a human-readable .md sidecar (origin channel, timestamp, caption, sender) through one path: core/media-filer. That filer watches a single runtime-specific drop folder (~/.openclaw/media/inbound), so in any other setup nothing writes a sidecar. Files saved by an agent straight into the assets folder, and files delivered by a chat UI into some other attachments directory, get no sidecar and no message context. Attachments outside the configured assets source are not indexed at all.
A writer helper for agents and uploaders. One call (CLI plus a small library function) that saves a media file and writes its sidecar in the same step, taking the caption and sender as arguments. This is the high-quality path.
A watcher safety net. Any media file that appears in an indexed folder without a sidecar gets one generated automatically, marked generated: true. Context comes from, in order: the nearest inbox or chat message that references the file name or path, then file metadata (name, type, size, modified time). A model-written caption is optional and off by default. A hand-written sidecar is never overwritten.
A nudge for direct writers. A hook or doc rule that tells agents writing media straight into a folder to use the helper, so the safety net is the fallback and not the norm.
Configurable extra media sources, so a chat UI's attachments directory can be indexed without moving files.
Generalise core/media-filer so the watched drop folder is configuration, not a hard-coded OpenClaw path.
Why the safety net matters most
Relying on every agent to remember a sidecar fails silently, the file simply becomes less findable. A watcher cannot forget.
Open questions
Is context-from-nearest-message reliable enough without a model, or do we want an optional cheap captioning pass?
Sidecar naming: <file>.md (current) versus a sibling folder.
Video: confirm embedding support before promising sidecars for it.
Note: spec and ticket only for now; no code change until the freeze lifts.
Scope update: video is in scope for sidecars, but not for embedding. A video file gets a sidecar (same schema, generated or written by the helper), and the sidecar is indexed as text. The video file itself is not embedded. Images, PDFs and audio are embedded as today.
Activity
simon-inkie commentedon Oct 7, 2026
Scope update: video is in scope for sidecars, but not for embedding. A video file gets a sidecar (same schema, generated or written by the helper), and the sidecar is indexed as text. The video file itself is not embedded. Images, PDFs and audio are embedded as today.