Get Task

Retrieves a specific task and its details by task ID.

JSON-RPC Request

{
  "jsonrpc": "2.0",
  "method": "get_task",
  "params": {
    "task_id": "task-uuid-here",
    "history_length": 10
  },
  "id": "unique-request-id"
}

Parameters

  • task_id (string, required): The UUID of the task to retrieve
  • history_length (integer, optional): Number of historical messages to include

Response

{
  "jsonrpc": "2.0",
  "id": "unique-request-id",
  "result": {
    "task_id": "task-uuid-here",
    "status": "completed",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:05:00Z",
    "messages": [],
    "context_id": "context-uuid"
  }
}

Error Response

{
  "jsonrpc": "2.0",
  "id": "unique-request-id",
  "error": {
    "code": -32001,
    "message": "Task not found"
  }
}