Support for the A2A protocol #13676

Open
opened 2026-02-21 19:13:18 -05:00 by yindo · 22 comments
Owner

Originally created by @avasquezkudaw on GitHub (May 7, 2025).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

It would be interesting to incorporate support for the A2A protocol into the agents built in Dify, in order to ensure interoperability.
Google proposed this protocol, Microsoft is currently adopting it, and other players will likely integrate it as well.

https://github.com/google/A2A

https://www.microsoft.com/en-us/microsoft-cloud/blog/2025/05/07/empowering-multi-agent-apps-with-the-open-agent2agent-a2a-protocol/

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @avasquezkudaw on GitHub (May 7, 2025). ### Self Checks - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. It would be interesting to incorporate support for the A2A protocol into the agents built in Dify, in order to ensure interoperability. Google proposed this protocol, Microsoft is currently adopting it, and other players will likely integrate it as well. https://github.com/google/A2A https://www.microsoft.com/en-us/microsoft-cloud/blog/2025/05/07/empowering-multi-agent-apps-with-the-open-agent2agent-a2a-protocol/ ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 🤖 feat:agent label 2026-02-21 19:13:18 -05:00
Author
Owner

@BenSpex commented on GitHub (Jun 6, 2025):

Yes multi Agent support especially A2A protocol would be awesome.
This way we could also integrate other Agents and orchestrate them nicely together.

@BenSpex commented on GitHub (Jun 6, 2025): Yes multi Agent support especially A2A protocol would be awesome. This way we could also integrate other Agents and orchestrate them nicely together.
Author
Owner

@tobegit3hub commented on GitHub (Jun 11, 2025):

We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin.

@tobegit3hub commented on GitHub (Jun 11, 2025): We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin.
Author
Owner

@lyz04551 commented on GitHub (Jun 18, 2025):

We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin.

I'm very happy to hear this news. Is there a release schedule for Dify's agent to support A2A? thanks

@lyz04551 commented on GitHub (Jun 18, 2025): > We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin. I'm very happy to hear this news. Is there a release schedule for Dify's agent to support A2A? thanks
Author
Owner

@maninder-ia commented on GitHub (Jun 20, 2025):

That's good to hear, it will help dify be mainstream, let's get this done at the earlieat

@maninder-ia commented on GitHub (Jun 20, 2025): That's good to hear, it will help dify be mainstream, let's get this done at the earlieat
Author
Owner

@prd-tuong-nguyen commented on GitHub (Jun 22, 2025):

Waiting for this

@prd-tuong-nguyen commented on GitHub (Jun 22, 2025): Waiting for this
Author
Owner

@changkeke commented on GitHub (Jul 24, 2025):

We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin.我们正在处理这个问题,并尝试将 dify 应用程序包装为 A2A 代理,就像 MCP 插件一样。

May I ask how it's going?

@changkeke commented on GitHub (Jul 24, 2025): > We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin.我们正在处理这个问题,并尝试将 dify 应用程序包装为 A2A 代理,就像 MCP 插件一样。 May I ask how it's going?
Author
Owner

@cylobi commented on GitHub (Jul 30, 2025):

+1

@cylobi commented on GitHub (Jul 30, 2025): +1
Author
Owner

@em-le-ts commented on GitHub (Aug 18, 2025):

+1

@em-le-ts commented on GitHub (Aug 18, 2025): +1
Author
Owner

@tobegit3hub commented on GitHub (Aug 21, 2025):

We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin.我们正在处理这个问题,并尝试将 dify 应用程序包装为 A2A 代理,就像 MCP 插件一样。

May I ask how it's going?

We are working on other features now and we will follow up the latest A2A protocol and support it later.

Here is the simple script we use to implement A2A agent with Dify agent API.

from a2a.server.agent_execution import AgentExecutor, RequestContext
from a2a.server.events import EventQueue
from a2a.types import (Part, Task, TextPart, UnsupportedOperationError)
from a2a.utils import (completed_task, new_artifact)
from a2a.utils.errors import ServerError
import requests

def request_dify_api() -> str:
    url = "http://dify.xxx.com/v1/chat-messages"

    headers = {
        "Authorization": "Bearer app-xxx",
        "Content-Type": "application/json"
    }

    payload = {
        "inputs": {},
        "query": "What is the weather?",
        "response_mode": "blocking",
        "conversation_id": "",
        "user": "test"
    }

    response = requests.post(
        url,
        headers=headers,
        json=payload
    )

    return response.json()["answer"]

class WeatherAgentExecutor(AgentExecutor):

    async def execute(
        self,
        context: RequestContext,
        event_queue: EventQueue,
    ) -> None:
        
        text=request_dify_api()
        print(f"Dify weather agent response: {text}")

        event_queue.enqueue_event(
            completed_task(
                context.task_id,
                context.context_id,
                [new_artifact(parts=[Part(root=TextPart(text=text))], name="天气查询结果")],
                [context.message],
            )
        )

    async def cancel(
        self, request: RequestContext, event_queue: EventQueue
    ) -> Task | None:
        raise ServerError(error=UnsupportedOperationError())
