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

# Start Agent Run



## OpenAPI

````yaml /api-reference/openapi.json post /agent/conversations/{conversation_id}/runs
openapi: 3.1.0
info:
  title: Aspect Platform API
  description: A FastAPI application for Aspect Platform functionality
  version: 0.0.0
servers:
  - url: https://api.aspect.inc
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /agent/conversations/{conversation_id}/runs:
    post:
      tags:
        - Agent
      summary: Start Agent Run
      operationId: post_Agent_agent_conversations_conversation_id_runs
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Conversation Id
            description: Conversation ID
          description: Conversation ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRunCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentRunCreateRequest:
      properties:
        content:
          type: string
          title: Content
          description: User message text
        content_parts:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Content Parts
          description: Structured user message content
        page_context:
          anyOf:
            - $ref: '#/components/schemas/AgentPageContext'
            - type: 'null'
          description: Page context snapshot for the turn
        mentions:
          items:
            $ref: '#/components/schemas/AgentMention'
          type: array
          title: Mentions
          description: Structured mentions in the message
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: Optional model override
      type: object
      required:
        - content
      title: AgentRunCreateRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentPageContext:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: Current client URL
        workspace_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workspace Id
          description: Workspace visible in the current UI
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
          description: Project visible in the current UI
        current_resource:
          anyOf:
            - $ref: '#/components/schemas/AgentContextResource'
            - type: 'null'
          description: Primary resource visible in the current UI
        selection:
          anyOf:
            - $ref: '#/components/schemas/AgentSelectionContext'
            - type: 'null'
          description: Selection state at send time
        view:
          anyOf:
            - $ref: '#/components/schemas/AgentViewContext'
            - type: 'null'
          description: View state at send time
        intent:
          anyOf:
            - $ref: '#/components/schemas/AgentUserIntentContext'
            - type: 'null'
          description: User intent hints at send time
      type: object
      title: AgentPageContext
    AgentMention:
      properties:
        reference_type:
          $ref: '#/components/schemas/AgentMentionReferenceType'
          description: Mentioned reference type
        reference_id:
          type: string
          format: uuid
          title: Reference Id
          description: Mentioned reference ID
        display_label:
          type: string
          title: Display Label
          description: Label shown to the user for the mention
        workspace_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workspace Id
          description: Workspace scope for the mention
        project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Project Id
          description: Project scope for the mention
        resolution_status:
          $ref: '#/components/schemas/AgentMentionResolutionStatus'
          description: Resolution state for the mention
          default: unresolved
        start_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Start Index
          description: Start index of this mention in the message text
        end_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: End Index
          description: End index of this mention in the message text
      type: object
      required:
        - reference_type
        - reference_id
        - display_label
      title: AgentMention
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AgentContextResource:
      properties:
        resource_type:
          $ref: '#/components/schemas/AgentMentionReferenceType'
          description: Current resource type
        resource_id:
          type: string
          format: uuid
          title: Resource Id
          description: Current resource ID
      type: object
      required:
        - resource_type
        - resource_id
      title: AgentContextResource
    AgentSelectionContext:
      properties:
        asset_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Asset Ids
          description: Selected asset IDs
        directory_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Directory Ids
          description: Selected directory IDs
        collection_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Collection Ids
          description: Selected collection IDs
        entity_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Entity Ids
          description: Selected entity IDs
        timeline_ranges:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Timeline Ranges
          description: Selected timeline ranges
      type: object
      title: AgentSelectionContext
    AgentViewContext:
      properties:
        filters:
          additionalProperties: true
          type: object
          title: Filters
          description: Active filter state
        sort:
          additionalProperties: true
          type: object
          title: Sort
          description: Active sort state
        display_settings:
          additionalProperties: true
          type: object
          title: Display Settings
          description: Active display settings state
        search_query:
          anyOf:
            - type: string
            - type: 'null'
          title: Search Query
          description: Active search query
        active_tab:
          anyOf:
            - type: string
            - type: 'null'
          title: Active Tab
          description: Active tab or panel
        pagination:
          additionalProperties: true
          type: object
          title: Pagination
          description: Pagination or windowing state
      type: object
      title: AgentViewContext
    AgentUserIntentContext:
      properties:
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: UI entry point that opened the composer
        selected_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Selected Text
          description: Text selected by the user
        action_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Action Label
          description: User-facing action label that initiated the turn
        resource_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Resource Id
          description: Resource associated with the initiating action
      type: object
      title: AgentUserIntentContext
    AgentMentionReferenceType:
      type: string
      enum:
        - workspace
        - project
        - collection
        - directory
        - asset
        - entity
        - share_link
      title: AgentMentionReferenceType
    AgentMentionResolutionStatus:
      type: string
      enum:
        - unresolved
        - resolved
        - stale
        - unauthorized
        - type_mismatch
      title: AgentMentionResolutionStatus
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT in Authorization header. 'Bearer ' prefix optional.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````