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

# A2A JSON-RPC binding

> The `JSONRPC` protocol binding for A2A v1.0. Accepts a single JSON-RPC 2.0
request whose `method` is one of `SendMessage`, `SendStreamingMessage`,
`GetTask`, `ListTasks`, `CancelTask`, or `SubscribeToTask`.

Streaming methods (`SendStreamingMessage`, `SubscribeToTask`) respond with
`text/event-stream`; all others respond with a single JSON-RPC response.




## OpenAPI

````yaml /agentic/auto-generated-openapi-v2.yml post /v2/agentic/agents/{agentId}/a2a
openapi: 3.1.0
info:
  title: Corti Agent API v2
  version: 2.0.0
  summary: Manage agents and converse with them over the A2A v1.0 protocol.
  description: >
    Version 2 of the Corti Agents REST API.


    ## What's new in v2


    - **Unified `connectors`** — a single, flat, discriminated array replaces
    the
      v1 split between `experts`, `mcpServers`, and sub-agents. The envelope is
      extensible: new connector kinds (`a2a`, `openapi`, `custom`) slot in behind
      the `type` discriminator without breaking changes.
    - **Clean CRUD verbs** — `POST` creates, `GET` fetches/lists, `PATCH`
    performs
      a *true* partial update, `DELETE` removes. v1's PATCH was effectively a PUT.
    - **First-class metadata** — `visibility`, `model`, `lifecycle` (now a body
      field, not a query param), and free-form `labels`.

    ## A2A v1.0 only


    The conversational surface speaks **A2A protocol version `1.0` exclusively**

    (both the `JSONRPC` and `HTTP+JSON` bindings). The deprecated v0.3 binding
    from

    v1 is intentionally not carried forward.


    Per A2A §3.6, clients MUST send the `A2A-Version` header (`Major.Minor`,
    e.g.

    `1.0`) on every request to the `/a2a/*` surface, or supply it as the

    `A2A-Version` query parameter. This surface implements `1.0` only; an absent

    header is treated as `1.0`. Patch versions MUST NOT be sent. The server
    echoes

    the negotiated version in the `A2A-Version` response header.


    ## Partial updates (PATCH)


    `PATCH` uses **JSON Merge Patch** semantics (RFC 7386), served under the

    `application/merge-patch+json` media type:


    - **Omit a field** → left unchanged.

    - **`null`** → cleared / reset to its default.

    - **Arrays** (e.g. `connectors`) → *replaced wholesale*, never merged.


    To mutate a single connector without replacing the whole array, use the

    `/connectors` sub-resource endpoints.


    ## Streaming (Server-Sent Events)


    The streaming A2A surfaces — `message/stream`, `tasks/subscribe`, and the

    streaming JSON-RPC methods — respond with `text/event-stream`. The

    `text/event-stream` media type carries a sequence of Server-Sent Events;

    the attached schema describes a single event frame. Every event's `data`

    field is a string carrying a JSON document (`contentMediaType:

    application/json`); `contentSchema` declares the parsed payload

    (`StreamResponse` for the `HTTP+JSON` binding, `JSONRPCResponse` for the

    `JSONRPC` binding). The optional `id` field carries the SSE event id used

    for resumption via the `Last-Event-ID` request header.
  contact:
    name: Corti API Support
    url: https://corti.ai
    email: support@corti.ai
  license:
    name: Proprietary
    url: https://corti.ai/terms
  termsOfService: https://corti.ai/terms
servers:
  - url: https://api.{env}.corti.app
    description: Corti regional API gateway
    variables:
      env:
        default: eu
        enum:
          - eu
          - us
        description: Deployment region.
security:
  - bearerAuth: []
    tenantHeader: []
tags:
  - name: Agents
    description: Create, read, update, and delete agents.
  - name: Agent Card
    description: A2A-compliant agent discovery cards.
  - name: A2A
    description: Converse with an agent over the A2A v1.0 protocol.
  - name: Connectors
    description: Manage the connectors attached to an agent.
  - name: Usage
    description: Bucketed invocation history for an agent.
  - name: Contexts
    description: Conversational contexts and their tasks.
  - name: Registry
    description: Discoverable, pre-built connectors offered by the platform.
  - name: Artifacts
    description: Retrieve artifacts produced by tasks.
  - name: Feedback
    description: Collect human or automated feedback on tasks and messages.
