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

# Execute Agent by Name

> Execute an agent using its unique name



## OpenAPI

````yaml POST /agent/executor/{name}
openapi: 3.0.1
info:
  title: Machina Sports SDK
  description: >-
    Machina Sports API for seamless AI integration in sports, offering real-time
    insights, personalized content, and fan sentiment analysis.
  version: '1.0'
  termsOfService: http://machina.gg/tos/
  contact:
    email: support@machina.gg
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://{api-address}.org.machina.gg
    description: Production server
    variables:
      api-address:
        default: https://api.machina.gg
        description: Your api-address
  - url: http://local.machina:5001
    description: Local development server
security:
  - ApiToken: []
paths:
  /agent/executor/{name}:
    post:
      tags:
        - agents
      summary: Execute Agent by Name
      description: Execute an agent using its unique name
      operationId: executeAgentByName
      parameters:
        - name: name
          in: path
          required: true
          description: Unique name of the agent to execute
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent-config:
                  type: object
                  properties:
                    delay:
                      type: boolean
                      description: Whether to execute the agent asynchronously
                      default: true
                  description: Configuration options for the execution
                input:
                  type: object
                  description: Input parameters for the agent execution
                context:
                  type: object
                  description: Additional context data for the agent execution
      responses:
        '200':
          description: Agent execution result or status
          content:
            application/json:
              schema:
                type: object
                properties:
                  execution_id:
                    type: string
                    description: Unique identifier for the execution
                    example: 67db5c012ae92018b93310a4
                  status:
                    type: string
                    description: Status of the execution
                    enum:
                      - scheduled
                      - completed
                      - failed
                    example: scheduled
                  message:
                    type: string
                    description: Informational message about the execution
                    example: Agent execution scheduled successfully
                  result:
                    type: object
                    description: The result of the agent execution (if immediate)
        '400':
          description: Invalid input parameters
        '401':
          description: Unauthorized
        '404':
          description: Agent not found
components:
  securitySchemes:
    ApiToken:
      type: apiKey
      name: x-api-token
      in: header
      description: API key authentication

````