Skip to content

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.

TaskDefault intervalPurpose
expire_short_term5 minutesArchives short-term memories past their ttl
apply_importance_decaydailyLong-term memories lose ~0.5%/day importance (flashbulb memories exempt)
active_forgettingdailyDecays each memory’s health; hard-deletes at 0 (flashbulb memories exempt)
consolidate_similarweeklyConsolidates similar memories
cleanup_archivedmonthlyRemoves archived memories
discover_connectionshourlyBackground connection auto-discovery sweep

Defaults come from the [tasks] section of remem-server.toml — see Configuration.

GET /tasks

Status of all registered tasks plus discovery-queue metrics.

Terminal window
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
}
POST /tasks/{name}/run

Runs the named task immediately, outside its normal schedule. Runs in the background.

Terminal window
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.

GET /tasks/{name}/history

Recent run log for a task.

Terminal window
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" }
]
}
POST /tasks/{name}/pause
POST /tasks/{name}/resume

Pauses or resumes a task’s scheduled runs (manual .../run still works while paused).

Terminal window
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 }

Task status is separate from liveness — see Observability for GET /api/v1/health, GET /api/v1/ready, and GET /api/v1/health/deep.