> ## 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 DELETE /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
    delete:
      tags:
        - Agent
      summary: 取消智能体任务
      operationId: cancelAgent
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  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: 未找到代理任务
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: Agent already finished
                    type: string
                type: object
          description: 冲突 — 代理任务已完成或已被取消。
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````