paths:
  /v2/agentic/agents/{agentId}/a2a:
    parameters:
      - $ref: '#/components/parameters/AgentId'
      - $ref: '#/components/parameters/A2AVersionHeader'
    post:
      tags:
        - A2A
      summary: A2A JSON-RPC binding
      description: >
        The `JSONRPC` protocol binding for A2A v1.0. Accepts a single JSON-RPC
        2.0

        request whose `method` is one of `SendMessage`, `SendStreamingMessage`,

        `GetTask`, `ListTasks`, `CancelTask`, or `SubscribeToTask`.


        Streaming methods (`SendStreamingMessage`, `SubscribeToTask`) respond
        with

        `text/event-stream`; all others respond with a single JSON-RPC response.
      operationId: A2AJsonRpc
      requestBody:
        required: true
        description: A single JSON-RPC 2.0 request envelope.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/A2AJSONRPCRequest'
            examples:
              messageSend:
                summary: SendMessage
                value:
                  jsonrpc: '2.0'
                  id: '1'
                  method: SendMessage
                  params:
                    message:
                      role: ROLE_USER
                      messageId: msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73
                      parts:
                        - text: Code this encounter.
      responses:
        '200':
          description: >
            A single JSON-RPC response (non-streaming methods), or an

            `text/event-stream` for the streaming methods
            (`SendStreamingMessage`,

            `SubscribeToTask`) where each event's `data` is a JSON-encoded

            `JSONRPCResponse`.
          headers:
            A2A-Version:
              $ref: '#/components/headers/A2AVersion'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/A2AJSONRPCResponse'
              example:
                jsonrpc: '2.0'
                id: msg-001
                result:
                  task:
                    id: task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62
                    contextId: ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51
                    status:
                      state: TASK_STATE_COMPLETED
            text/event-stream:
              schema:
                $ref: '#/components/schemas/A2AJSONRPCStreamEventResponse'
              example:
                event: message
                data: >-
                  {"jsonrpc":"2.0","id":"msg-001","result":{"task":{"id":"task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62","contextId":"ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51","status":{"state":"TASK_STATE_COMPLETED"}}}}
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    AgentId:
      name: agentId
      in: path
      required: true
      description: Agent identifier (prefixed UUIDv7).
      schema:
        $ref: '#/components/schemas/CommonAgentIDValue'
    A2AVersionHeader:
      name: A2A-Version
      in: header
      required: false
      description: >-
        A2A protocol version in `Major.Minor` form (A2A §3.6). Optional;
        defaults to `1.0` when absent. This surface implements `1.0` only. Patch
        versions MUST NOT be sent and are not considered during negotiation.
      schema:
        type: string
        pattern: ^\d+\.\d+$
        default: '1.0'
  schemas:
    A2AJSONRPCRequest:
      type: object
      description: A JSON-RPC 2.0 request envelope.
      required:
        - jsonrpc
        - method
        - id
      properties:
        jsonrpc:
          const: '2.0'
          description: JSON-RPC protocol version; always `2.0`.
        id:
          oneOf:
            - type: string
            - type: integer
          examples:
            - msg-001
            - 42
        method:
          type: string
          enum:
            - SendMessage
            - SendStreamingMessage
            - GetTask
            - ListTasks
            - CancelTask
            - SubscribeToTask
          description: JSON-RPC method name (PascalCase on the wire).
          examples:
            - SendMessage
        params:
          type: object
          additionalProperties: true
          description: JSON-RPC params object.
          example:
            message:
              role: ROLE_USER
              parts:
                - text: What is the ICD-10 code for asthma?
    A2AJSONRPCResponse:
      type: object
      description: A JSON-RPC 2.0 response envelope.
      required:
        - jsonrpc
        - id
      properties:
        jsonrpc:
          const: '2.0'
          description: JSON-RPC protocol version; always `2.0`.
        id:
          oneOf:
            - type: string
            - type: integer
            - type: 'null'
          examples:
            - msg-001
            - 42
            - null
        result:
          type: object
          additionalProperties: true
          description: JSON-RPC result object (present on success).
          example:
            task:
              id: task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: integer
              description: JSON-RPC error code.
            message:
              type: string
              description: Human-readable error message.
            data:
              type: object
              additionalProperties: true
              description: Additional error details.
          description: JSON-RPC error object (present on failure).
          examples:
            - code: -32600
              message: Invalid Request
    A2AJSONRPCStreamEventResponse:
      description: An SSE event carrying a JSON-RPC streaming response.
      allOf:
        - $ref: '#/components/schemas/A2ASSEEvent'
        - type: object
          properties:
            data:
              type: string
              contentMediaType: application/json
              contentSchema:
                $ref: '#/components/schemas/A2AJSONRPCResponse'
              description: 'SSE payload: a JSON-RPC streaming response.'
    CommonAgentIDValue:
      type: string
      format: agent-id
      description: >-
        Agent identifier. Accepts `agt.<uuidv7>` or a bare UUIDv7 on input;
        always returned prefixed.
      pattern: ^(agt\.)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      examples:
        - agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40
    A2ASSEEvent:
      type: object
      description: >-
        A single Server-Sent Event frame (W3C SSE wire format). The server
        currently writes only `id` and `data` lines; `event` and `retry` are
        declared for forward compatibility but not sent.
      required:
        - data
      properties:
        data:
          type: string
          contentMediaType: application/json
          description: SSE payload (JSON-encoded).
        event:
          type: string
          description: Event type. Absent for the default `message` event.
        id:
          type: string
          description: |
            Opaque event id. Clients echo the most recent value in the
            `Last-Event-ID` header to resume a dropped stream.
        retry:
          type: integer
          minimum: 0
          description: Reconnection time in milliseconds the client should use.
    CommonErrorResponse:
      type: object
      description: >
        Corti management-plane error envelope, used by all non-A2A endpoints.


        - **Standard** — when the error chain contains at least one
        `PublicError`,
          `code` and `message` come from the outermost `PublicError` and `details`
          is merged across the whole chain (outer values take precedence).
        - **Fallback** — when the chain contains no `PublicError`, the response
        is
          a generic `500` carrying a `requestId` for support reference.
        - **Validation** — a single `PublicError` whose
        `details.validationErrors`
          lists the offending fields.

        Field names use camelCase on the wire (e.g. `requestId`, `howToFix`).

        The free-form `details` object may carry arbitrary caller-defined keys.


        Rate limiting (HTTP 429) is not yet implemented; the server does not
        emit a 429 response.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable, machine-readable, SCREAMING_SNAKE_CASE error code.
              examples:
                - ASSIGNMENT_CONFLICT
                - VALIDATION_FAILED
                - INTERNAL_ERROR
            message:
              type: string
              description: Human-readable explanation.
            howToFix:
              type: string
              description: Optional guidance for the caller to resolve the error.
            details:
              type: object
              description: |
                Structured context, merged from every `PublicError` in the chain
                (outer values win). Omitted on the generic fallback response.
              additionalProperties: true
              properties:
                validationErrors:
                  type: array
                  description: Present when `code` is `VALIDATION_FAILED`.
                  items:
                    type: object
                    required:
                      - field
                      - reason
                    properties:
                      field:
                        type: string
                        description: The field that failed validation.
                      reason:
                        type: string
                        description: Why the field failed validation.
            requestId:
              type: string
              description: >
                Correlation ID from request middleware. Included only on the

                generic `500` fallback so consumers can quote it in support
                requests.
          description: The error object with code, message, and optional details.
      examples:
        - error:
            code: ASSIGNMENT_CONFLICT
            message: could not complete assignment
            details:
              assignment_id: asg_99
              expert_id: exp_42
        - error:
            code: VALIDATION_FAILED
            message: validation failed
            details:
              validationErrors:
                - field: email
                  reason: invalid format
                - field: name
                  reason: required
        - error:
            code: INTERNAL_ERROR
            message: internal server error
            requestId: req_abc123
  headers:
    A2AVersion:
      description: >-
        The A2A protocol `Major.Minor` version the server used to handle the
        request.
      schema:
        type: string
        examples:
          - '1.0'
  responses:
    Unauthorized:
      description: Missing or invalid credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CommonErrorResponse'
    NotFound:
      description: The resource does not exist or is not visible to the caller.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CommonErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 / OIDC bearer token.
    tenantHeader:
      type: apiKey
      in: header
      name: Tenant-Name
      description: The tenant the request operates within.

````