Tasks API
Base URL: http://localhost:4545/api/v1
Lifecycle tasks run as Tokio tasks inside remem-server itself — there is no
separate worker process. All endpoints below require auth once REMEM_API_KEY is
set — see Authentication.
Task names
Section titled “Task names”| Task | Default interval | Purpose |
|---|---|---|
expire_short_term | 5 minutes | Archives short-term memories past their ttl |
apply_importance_decay | daily | Long-term memories lose ~0.5%/day importance (flashbulb memories exempt) |
active_forgetting | daily | Decays each memory’s health; hard-deletes at 0 (flashbulb memories exempt) |
consolidate_similar | weekly | Consolidates similar memories |
cleanup_archived | monthly | Removes archived memories |
discover_connections | hourly | Background connection auto-discovery sweep |
Defaults come from the [tasks] section of remem-server.toml — see
Configuration.
List task status
Section titled “List task status”GET /tasksStatus of all registered tasks plus discovery-queue metrics.
curl http://localhost:4545/api/v1/tasks \ -H "Authorization: Bearer $REMEM_API_KEY"Response: 200 OK
{ "tasks": [ { "name": "expire_short_term", "last_run": "2026-07-08T12:00:00Z", "paused": false } ], "uptime_ms": 86400000, "discovery_queue_depth": 0, "discovery_dropped": 0, "discovery_workers_alive": 2, "discovery_workers_total": 2, "discovery_worker_restarts": 0, "discovery_worker_last_panic": null}Trigger a task manually
Section titled “Trigger a task manually”POST /tasks/{name}/runRuns the named task immediately, outside its normal schedule. Runs in the background.
curl -X POST http://localhost:4545/api/v1/tasks/active_forgetting/run \ -H "Authorization: Bearer $REMEM_API_KEY"Response: 202 Accepted. 409 if the task is already running, 422 if name is
unknown.
Task run history
Section titled “Task run history”GET /tasks/{name}/historyRecent run log for a task.
curl http://localhost:4545/api/v1/tasks/discover_connections/history \ -H "Authorization: Bearer $REMEM_API_KEY"Response: 200 OK
{ "task": "discover_connections", "history": [ { "started_at": "2026-07-08T12:00:00Z", "finished_at": "2026-07-08T12:00:02Z", "status": "ok" } ]}Pause / resume a task
Section titled “Pause / resume a task”POST /tasks/{name}/pausePOST /tasks/{name}/resumePauses or resumes a task’s scheduled runs (manual .../run still works while
paused).
curl -X POST http://localhost:4545/api/v1/tasks/apply_importance_decay/pause \ -H "Authorization: Bearer $REMEM_API_KEY"Response: 200 OK
{ "task": "apply_importance_decay", "paused": true }Health check
Section titled “Health check”Task status is separate from liveness — see Observability for
GET /api/v1/health, GET /api/v1/ready, and GET /api/v1/health/deep.
