Skip to content

Background Jobs

Remem 0.5 uses durable background jobs for lifecycle maintenance, relationship discovery, and index repair. Jobs survive a restart, use leases to avoid duplicate work, and retain run history for operators.

JobPurpose
lifecycle.reapApply retention, decay, recall, and archival policies
discovery.similarityFind and connect related memories after writes
vector.rebuildRepair or rebuild vector indexes
text.rebuildRepair or rebuild keyword indexes
graph.verifyCheck graph consistency and report repairs

Configure worker count, lease duration, retries, and retention in the [jobs] section of remem.toml. Lifecycle cadence and budgets are configured under [lifecycle]; relationship discovery is configured under [discovery].

Keep the job worker pool enabled for production. If a process stops while a job is running, its lease expires and another worker can safely retry it. A graceful shutdown drains active handlers; a forced restart leaves the durable job for recovery.

Use remem-admin for operator-driven rebuilds and verification. The HTTP admin surface can be used to inspect job status and history when the server is running.