Expand description
Background task manager for long-horizon async runs
Supports assign-and-walk-away execution with persistence across restarts. Tasks are serialized to JSON in a configurable directory and can be resumed on process restart.
§Architecture
BackgroundTaskManager— owns the task store and manages lifecycleBackgroundTask— a single task with status, prompt, and resultTaskStatus— pending → running → completed / failed- Tasks are persisted as individual JSON files in
tasks/directory
§Usage
ⓘ
let mut manager = BackgroundTaskManager::new("/tmp/ravenclaws-tasks")?;
let task_id = manager.submit("Analyze this data", llm_client).await?;
let status = manager.status(&task_id)?;Structs§
- Background
Task - A single background task with full lifecycle tracking
- Background
Task Manager - Manager for background tasks with disk persistence
Enums§
- Task
Status - Status of a background task