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

# 列出代理任务 (v1)

> 已废弃：请改用 [v2 get agent job](/api/agent/v2/get-agent-job)。检索指定 domain 的所有代理任务，包括其状态和详细信息。

<Warning>此端点已废弃。请改用 [v2 获取代理任务](/zh/api/agent/v2/get-agent-job) 端点。</Warning>

<div id="usage">
  ## 用法
</div>

该端点会检索指定 domain 的所有代理任务，概览所有代理活动及其当前状态。适用于监控和管理多个并发或历史代理任务。

<div id="response">
  ## 响应
</div>

使用此端点可获取所有历史代理会话的完整概览。


## OpenAPI

````yaml zh/admin-openapi.json GET /v1/agent/{projectId}/jobs
openapi: 3.0.1
info:
  title: Mintlify Admin API
  description: 用于管理操作的 API，包括文档更新和代理管理。
  version: 2.0.0
servers:
  - url: https://api.mintlify.com
security:
  - bearerAuth: []
paths:
  /v1/agent/{projectId}/jobs:
    get:
      summary: 获取所有代理任务（v1）
      description: >-
        已废弃：请改用 [v2 get agent job](/api/agent/v2/get-agent-job)。检索指定 domain
        的所有代理任务，包括其状态和详细信息。
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: >-
            你的项目 ID。可从你的控制台中的 [API
            keys](https://dashboard.mintlify.com/settings/organization/api-keys)
            页面复制。
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
          description: 用于分页的跳过结果数。
        - name: take
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 12
          description: 返回的结果数量。最大 100。
      responses:
        '200':
          description: 已成功检索所有代理任务
          content:
            application/json:
              schema:
                type: object
                properties:
                  allSessions:
                    type: array
                    description: 该 domain 的所有代理会话数组。
                    items:
                      type: object
                      properties:
                        sessionId:
                          type: string
                          description: 此会话所属的子域。
                        subdomain:
                          type: string
                          description: 此会话所属的子域。
                        branch:
                          type: string
                          description: 进行更改的 Git branch 名称。
                          nullable: true
                        haulted:
                          type: boolean
                          description: 会话执行是否已中止
                        haultReason:
                          type: string
                          enum:
                            - completed
                            - github_missconfigured
                            - error
                            - processing
                            - interrupted
                          description: >-
                            会话中止的原因。`processing` 表示任务仍在运行。`interrupted`
                            表示任务被手动中断。
                        pullRequestLink:
                          type: string
                          description: 已创建的拉取请求（PR；亦称“合并请求”/Merge Request）链接
                        messageToUser:
                          type: string
                          description: 向用户说明会话结果的消息。
                        todos:
                          type: array
                          description: 会话中的待办事项列表。
                          items:
                            type: object
                            properties:
                              content:
                                type: string
                                description: 任务的简要说明。
                              status:
                                type: string
                                enum:
                                  - pending
                                  - in_progress
                                  - completed
                                  - cancelled
                                description: 任务的当前状态。
                              priority:
                                type: string
                                enum:
                                  - high
                                  - medium
                                  - low
                                description: 任务的优先级。
                              id:
                                type: string
                                description: 待办事项的唯一标识符。
                        userId:
                          type: string
                          description: 创建此会话的用户 ID（如有）。
                        title:
                          type: string
                          description: 用于概括代理任务的生成标题
                        createdAt:
                          type: string
                          format: date-time
                          description: 会话创建时的时间戳。
      deprecated: true
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authorization 头部需要 Bearer 令牌。请使用以 `mint_` 为前缀的管理员 API
        密钥。这是服务端使用的机密凭证。你可以在控制台的 [API keys
        页面](https://dashboard.mintlify.com/settings/organization/api-keys)
        中生成一个。

````

## Related topics

- [简介](/docs/zh/api/introduction.md)
- [获取代理任务](/docs/zh/api/agent/v2/get-agent-job.md)
- [发送后续消息](/docs/zh/api/agent/v2/send-message.md)
