A2a Multi Turnのロゴ

A2a Multi Turn

組織
OrcaQubits
a2a-multi-turn

Implement A2A multi-turn conversations — input-required state handling, context preservation, iterative refinement, and human-in-the-loop patterns. Use when building agents that need back-and-forth interaction.

概要

公開者OrcaQubits
リポジトリagentic-commerce-skills-plugins
スキル名a2a-multi-turn
スター
40
フォーク
17
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    OrcaQubitsがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルA2a Multi TurnをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/a2a-multi-agent/skills/a2a-multi-turn
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins.git /tmp/agentic-commerce-skills-plugins
mkdir -p .claude/skills
cp -r /tmp/agentic-commerce-skills-plugins/a2a-multi-agent/skills/a2a-multi-turn .claude/skills/a2a-multi-turn
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでA2a Multi Turnを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にA2a Multi Turnを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、A2a Multi Turnは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

A2A Multi-Turn Conversations

Before writing code

Fetch live docs:

  1. Fetch https://a2a-protocol.org/latest/specification/ for multi-turn and input-required handling
  2. Web-search site:github.com a2aproject A2A multi-turn input-required for multi-turn protocol details
  3. Web-search site:github.com a2aproject a2a-samples multi-turn for conversation examples
  4. Fetch SDK docs for multi-turn task handling patterns

Conceptual Architecture

What Multi-Turn Means in A2A

Multi-turn conversations allow agents to have iterative exchanges within a single task. The server agent can request more input from the client, creating a back-and-forth dialogue before reaching a final result.

The input-required State

The key mechanism for multi-turn is the input-required task state:

Client sends message → Task created (submitted)
Server processes → working
Server needs more info → input-required (with a message explaining what's needed)
Client sends follow-up → working (task continues with same taskId)
Server completes → completed

How It Works

  1. Initial request: Client sends message/send or message/stream without taskId
  2. Server processes: May transition to input-required if it needs clarification
  3. Server response: Returns the task with input-required state and a message explaining what's needed
  4. Client responds: Sends another message/send with the same taskId and the requested information
  5. Server continues: Resumes processing with the additional context
  6. Repeat or complete: May request more input or reach a terminal state

Context Preservation

Within a multi-turn task:

  • All messages are associated with the same taskId
  • The server maintains the full conversation history
  • Each new message from the client adds to the context
  • The server can reference previous messages when processing

Patterns

Clarification Loop

Agent asks for clarification when the request is ambiguous:

User: "Book a flight"
Agent: (input-required) "Where are you flying from and to? What dates?"
User: "NYC to London, March 15-22"
Agent: (input-required) "I found 3 options. Which do you prefer? [options]"
User: "Option 2"
Agent: (completed) "Booked! Confirmation #ABC123"
Progressive Refinement

Agent produces intermediate results and asks for feedback:

User: "Write a blog post about AI"
Agent: (input-required) "Here's an outline. Should I proceed? [outline]"
User: "Looks good, but add a section on safety"
Agent: (completed) "Here's the final post. [content]"
Human-in-the-Loop

Agent defers to a human for decisions it can't make:

User: "Process this insurance claim"
Agent: (input-required) "This claim requires manager approval for amounts over $10,000. Please confirm."
User: "Approved"
Agent: (completed) "Claim processed and approved."
Data Collection

Agent collects required information step by step:

User: "Set up my account"
Agent: (input-required) "What's your email address?"
User: "user@example.com"
Agent: (input-required) "What subscription plan? [Basic/Pro/Enterprise]"
User: "Pro"
Agent: (completed) "Account created with Pro plan."

Server Implementation

The server must:

  • Maintain task state across multiple requests
  • Store conversation history for context
  • Return clear messages when requesting input
  • Handle both new tasks and task continuations
  • Validate that continued tasks exist and are in the right state

Client Implementation

The client must:

  • Check response task state after each call
  • Detect input-required and present the agent's message to the user (or auto-respond)
  • Send follow-up messages with the same taskId
  • Handle the possibility of multiple rounds
  • Know when to give up (max turns, timeout)

Best Practices

  • Include clear, specific messages when entering input-required — the client needs to know what to provide
  • Set maximum turn limits to prevent infinite loops
  • Preserve full context across turns — don't lose earlier parts of the conversation
  • Use DataPart for structured input requests (e.g., forms, multiple-choice)
  • Consider timeouts for tasks waiting in input-required state
  • Log all turns for debugging multi-turn flows
  • Handle the case where the client never responds (timeout → canceled or failed)

Fetch the specification for exact multi-turn handling rules, message continuation semantics, and state transition constraints before implementing.

よくある質問

AIスキル「A2a Multi Turn」では何ができますか?

Implement A2A multi-turn conversations — input-required state handling, context preservation, iterative refinement, and human-in-the-loop patterns. Use when building agents that need back-and-forth interaction.

TypingMindでA2a Multi Turnを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。A2a Multi Turnはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにA2a Multi Turnをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/OrcaQubits/agentic-commerce-skills-plugins/tree/main/a2a-multi-agent/skills/a2a-multi-turnを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

A2a Multi Turnを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

A2a Multi Turnは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもA2a Multi Turnを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「A2a Multi Turn」は無料ですか?

はい。OrcaQubitsがGitHubでMITライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