# Tasks API The Tasks API gives LLM agents a structured way to track multi-step work. Tasks are scoped to the current mind and persist across sessions, so the agent can resume work where it left off. ## Endpoints ### GET /mind/tasks List all tasks for the current mind. ```bash # All tasks curl -H "Authorization: Bearer YOUR_MIND_KEY" \ https://synapse.schaefer.zone/mind/tasks # Filter by status curl -H "Authorization: Bearer YOUR_MIND_KEY" \ "https://synapse.schaefer.zone/mind/tasks?status=pending" ``` Response: ```json { "tasks": [ { "id": "task_001", "title": "Deploy v1.5.0", "description": "Push to production after CI green", "priority": "high", "status": "in_progress", "due_at": "2026-06-28T...", "created_at": "2026-06-27T..." } ] } ``` ### POST /mind/task Create a new task. ```bash curl -X POST https://synapse.schaefer.zone/mind/task \ -H "Authorization: Bearer YOUR_MIND_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Update documentation", "description": "Add v1.5.0 changelog entries", "priority": "normal", "due_at": "2026-06-30T00:00:00Z" }' ``` ### GET /mind/task (query params) Create a task via GET (for URL-only tools). ```bash curl -H "Authorization: Bearer YOUR_MIND_KEY" \ "https://synapse.schaefer.zone/mind/task?title=Test+task&priority=high" ``` ### PUT /mind/task/:id Update an existing task. ```bash curl -X PUT https://synapse.schaefer.zone/mind/task/task_001 \ -H "Authorization: Bearer YOUR_MIND_KEY" \ -H "Content-Type: application/json" \ -d '{ "status": "in_progress", "description": "Currently deploying, CI is green" }' ``` ### GET /mind/task/:id/complete Mark a task as done. ```bash curl -H "Authorization: Bearer YOUR_MIND_KEY" \ https://synapse.schaefer.zone/mind/task/task_001/complete ``` ### GET /mind/task/:id/delete Delete a task permanently. ```bash curl -H "Authorization: Bearer YOUR_MIND_KEY" \ https://synapse.schaefer.zone/mind/task/task_001/delete ``` ## Priorities - `low` — non-urgent - `normal` — default - `high` — important - `critical` — must do immediately ## Statuses - `pending` — created, not started - `in_progress` — currently being worked on - `done` — completed - `cancelled` — abandoned ## Pattern: Task-Driven Workflow ```python # At session start tasks = list_tasks(status="in_progress") if tasks: print(f"Resuming: {tasks[0].title}") # Plan multi-step work for step in plan: task = create_task(title=step) # Update as you progress update_task(task.id, status="in_progress") # ... do work ... update_task(task.id, status="done") ``` ## Next Steps - [Task-Driven Workflow](/docs/llm-cookbook/task-driven-workflow) - [Cron & Scheduler](/docs/api/cron)