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

# Launch Agent

> Launches directed security work with a natural-language instruction against the specified target.



## OpenAPI

````yaml /openapi.json post /v1/tasks/run
openapi: 3.1.0
info:
  title: MindFort API
  version: 1.0.0
  description: >-
    The MindFort Public API allows you to programmatically trigger assessments
    and Agent runs, browse targets and findings, and manage finding status.
    Authenticate using a Bearer API key generated from the MindFort dashboard.
servers:
  - url: https://api.mindfort.app
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/tasks/run:
    post:
      tags:
        - Agents
      summary: Launch Agent
      description: >-
        Launches directed security work with a natural-language instruction
        against the specified target.
      operationId: startNewTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartTaskRequest'
      responses:
        '200':
          description: Agent run launched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '201':
          description: Agent run launched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '202':
          description: Agent run accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized – missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Target not found or does not belong to this organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Request could not be completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Request could not be completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    StartTaskRequest:
      type: object
      required:
        - message
        - target_id
      properties:
        message:
          type: string
          description: Natural-language instruction describing the security work to perform
        target_id:
          type: string
          format: uuid
          description: UUID of the target for the Agent run
        target_credential_id:
          type: string
          format: uuid
          description: UUID of stored credentials to use for authenticated testing
        task_model:
          type: string
          enum:
            - MF1_FAST
            - MF1_SMART
          default: MF1_FAST
          description: >-
            Agent mode. `MF1_FAST` is optimized for speed, while `MF1_SMART` is
            optimized for depth.
    TaskResponse:
      type: object
      properties:
        task_id:
          type: string
          description: Opaque task ID returned for the Agent run
        status:
          type: string
          description: Current status of the Agent run
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
        request_id:
          type: string
          description: Unique request identifier for debugging
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key generated from the MindFort dashboard. Pass as `Authorization:
        Bearer <your-api-key>`.

````