> ## Documentation Index
> Fetch the complete documentation index at: https://docs.miteos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tasks

> Submit tasks in natural language and let AI agents execute them end-to-end.

# Tasks

A task is a natural language instruction that Miteos decomposes and executes via one or more agents.

## Creating a Task

Submit a task via the War Room prompt bar or the API:

```bash theme={null}
POST /tasks
{
  "prompt": "Research the top 5 SaaS competitors to Notion and create a feature comparison spreadsheet",
  "workspace_id": "optional-workspace-id"
}
```

## Task Decomposition

Miteos automatically breaks complex tasks into subtasks:

```
"Research competitors and build a pricing dashboard"
├── Subtask 1: Research competitor pricing pages (researcher)
├── Subtask 2: Extract and structure pricing data (analyst)
└── Subtask 3: Build interactive dashboard component (builder)
```

Each subtask is assigned to the most appropriate agent type based on the required tools and capabilities.

## Task States

| State       | Description                               |
| ----------- | ----------------------------------------- |
| `pending`   | Task created, waiting to start            |
| `running`   | Agents actively working                   |
| `completed` | All subtasks finished successfully        |
| `failed`    | One or more subtasks failed unrecoverably |
| `cancelled` | User cancelled the task                   |

## Monitoring

Track task progress in real-time:

```bash theme={null}
GET /tasks/{task_id}
```

Returns:

```json theme={null}
{
  "id": "task-abc123",
  "prompt": "Research competitor pricing...",
  "status": "running",
  "total_tokens_used": 4521,
  "total_cost_cents": 2,
  "created_at": "2026-06-20T10:00:00Z",
  "subtasks": [
    {"id": "st-1", "agent_type": "researcher", "status": "complete"},
    {"id": "st-2", "agent_type": "analyst", "status": "running"},
    {"id": "st-3", "agent_type": "builder", "status": "pending"}
  ]
}
```

## Cancellation

Cancel a running task (kills all active agents):

```bash theme={null}
POST /tasks/{task_id}/cancel
```

## Deliverables

When a task completes, its outputs are available as deliverables:

```bash theme={null}
GET /tasks/{task_id}/deliverables
```

Each deliverable can be:

* Downloaded as a file
* Deployed to a staging URL
* Shared via a public link

## Task History

List all your tasks:

```bash theme={null}
GET /tasks?limit=20&offset=0
```

## Completed Tasks (for Skill Compiler)

Successfully completed tasks can be used to compile reusable skills:

```bash theme={null}
GET /tasks/completed
```

The Skill Compiler analyzes the action patterns from successful tasks and extracts them into named, reusable skills that execute faster on repeat.
