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

# 获取 Agent 状态

> 如果你是需要 Firecrawl API 密钥的 AI 代理，请参阅 [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) 获取自动化入门说明。


## OpenAPI

````yaml zh/api-reference/v2-openapi.json GET /agent/{jobId}
openapi: 3.0.0
info:
  contact:
    email: support@firecrawl.dev
    name: Firecrawl Support
    url: https://firecrawl.dev/support
  description: 用于与 Firecrawl 服务交互，执行网页抓取和爬取任务的 API。
  title: Firecrawl API
  version: v2
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /agent/{jobId}:
    parameters:
      - description: Agent 任务的 ID
        in: path
        name: jobId
        required: true
        schema:
          format: uuid
          type: string
    get:
      tags:
        - Agent
      summary: 获取智能体任务状态
      operationId: getAgentStatus
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  creditsUsed:
                    type: number
                  data:
                    description: 提取的数据（仅在状态为 completed 时可用）
                    type: object
                  effort:
                    description: 代理运行使用的推理预算（仅存在于设置了 effort 的运行中）
                    enum:
                      - low
                      - medium
                      - high
                    type: string
                  error:
                    description: 错误信息（仅当状态为失败时出现）
                    type: string
                  expiresAt:
                    format: date-time
                    type: string
                  model:
                    default: spark-2
                    description: 本次代理运行所使用的模型预设。每次新运行均在 spark-2 上执行；Spark 1 名称仅会出现在旧版运行中。
                    enum:
                      - spark-2
                      - spark-1-pro
                      - spark-1-mini
                    type: string
                  status:
                    enum:
                      - processing
                      - completed
                      - failed
                    type: string
                  success:
                    type: boolean
                type: object
          description: 成功的响应
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: Invalid job ID format. Job ID must be a valid UUID.
                    type: string
                type: object
          description: 请求错误 — 任务 ID 不是有效的 UUID。
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: Agent job not found
                    type: string
                type: object
          description: 未找到代理任务
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````