Work IQ エージェント間 (A2A) の概要

エージェント間 (A2A) プロトコルにより、AI エージェントは Work IQ と通信およびコラボレーションできます。 エージェントは、Work IQ を使用して単純な API 呼び出しの代わりに自律的に動作し、構造化されたタスクを交換できます。

対話型デモで Work IQ A2A について調べます。

プロトコルのバージョン

Work IQ では、A2A バージョン 1.0 と 0.3 の両方がサポートされており、A2A-Version 要求ヘッダーを介してディスパッチされます。 A2A-Version ヘッダーを省略すると、下位互換性を確保するために、Work IQ のデフォルトは 0.3 になります。 要求ヘッダーで A2A-Version: 1.0 を設定して、バージョン 1.0 を使用します。

認証

Work IQ A2A では、Microsoft Entra ID 代理認証が使用されます。 詳細については、「 Work IQ API のアクセス許可リファレンス」を参照してください。

エージェントの検出

Work IQは、標準 /.well-known/agent-card.json エンドポイントで利用可能なエージェントのエージェントカードをホストします。

  • 既定のエージェントの場合: https://workiq.svc.cloud.microsoft/a2a/.well-known/agent-card.json
  • 特定のエージェントの場合: https://workiq.svc.cloud.microsoft/a2a/{agent-id}/.well-known/agent-card.json

例

要求

GET https://workiq.svc.cloud.microsoft/a2a/.well-known/agent-card.json
Authorization: Bearer {access-token}
A2A-Version: 1.0

応答

{
  "name": "Microsoft Copilot",
  "description": "An AI-powered assistant that helps users with business-related tasks such as managing emails, scheduling meetings, and organizing documents.",
  "version": "1.0.0",
  "documentationUrl": null,
  "iconUrl": "https://copilot.microsoft.com",
  "supportedInterfaces": [
    {
      "url": "https://workiq.svc.cloud.microsoft/a2a",
      "protocolBinding": "JSONRPC",
      "tenant": null,
      "protocolVersion": "1.0"
    }
  ],
  "capabilities": {
    "streaming": true,
    "pushNotifications": false,
    "extensions": [],
    "extendedAgentCard": null
  },
  "provider": {
    "organization": "Microsoft",
    "url": "https://www.microsoft.com"
  },
  "skills": [],
  "defaultInputModes": [
    "text"
  ],
  "defaultOutputModes": [
    "text"
  ],
  "securitySchemes": null,
  "securityRequirements": null,
  "signatures": null
}

メッセージを送信する

Work IQ では、同期モード (SendMessage) とストリーミング モード (SendStreamingMessage) でのメッセージ送信がサポートされています。

例

要求

POST https://workiq.svc.cloud.microsoft/a2a/
Authorization: Bearer {access-token}
Content-Type: application/json
A2A-Version: 1.0

{
  "jsonrpc": "2.0",
  "id": "<request-guid>",
  "method": "SendMessage",
  "params": {
    "message": {
      "role": "ROLE_USER",
      "messageId": "<message-guid>",
      "parts": [
        {
          "text": "What meetings do I have today?"
        }
      ],
      "metadata": {
        "Location": {
          "timeZoneOffset": -480,
          "timeZone": "America/Los_Angeles"
        }
      }
    }
  }
}

注:

A2A-Version: 1.0 ヘッダーは、v1.0 メソッド名 (SendMessage) を使用するために必要です。 省略すると、デフォルトは v0.3 になります。

応答

{
  "jsonrpc": "2.0",
  "id": "<request-guid>",
  "result": {
    "task": {
      "id": "<task-id>",
      "contextId": "ctx-1",
      "status": {
        "state": "TASK_STATE_COMPLETED"
      },
      "artifacts": [
        {
          "artifactId": "<artifact-id>",
          "name": "Answer",
          "parts": [
            {
              "text": "Today you have: 9 AM standup, 11 AM review with Dana, 2 PM customer call."
            }
          ]
        }
      ]
    }
  }
}

マルチターンの会話

次のメッセージで、前の応答の contextId を渡します。

{
  "jsonrpc": "2.0",
  "id": "<request-guid-2>",
  "method": "SendMessage",
  "params": {
    "message": {
      "role": "ROLE_USER",
      "messageId": "<message-guid-2>",
      "contextId": "ctx-1",
      "parts": [
        {
          "text": "Tell me more about the 2 PM customer call."
        }
      ]
    }
  }
}

タスク管理

Work IQ は、タスクを管理するための GetTask、 CancelTask、および SubscribeToTask メソッドをサポートしています。

例

要求

POST https://workiq.svc.cloud.microsoft/a2a/
Authorization: Bearer {access-token}
Content-Type: application/json
A2A-Version: 1.0

{
  "jsonrpc": "2.0",
  "id": "<request-guid-3>",
  "method": "GetTask",
  "params": {
    "id": "<task-id>"
  }
}

応答

{
  "jsonrpc": "2.0",
  "id": "<request-guid-3>",
  "result": {
    "id": "<task-id>",
    "contextId": "<ctx-id>",
    "status": {
      "state": "TASK_STATE_COMPLETED",
      "message": {
        "role": "ROLE_AGENT",
        "parts": [],
        "messageId": "<msg-id>",
        "contextId": "<ctx-id>"
      },
      "timestamp": "2026-06-02T14:58:31.3516247+00:00"
    },
    "artifacts": [
      {
        "artifactId": "<artifact-id>",
        "name": "Answer",
        "parts": [
          {
            "text": "Good afternoon! \uD83D\uDE0A  \n\nHope your day is going well so far. What can I help you with today?"
          }
        ]
      }
    ]
  }
}