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

# Preview Agent Draft

> Send a message to the draft. Pass the returned thread_id to continue the conversation.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/agents/{agent_id}/draft/preview
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/agents/{agent_id}/draft/preview:
    post:
      tags:
        - Agents
      summary: Preview Agent Draft
      description: >-
        Send a message to the draft. Pass the returned thread_id to continue the
        conversation.
      operationId: core_api_v1_controllers_agents_preview_agent_draft
      parameters:
        - in: path
          name: agent_id
          schema:
            title: Agent Id
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentDraftPreviewIn'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDraftPreviewOut'
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    AgentDraftPreviewIn:
      properties:
        question:
          maxLength: 16000
          minLength: 1
          title: Question
          type: string
        thread_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Thread Id
        version:
          anyOf:
            - minimum: 0
              type: integer
            - type: 'null'
          title: Version
        retry:
          default: false
          title: Retry
          type: boolean
      required:
        - question
      title: AgentDraftPreviewIn
      type: object
    AgentDraftPreviewOut:
      properties:
        object:
          const: agent_draft_preview
          default: agent_draft_preview
          title: Object
          type: string
        outcome:
          enum:
            - completed
            - empty
            - tool_only
            - failed
            - incomplete
            - needs_input
          title: Outcome
          type: string
        response:
          anyOf:
            - type: string
            - type: 'null'
          title: Response
        tool_calls:
          default: []
          items:
            additionalProperties: true
            type: object
          title: Tool Calls
          type: array
        execution_time_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Execution Time Ms
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Thread Id
        documents:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Documents
      required:
        - outcome
      title: AgentDraftPreviewOut
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.