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

# Run Agent



## OpenAPI

````yaml post /agui
openapi: 3.1.0
info:
  title: Agno API Reference
  description: The all-in-one, private, secure agent platform that runs in your cloud.
  version: 2.5.6
servers: []
security: []
paths:
  /agui:
    post:
      tags:
        - AGUI
      summary: Run Agent
      operationId: run_agent_agui_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunAgentInput'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RunAgentInput:
      properties:
        threadId:
          type: string
          title: Threadid
        runId:
          type: string
          title: Runid
        parentRunId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentrunid
        state:
          title: State
        messages:
          items:
            oneOf:
              - $ref: '#/components/schemas/DeveloperMessage'
              - $ref: '#/components/schemas/SystemMessage'
              - $ref: '#/components/schemas/AssistantMessage'
              - $ref: '#/components/schemas/UserMessage'
              - $ref: '#/components/schemas/ToolMessage'
              - $ref: '#/components/schemas/ActivityMessage'
              - $ref: '#/components/schemas/ReasoningMessage'
            discriminator:
              propertyName: role
              mapping:
                activity:
                  $ref: '#/components/schemas/ActivityMessage'
                assistant:
                  $ref: '#/components/schemas/AssistantMessage'
                developer:
                  $ref: '#/components/schemas/DeveloperMessage'
                reasoning:
                  $ref: '#/components/schemas/ReasoningMessage'
                system:
                  $ref: '#/components/schemas/SystemMessage'
                tool:
                  $ref: '#/components/schemas/ToolMessage'
                user:
                  $ref: '#/components/schemas/UserMessage'
          type: array
          title: Messages
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          title: Tools
        context:
          items:
            $ref: '#/components/schemas/Context'
          type: array
          title: Context
        forwardedProps:
          title: Forwardedprops
      additionalProperties: true
      type: object
      required:
        - threadId
        - runId
        - state
        - messages
        - tools
        - context
        - forwardedProps
      title: RunAgentInput
      description: Input for running an agent.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DeveloperMessage:
      properties:
        id:
          type: string
          title: Id
        role:
          type: string
          const: developer
          title: Role
          default: developer
        content:
          type: string
          title: Content
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        encryptedValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Encryptedvalue
      additionalProperties: true
      type: object
      required:
        - id
        - content
      title: DeveloperMessage
      description: A developer message.
    SystemMessage:
      properties:
        id:
          type: string
          title: Id
        role:
          type: string
          const: system
          title: Role
          default: system
        content:
          type: string
          title: Content
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        encryptedValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Encryptedvalue
      additionalProperties: true
      type: object
      required:
        - id
        - content
      title: SystemMessage
      description: A system message.
    AssistantMessage:
      properties:
        id:
          type: string
          title: Id
        role:
          type: string
          const: assistant
          title: Role
          default: assistant
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        encryptedValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Encryptedvalue
        toolCalls:
          anyOf:
            - items:
                $ref: '#/components/schemas/ToolCall'
              type: array
            - type: 'null'
          title: Toolcalls
      additionalProperties: true
      type: object
      required:
        - id
      title: AssistantMessage
      description: An assistant message.
    UserMessage:
      properties:
        id:
          type: string
          title: Id
        role:
          type: string
          const: user
          title: Role
          default: user
        content:
          anyOf:
            - type: string
            - items:
                oneOf:
                  - $ref: '#/components/schemas/TextInputContent'
                  - $ref: '#/components/schemas/BinaryInputContent'
                discriminator:
                  propertyName: type
                  mapping:
                    binary:
                      $ref: '#/components/schemas/BinaryInputContent'
                    text:
                      $ref: '#/components/schemas/TextInputContent'
              type: array
          title: Content
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        encryptedValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Encryptedvalue
      additionalProperties: true
      type: object
      required:
        - id
        - content
      title: UserMessage
      description: A user message supporting text or multimodal content.
    ToolMessage:
      properties:
        id:
          type: string
          title: Id
        role:
          type: string
          const: tool
          title: Role
          default: tool
        content:
          type: string
          title: Content
        toolCallId:
          type: string
          title: Toolcallid
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        encryptedValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Encryptedvalue
      additionalProperties: true
      type: object
      required:
        - id
        - content
        - toolCallId
      title: ToolMessage
      description: A tool result message.
    ActivityMessage:
      properties:
        id:
          type: string
          title: Id
        role:
          type: string
          const: activity
          title: Role
          default: activity
        activityType:
          type: string
          title: Activitytype
        content:
          additionalProperties: true
          type: object
          title: Content
      additionalProperties: true
      type: object
      required:
        - id
        - activityType
        - content
      title: ActivityMessage
      description: An activity progress message emitted between chat messages.
    ReasoningMessage:
      properties:
        id:
          type: string
          title: Id
        role:
          type: string
          const: reasoning
          title: Role
          default: reasoning
        content:
          type: string
          title: Content
        encryptedValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Encryptedvalue
      additionalProperties: true
      type: object
      required:
        - id
        - content
      title: ReasoningMessage
      description: A reasoning message containing the agent's internal reasoning process.
    Tool:
      properties:
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        parameters:
          title: Parameters
      additionalProperties: true
      type: object
      required:
        - name
        - description
        - parameters
      title: Tool
      description: A tool definition.
    Context:
      properties:
        description:
          type: string
          title: Description
        value:
          type: string
          title: Value
      additionalProperties: true
      type: object
      required:
        - description
        - value
      title: Context
      description: Additional context for the agent.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ToolCall:
      properties:
        id:
          type: string
          title: Id
        type:
          type: string
          const: function
          title: Type
          default: function
        function:
          $ref: '#/components/schemas/FunctionCall'
        encryptedValue:
          anyOf:
            - type: string
            - type: 'null'
          title: Encryptedvalue
      additionalProperties: true
      type: object
      required:
        - id
        - function
      title: ToolCall
      description: A tool call, modelled after OpenAI tool calls.
    TextInputContent:
      properties:
        type:
          type: string
          const: text
          title: Type
          default: text
        text:
          type: string
          title: Text
      additionalProperties: true
      type: object
      required:
        - text
      title: TextInputContent
      description: A text fragment in a multimodal user message.
    BinaryInputContent:
      properties:
        type:
          type: string
          const: binary
          title: Type
          default: binary
        mimeType:
          type: string
          title: Mimetype
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        data:
          anyOf:
            - type: string
            - type: 'null'
          title: Data
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
      additionalProperties: true
      type: object
      required:
        - mimeType
      title: BinaryInputContent
      description: A binary payload reference in a multimodal user message.
    FunctionCall:
      properties:
        name:
          type: string
          title: Name
        arguments:
          type: string
          title: Arguments
      additionalProperties: true
      type: object
      required:
        - name
        - arguments
      title: FunctionCall
      description: Name and arguments of a function call.

````