@tobegit3hub commented on GitHub (Aug 21, 2025): > > We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin.我们正在处理这个问题,并尝试将 dify 应用程序包装为 A2A 代理,就像 MCP 插件一样。 > > May I ask how it's going? We are working on other features now and we will follow up the latest A2A protocol and support it later. Here is the simple script we use to implement A2A agent with Dify agent API. ``` from a2a.server.agent_execution import AgentExecutor, RequestContext from a2a.server.events import EventQueue from a2a.types import (Part, Task, TextPart, UnsupportedOperationError) from a2a.utils import (completed_task, new_artifact) from a2a.utils.errors import ServerError import requests def request_dify_api() -> str: url = "http://dify.xxx.com/v1/chat-messages" headers = { "Authorization": "Bearer app-xxx", "Content-Type": "application/json" } payload = { "inputs": {}, "query": "What is the weather?", "response_mode": "blocking", "conversation_id": "", "user": "test" } response = requests.post( url, headers=headers, json=payload ) return response.json()["answer"] class WeatherAgentExecutor(AgentExecutor): async def execute( self, context: RequestContext, event_queue: EventQueue, ) -> None: text=request_dify_api() print(f"Dify weather agent response: {text}") event_queue.enqueue_event( completed_task( context.task_id, context.context_id, [new_artifact(parts=[Part(root=TextPart(text=text))], name="天气查询结果")], [context.message], ) ) async def cancel( self, request: RequestContext, event_queue: EventQueue ) -> Task | None: raise ServerError(error=UnsupportedOperationError()) ```
Author
Owner

@changkeke commented on GitHub (Aug 21, 2025):

I'm really looking forward to it.

Bounty Hunter
@.***

@changkeke commented on GitHub (Aug 21, 2025): I'm really looking forward to it. Bounty Hunter ***@***.***
Author
Owner

@codeMonkey-shin commented on GitHub (Aug 31, 2025):

우리는 이에 대해 작업 중이며 MCP 플러그인과 마찬가지로 dify 애플리케이션을 A2A 에이전트로 래핑하려고 시도하고 있습니다.

어떻게 되어가는지 물어봐도 될까요?

현재 다른 기능도 개발 중이며, 최신 A2A 프로토콜을 후속 조치하여 나중에 지원할 예정입니다.

다음은 Dify 에이전트 API로 A2A 에이전트를 구현하는 데 사용하는 간단한 스크립트입니다.

from a2a.server.agent_execution import AgentExecutor, RequestContext
from a2a.server.events import EventQueue
from a2a.types import (Part, Task, TextPart, UnsupportedOperationError)
from a2a.utils import (completed_task, new_artifact)
from a2a.utils.errors import ServerError
import requests

def request_dify_api() -> str:
    url = "http://dify.xxx.com/v1/chat-messages"

    headers = {
        "Authorization": "Bearer app-xxx",
        "Content-Type": "application/json"
    }

    payload = {
        "inputs": {},
        "query": "What is the weather?",
        "response_mode": "blocking",
        "conversation_id": "",
        "user": "test"
    }

    response = requests.post(
        url,
        headers=headers,
        json=payload
    )

    return response.json()["answer"]

class WeatherAgentExecutor(AgentExecutor):

    async def execute(
        self,
        context: RequestContext,
        event_queue: EventQueue,
    ) -> None:
        
        text=request_dify_api()
        print(f"Dify weather agent response: {text}")

        event_queue.enqueue_event(
            completed_task(
                context.task_id,
                context.context_id,
                [new_artifact(parts=[Part(root=TextPart(text=text))], name="天气查询结果")],
                [context.message],
            )
        )

    async def cancel(
        self, request: RequestContext, event_queue: EventQueue
    ) -> Task | None:
        raise ServerError(error=UnsupportedOperationError())

I know the agent doesn't support blocking mode.

