---
title: "Get Agent Tasks"
method: GET
path: "/v1/agents/{agent_id}/tasks"
tags: ["API v1", "Agents", "Tasks CRUD"]
---

# Get Agent Tasks

`GET /v1/agents/{agent_id}/tasks`

## Request

- Base URL: `https://api.xpander.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xpander.ai/v1/agents/{agent_id}/tasks`
- Auth: API key in header `x-api-key`

Retrieve paginated list of task executions for a specific agent with optional filters

## Path parameters

- `agent_id` string, required

## Query parameters

- `page` integer: Page number (starting from 1)
- `per_page` integer: Items per page (max 50)
- `user_id` string: Filter by user ID
- `parent_task_id` string: Filter by parent task ID
- `triggering_agent_id` string: Filter by triggering agent ID (parent calling agent)
- `status` 'pending' | 'executing' | 'paused' | 'error' | 'failed' | 'completed' | 'stopped'
- `internal_status` string: Filter by internal task status
- `archived` 'true' | 'false' | 'any', nullable: Archived rows: false (default) hides them, true lists only them, any lists both

## Response `200`

Successful Response

- PaginatedResponseTasksListItem
  - `items` TasksListItem[], required
    - `id` string, required: Unique identifier for this execution
    - `agent_id` string, required: ID of the agent being executed
    - `user_id` string, nullable: ID of the user that created the task
    - `parent_task_id` string, nullable: ID of the parent task that triggered this task
    - `triggering_agent_id` string, nullable: ID of the triggering agen that triggered this task
    - `organization_id` string, required: ID of the organization that owns the agent
    - `status` 'pending' | 'executing' | 'paused' | 'error' | 'failed' | 'completed' | 'stopped', required: Enumeration of possible execution statuses for an agent task. Values: Pending: Task is pending execution. Executing: Task is currently executing. Paused: Task execution is paused. Error: Task encountered an error during execution. Failed: Task execution failed to complete successfully. Completed: Task execution completed successfully. Stopped: Task execution was stopped by the user. Example: >>> status = AgentExecutionStatus.Executing >>> print(status.value) # "executing"
    - `created_at` string, date-time, nullable: Timestamp when the execution was created
    - `updated_at` string, date-time, nullable: Timestamp of the last update to this execution
    - `source_node_type` string, nullable: Type of the source node that triggered this execution (if any)
    - `result` string, nullable: Final result of the execution, if available
    - `title` string, nullable: Task title
    - `execution_kind` string, nullable: 'resident' for a harness process that stays in progress until the agent finishes it; None for a plain turn
    - `process` object, nullable: Read model of a resident process (state, stop_reason, frozen, segment, wake, last_update, attempt); None for a plain turn
    - `conversation_kind` 'direct' | 'gateway', nullable: On a conversation head: 'direct' (one task per message on the agent) or 'gateway' (router-era); None on a turn row
    - `archived_at` string, date-time, nullable
    - `archived_by` string, nullable
    - `is_gateway` boolean, nullable
  - `total` integer, required
  - `page` integer, required
  - `per_page` integer, required
  - `total_pages` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xpander/apis/xpander-ai-api-service.md) - [All operations](https://skmtc.dev/xpander/apis/xpander-ai-api-service/llms.txt) - [OpenAPI document](https://skmtc.dev/xpander/apis/xpander-ai-api-service/revisions/725c0066d5df?raw)
