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

# Send Message

> [DEPRECATED] Send a message to an Agno Agent, Team, or Workflow. The Agent, Team or Workflow is identified via the 'agentId' field in params.message or X-Agent-ID header. Optional: Pass user ID via X-User-ID header (recommended) or 'userId' in params.message.metadata.



## OpenAPI

````yaml /reference-api/openapi.yaml post /a2a/message/send
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.7.4
servers: []
security: []
paths:
  /a2a/message/send:
    post:
      tags:
        - A2A
      summary: Send Message
      description: >-
        [DEPRECATED] Send a message to an Agno Agent, Team, or Workflow. The
        Agent, Team or Workflow is identified via the 'agentId' field in
        params.message or X-Agent-ID header. Optional: Pass user ID via
        X-User-ID header (recommended) or 'userId' in params.message.metadata.
      operationId: send_message
      parameters:
        - name: X-Agent-ID
          in: header
          required: false
          schema:
            type: string
          description: >-
            Target agent, team, or workflow ID when `params.message.agentId` is
            omitted.
        - name: X-User-ID
          in: header
          required: false
          schema:
            type: string
          description: >-
            Optional user ID for anonymous attribution. Authenticated requests
            use the identity from the credential.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageRequest'
      responses:
        '200':
          description: Message sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendMessageSuccessResponse'
              example:
                id: request-123
                jsonrpc: '2.0'
                result:
                  contextId: context-789
                  id: task-456
                  kind: task
                  status:
                    state: completed
        '400':
          description: Invalid request or unsupported method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Agent, team, or workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
      deprecated: true
      security:
        - {}
        - HTTPBearer: []
