POST /api/mission-control/tasks/{task_id}/run Bearer

Run Mission Control Task

Execute a Mission Control task with a specified AI agent in the background. The agent receives the task description, project context, and upstream deliverables. Output streams via WebSocket events.

Overview

Starts background execution of a task with a specified agent. The agent receives the task description, project context, and upstream deliverables as its prompt. Output streams via WebSocket events (mc_task_output).

Up to 5 tasks can run concurrently.

Path Parameters

task_id string

The task ID to execute.

Request Body

agent_id string

The agent ID to execute the task. Must be a valid UUID.

Response

success boolean

Whether the task was launched.

message string

Status message.

Terminal window
curl -X POST http://localhost:8000/api/mission-control/tasks/TASK_ID/run \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_id": "AGENT_UUID"}'
{
"success": true,
"message": "Task execution started"
}
{
"detail": "Maximum concurrent tasks (5) reached"
}
Request
curl -X POST "http://localhost:8000/api/mission-control/tasks/{task_id}/run" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>"
const response = await fetch("http://localhost:8000/api/mission-control/tasks/{task_id}/run", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
},
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    "http://localhost:8000/api/mission-control/tasks/{task_id}/run",
    headers={'Content-Type':'application/json','Authorization':'Bearer <token>'},
)

print(response.json())
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {
    req, _ := http.NewRequest("POST", "http://localhost:8000/api/mission-control/tasks/{task_id}/run", nil)
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer <token>")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
Response
Send a request to see the response