@codeMonkey-shin commented on GitHub (Aug 31, 2025): > > > 우리는 이에 대해 작업 중이며 MCP 플러그인과 마찬가지로 dify 애플리케이션을 A2A 에이전트로 래핑하려고 시도하고 있습니다. > > > > > > 어떻게 되어가는지 물어봐도 될까요? > > 현재 다른 기능도 개발 중이며, 최신 A2A 프로토콜을 후속 조치하여 나중에 지원할 예정입니다. > > 다음은 Dify 에이전트 API로 A2A 에이전트를 구현하는 데 사용하는 간단한 스크립트입니다. > > ``` > from a2a.server.agent_execution import AgentExecutor, RequestContext > from a2a.server.events import EventQueue > from a2a.types import (Part, Task, TextPart, UnsupportedOperationError) > from a2a.utils import (completed_task, new_artifact) > from a2a.utils.errors import ServerError > import requests > > def request_dify_api() -> str: > url = "http://dify.xxx.com/v1/chat-messages" > > headers = { > "Authorization": "Bearer app-xxx", > "Content-Type": "application/json" > } > > payload = { > "inputs": {}, > "query": "What is the weather?", > "response_mode": "blocking", > "conversation_id": "", > "user": "test" > } > > response = requests.post( > url, > headers=headers, > json=payload > ) > > return response.json()["answer"] > > class WeatherAgentExecutor(AgentExecutor): > > async def execute( > self, > context: RequestContext, > event_queue: EventQueue, > ) -> None: > > text=request_dify_api() > print(f"Dify weather agent response: {text}") > > event_queue.enqueue_event( > completed_task( > context.task_id, > context.context_id, > [new_artifact(parts=[Part(root=TextPart(text=text))], name="天气查询结果")], > [context.message], > ) > ) > > async def cancel( > self, request: RequestContext, event_queue: EventQueue > ) -> Task | None: > raise ServerError(error=UnsupportedOperationError()) > ``` I know the agent doesn't support blocking mode.
Author
Owner

@shaotju commented on GitHub (Aug 31, 2025):

Waiting for this

@shaotju commented on GitHub (Aug 31, 2025): Waiting for this
Author
Owner

@phantomedc commented on GitHub (Sep 1, 2025):

We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin.

any progress?

@phantomedc commented on GitHub (Sep 1, 2025): > We are working on this and try to wrap dify applications as A2A agents, just like MCP plugin. any progress?
Author
Owner

@AaronMKk commented on GitHub (Sep 11, 2025):

any progress?

@AaronMKk commented on GitHub (Sep 11, 2025): any progress?
Author
Owner

@HeKeHenryZhang commented on GitHub (Sep 18, 2025):

any progress?

@HeKeHenryZhang commented on GitHub (Sep 18, 2025): any progress?
Author
Owner

@taozuinb commented on GitHub (Sep 27, 2025):

any progress?

@taozuinb commented on GitHub (Sep 27, 2025): any progress?
Author
Owner

@MaoJianwei commented on GitHub (Sep 28, 2025):

any progress?

@MaoJianwei commented on GitHub (Sep 28, 2025): any progress?
Author
Owner

@phantomedc commented on GitHub (Sep 28, 2025):

Hi guys, I found a plugin that might be a good alternative for you. https://github.com/yzddmr6/chatflow_invoker

@phantomedc commented on GitHub (Sep 28, 2025): Hi guys, I found a plugin that might be a good alternative for you. https://github.com/yzddmr6/chatflow_invoker
Author
Owner

@NPCver commented on GitHub (Sep 30, 2025):

Is wrapping the dify api in a2a protocol the final answer?

@NPCver commented on GitHub (Sep 30, 2025): Is wrapping the dify api in a2a protocol the final answer?
Author
Owner

@Pl8tinium commented on GitHub (Nov 21, 2025):

i would also love to see this, will get us closer for vendor agnostic integrations of the agents

@Pl8tinium commented on GitHub (Nov 21, 2025): i would also love to see this, will get us closer for vendor agnostic integrations of the agents
Author
Owner

@xuechaos commented on GitHub (Jan 21, 2026):

Dify supports A2A services through these two plugins:

  1. a2a_server can publish A2A services and convert them to the Dify protocol.
    https://marketplace.dify.ai/plugins/nacos/a2a_server

  2. The A2A Agent Client can subscribe to A2A services and initiate calls.
    https://marketplace.dify.ai/plugins/nacos/a2a_discovery

Both plugins support Nacos A2A Registry, allowing you to register and subscribe to A2A services. You can try them out.

@Pl8tinium @NPCver @MaoJianwei @taozuinb @HeKeHenryZhang @AaronMKk @phantomedc @shaotju @changkeke @em-le-ts @cylobi

@xuechaos commented on GitHub (Jan 21, 2026): Dify supports A2A services through these two plugins: 1. `a2a_server` can publish A2A services and convert them to the Dify protocol. https://marketplace.dify.ai/plugins/nacos/a2a_server 2. The A2A Agent Client can subscribe to A2A services and initiate calls. https://marketplace.dify.ai/plugins/nacos/a2a_discovery Both plugins support Nacos A2A Registry, allowing you to register and subscribe to A2A services. You can try them out. @Pl8tinium @NPCver @MaoJianwei @taozuinb @HeKeHenryZhang @AaronMKk @phantomedc @shaotju @changkeke @em-le-ts @cylobi
Author
Owner

@tobegit3hub commented on GitHub (Feb 1, 2026):

Thanks @xuechaos and dify a2a plugin with nacos register may be the right way to do that.

@tobegit3hub commented on GitHub (Feb 1, 2026): Thanks @xuechaos and dify a2a plugin with nacos register may be the right way to do that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13676