components:
  schemas:
    SendMessageRequest:
      description: Represents a JSON-RPC request for the `message/send` method.
      properties:
        id:
          anyOf:
            - type: string
            - type: integer
          title: Id
        jsonrpc:
          const: '2.0'
          default: '2.0'
          title: Jsonrpc
          type: string
        method:
          const: message/send
          default: message/send
          title: Method
          type: string
        params:
          $ref: '#/components/schemas/A2ARequest_MessageSendParams'
      required:
        - id
        - params
      title: SendMessageRequest
      type: object
    SendMessageSuccessResponse:
      properties:
        id:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Id
        jsonrpc:
          const: '2.0'
          default: '2.0'
          title: Jsonrpc
          type: string
        result:
          anyOf:
            - $ref: '#/components/schemas/Task'
            - $ref: '#/components/schemas/Message'
          title: Result
      type: object
      required:
        - result
      title: SendMessageSuccessResponse
      description: Represents a successful JSON-RPC response for the `message/send` method.
    BadRequestResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: BadRequestResponse
      example:
        detail: Bad request
        error_code: BAD_REQUEST
    UnauthenticatedResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: UnauthenticatedResponse
      example:
        detail: Unauthenticated access
        error_code: UNAUTHENTICATED
    ForbiddenResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
      type: object
      required:
        - detail
      title: ForbiddenResponse
      example:
        detail: Insufficient permissions
    NotFoundResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: NotFoundResponse
      example:
        detail: Not found
        error_code: NOT_FOUND
    A2ARequest_MessageSendParams:
      description: >-
        Defines the parameters for a request to send a message to an agent. This
        can be used

        to create a new task, continue an existing one, or restart a task.
      properties:
        configuration:
          anyOf:
            - $ref: '#/components/schemas/A2ARequest_MessageSendConfiguration'
            - type: 'null'
          default: null
        message:
          $ref: '#/components/schemas/A2ARequest_Message'
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Metadata
      required:
        - message
      title: MessageSendParams
      type: object
    Task:
      properties:
        artifacts:
          anyOf:
            - items:
                $ref: '#/components/schemas/Artifact'
              type: array
            - type: 'null'
          title: Artifacts
        contextId:
          type: string
          title: Contextid
        history:
          anyOf:
            - items:
                $ref: '#/components/schemas/Message'
              type: array
            - type: 'null'
          title: History
        id:
          title: Id
          type: string
        kind:
          type: string
          const: task
          title: Kind
          default: task
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        status:
          $ref: '#/components/schemas/TaskStatus'
      type: object
      required:
        - contextId
        - id
        - status
      title: Task
      description: >-
        Represents a single, stateful operation or conversation between a client
        and an agent.
    Message:
      properties:
        contextId:
          anyOf:
            - type: string
            - type: 'null'
          title: Contextid
        extensions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Extensions
        kind:
          const: message
          default: message
          title: Kind
          type: string
        messageId:
          title: Messageid
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        parts:
          items:
            $ref: '#/components/schemas/Part'
          type: array
          title: Parts
        referenceTaskIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Referencetaskids
        role:
          $ref: '#/components/schemas/Role'
        taskId:
          anyOf:
            - type: string
            - type: 'null'
          title: Taskid
      type: object
      required:
        - messageId
        - parts
        - role
      title: Message
      description: >-
        Represents a single message in the conversation between a user and an
        agent.
    A2ARequest_MessageSendConfiguration:
      description: >-
        Defines configuration options for a `message/send` or `message/stream`
        request.
      properties:
        acceptedOutputModes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Acceptedoutputmodes
        blocking:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Blocking
        historyLength:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Historylength
        pushNotificationConfig:
          anyOf:
            - $ref: '#/components/schemas/A2ARequest_PushNotificationConfig'
            - type: 'null'
          default: null
      title: MessageSendConfiguration
      type: object
    A2ARequest_Message:
      description: >-
        Represents a single message in the conversation between a user and an
        agent.
      properties:
        contextId:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Contextid
        extensions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Extensions
        kind:
          const: message
          default: message
          title: Kind
          type: string
        messageId:
          title: Messageid
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Metadata
        parts:
          items:
            $ref: '#/components/schemas/A2ARequest_Part'
          title: Parts
          type: array
        referenceTaskIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          title: Referencetaskids
        role:
          $ref: '#/components/schemas/A2ARequest_Role'
        taskId:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Taskid
        agentId:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Agent ID
          description: >-
            Target agent, team, or workflow ID for deprecated dynamic-dispatch
            endpoints.
      required:
        - messageId
        - parts
        - role
      title: Message
      type: object
    Artifact:
      properties:
        artifactId:
          type: string
          title: Artifactid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        extensions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Extensions
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        parts:
          items:
            $ref: '#/components/schemas/Part'
          type: array
          title: Parts
      type: object
      required:
        - artifactId
        - parts
      title: Artifact
      description: >-
        Represents a file, data structure, or other resource generated by an
        agent during a task.
    TaskStatus:
      properties:
        message:
          anyOf:
            - $ref: '#/components/schemas/Message'
            - type: 'null'
        state:
          $ref: '#/components/schemas/TaskState'
        timestamp:
          anyOf:
            - type: string
            - type: 'null'
          title: Timestamp
          examples:
            - '2023-10-27T10:00:00Z'
      type: object
      required:
        - state
      title: TaskStatus
      description: Represents the status of a task at a specific point in time.
    Part:
      anyOf:
        - $ref: '#/components/schemas/TextPart'
        - $ref: '#/components/schemas/FilePart'
        - $ref: '#/components/schemas/DataPart'
      title: Part
    Role:
      type: string
      enum:
        - agent
        - user
      title: Role
      description: >-
        Identifies the sender of the message. `user` for the client, `agent` for
        the service.
    A2ARequest_PushNotificationConfig:
      description: >-
        Defines the configuration for setting up push notifications for task
        updates.
      properties:
        authentication:
          anyOf:
            - $ref: >-
                #/components/schemas/A2ARequest_PushNotificationAuthenticationInfo
            - type: 'null'
          default: null
        id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Id
        token:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Token
        url:
          title: Url
          type: string
      required:
        - url
      title: PushNotificationConfig
      type: object
    A2ARequest_Part:
      anyOf:
        - $ref: '#/components/schemas/A2ARequest_TextPart'
        - $ref: '#/components/schemas/A2ARequest_FilePart'
        - $ref: '#/components/schemas/A2ARequest_DataPart'
      title: Part
    A2ARequest_Role:
      type: string
      enum:
        - agent
        - user
      title: Role
      description: >-
        Identifies the sender of the message. `user` for the client, `agent` for
        the service.
    TaskState:
      type: string
      enum:
        - submitted
        - working
        - input-required
        - completed
        - canceled
        - failed
        - rejected
        - auth-required
        - unknown
      title: TaskState
      description: Defines the lifecycle states of a Task.
    TextPart:
      properties:
        kind:
          const: text
          default: text
          title: Kind
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        text:
          title: Text
          type: string
      type: object
      required:
        - text
      title: TextPart
      description: Represents a text segment within a message or artifact.
    FilePart:
      properties:
        file:
          anyOf:
            - $ref: '#/components/schemas/FileWithBytes'
            - $ref: '#/components/schemas/FileWithUri'
          title: File
        kind:
          const: file
          default: file
          title: Kind
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - file
      title: FilePart
      description: >-
        Represents a file segment within a message or artifact. The file content
        can be

        provided either directly as bytes or as a URI.
    DataPart:
      properties:
        data:
          additionalProperties: true
          title: Data
          type: object
        kind:
          const: data
          default: data
          title: Kind
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - data
      title: DataPart
      description: >-
        Represents a structured data segment (e.g., JSON) within a message or
        artifact.
    A2ARequest_PushNotificationAuthenticationInfo:
      description: Defines authentication details for a push notification endpoint.
      properties:
        credentials:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Credentials
        schemes:
          items:
            type: string
          title: Schemes
          type: array
      required:
        - schemes
      title: PushNotificationAuthenticationInfo
      type: object
    A2ARequest_TextPart:
      description: Represents a text segment within a message or artifact.
      properties:
        kind:
          const: text
          default: text
          title: Kind
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Metadata
        text:
          title: Text
          type: string
      required:
        - text
      title: TextPart
      type: object
    A2ARequest_FilePart:
      description: >-
        Represents a file segment within a message or artifact. The file content
        can be

        provided either directly as bytes or as a URI.
      properties:
        file:
          anyOf:
            - $ref: '#/components/schemas/A2ARequest_FileWithBytes'
            - $ref: '#/components/schemas/A2ARequest_FileWithUri'
          title: File
        kind:
          const: file
          default: file
          title: Kind
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Metadata
      required:
        - file
      title: FilePart
      type: object
    A2ARequest_DataPart:
      description: >-
        Represents a structured data segment (e.g., JSON) within a message or
        artifact.
      properties:
        data:
          additionalProperties: true
          title: Data
          type: object
        kind:
          const: data
          default: data
          title: Kind
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Metadata
      required:
        - data
      title: DataPart
      type: object
    FileWithBytes:
      properties:
        bytes:
          title: Bytes
          type: string
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      type: object
      required:
        - bytes
      title: FileWithBytes
      description: >-
        Represents a file with its content provided directly as a base64-encoded
        string.
    FileWithUri:
      properties:
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          title: Mimetype
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        uri:
          title: Uri
          type: string
      type: object
      required:
        - uri
      title: FileWithUri
      description: Represents a file with its content located at a specific URI.
    A2ARequest_FileWithBytes:
      description: >-
        Represents a file with its content provided directly as a base64-encoded
        string.
      properties:
        bytes:
          title: Bytes
          type: string
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Mimetype
        name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Name
      required:
        - bytes
      title: FileWithBytes
      type: object
    A2ARequest_FileWithUri:
      description: Represents a file with its content located at a specific URI.
      properties:
        mimeType:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Mimetype
        name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Name
        uri:
          title: Uri
          type: string
      required:
        - uri
      title: FileWithUri
      type: object
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````