memory-daemon
(formerly workspace-daemon)
A small scheduled automation that runs declarative capture and maintenance
routines over Gmail, Google Drive docs, Google Chat, Slack, local meeting
transcripts, and Google Tasks. Capture routines can distill each match with an
LLM and sink the result into one or both of:
- a markdown note in an Obsidian vault (documents), and/or
- a personal-memory entry
(a local RAG memory store), written through the store's own CLI so source-id
dedup, index sync and versioning all apply. Model output is validated before
it touches the store: entry types against the store's enum, person slugs
against the store's known-slug list (unknown ones are dropped, never minted),
and every entry is tagged
auto-captured for later review.
Gmail matches can additionally be triaged (label / mark read / unstar / archive).
Maintenance routines perform deterministic work such as Slack conversation
discovery and bidirectional Google Tasks synchronization without an extraction
LLM.
Adding a new routine is a drop-in YAML file, never a code change. A routine
may own one source, combine several transports under one domain prompt, or keep
one scheduler per medium while deterministic source queries select specialized
handlers inside it.
source (gws / Slack / local files) ──▶ LLM (yoetz) ──▶ vault note and/or memory
──▶ ledger and triage
See routines/_example-slack-to-memory.yaml for the Slack→memory shape.
Operating model
The daemon now favors one general owner per communication medium, with
deterministic routing for known source shapes, instead of a growing collection
of overlapping domain routines:
| Plane | Responsibility |
|---|
| General capture | Gmail, Google Chat, and Slack sweeps cover incoming and outgoing work and apply each connector's general memory-worthiness prompt. |
| Deterministic capture | Exact sender/subject rules claim known Gmail traffic such as recurring reports and meeting notes before the general prompt. |
| Specialized capture | Guarded local-transcription ingestion handles material that cannot be discovered reliably through a communication connector. |
| Maintenance | Slack conversation discovery and Google Tasks synchronization run without an extraction LLM. |
The exact production routine files, source identifiers, addresses, labels,
filesystem paths, and connector prompt overrides are intentionally private and
gitignored. The examples in this repository document the schema; the local
routines/*.yaml files are the authority for an installed daemon. Never copy
private scope into an issue, pull request, README example, test fixture, or log
excerpt intended for publication.
For the architectural history, incidents that shaped the invariants, and the
handoff checklist for future agents, read REFLECTION.md.
Where the extraction prompt lives
A routine's analyze.instruction can be written inline, or sourced from the
memory store's connector file:
analyze:
instruction_from_connector: slack # <store>/memory/connectors/slack.md,
# falling back to <store>/connectors/slack.md
connector_sweep: true # only on the routine that owns the
# configured connector-wide sweep
instruction_extra: >- # optional, appended to it
Stream-specific guidance for this routine.
The connector body is the extraction prompt ("what is memory-worthy in
Slack"), and personal-memory's web UI edits exactly that file — so prompt
tuning is a browser edit that the next run picks up, with no config change, and
interactive agent sessions reading the same connector apply identical judgment.
The connector's fetch: frontmatter belongs to personal-memory's interactive
pull workflow; memory-daemon does not use it for source enumeration. The
routine's source:/sources: block is authoritative for daemon coverage.
instruction_from_connector selects a prompt; it does not by itself claim
source-wide coverage. Set connector_sweep: true only on the routine that owns
the configured connector-wide sweep. After every enabled routine scope for that
source has completed successfully—even when every candidate was already seen or
rejected as noise—the daemon advances memory connectors mark-pulled to the
oldest successful scope checkpoint. A non-due owner therefore holds the safe
watermark instead of creating a silent gap. Partial and inline specialized
routines do not advance connector health on their own. Connector coverage
sources use max_results: 0; a bounded source or a reported upstream service
cap holds the watermark until complete coverage succeeds. Gmail, Slack, and Google Chat
sweep publishers also require catch_up: true; Google Chat requires
max_per_space: 0.