by ryan_duff · v0.1.0
A plugin to connect Dify agents to other agents using the A2A protocol (v0.3.0).
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
Connect your Dify agents to any external agents using the standardized Agent-to-Agent (A2A) protocol v0.3.0.
The A2A Client plugin enables Dify agents to communicate and collaborate with external agents that implement the A2A (Agent-to-Agent) protocol. This opens up a world of possibilities by allowing your Dify workflows to delegate specialized tasks to domain-expert agents, regardless of which platform they run on.
The Agent-to-Agent (A2A) protocol is an open standard for enabling different AI agents to communicate with each other. Think of it as a universal translator that allows agents from different platforms to work together seamlessly.
Key Benefits:
Without the A2A protocol, each agent platform operates in isolation. With this plugin, your Dify agents can:
Community Edition Users:
This plugin is not yet published to the Dify Marketplace and requires disabling signature verification for installation.
Requirements:
Cloud Edition Users:
This plugin cannot currently be installed on Dify Cloud. We plan to submit to the Marketplace in the future.
┌───────────────-──┐ A2A Protocol ┌──────────────────┐
│ Dify Agent │◄────────(JSON-RPC 2.0)───────►│ External Agent │
│ │ │ │
│ Uses 5 Tools: │ Over HTTP/HTTPS │ - Sales Expert │
│ • List │ │ - Research AI │
│ • Capabilities │ Authentication: │ - Analytics Bot │
│ • Call (Sync) │ Bearer / API Key / Basic │ - Support Agent │
│ • Submit (Async)│ │ - Custom Agent │
│ • Status │ │ │
└────────────-─────┘ └──────────────────┘
The plugin supports both synchronous and asynchronous communication:
Synchronous (message/send):
Asynchronous (message/stream + tasks/get):
All communication uses JSON-RPC 2.0 messages with proper A2A Message objects:
{
"jsonrpc": "2.0",
"method": "message/send",
"params": {
"message": {
"kind": "message",
"role": "user",
"messageId": "uuid",
"parts": [
{
"kind": "text",
"text": "Your instruction here"
}
]
}
},
"id": "request-uuid"
}
This plugin provides 5 powerful tools for A2A communication:
What it does: Shows all agents you've configured in the registry.
When to use:
Returns: JSON array of agent names and descriptions
What it does: Fetches the "agent card" from a remote agent, showing what it can do.
How it works:
/.well-known/agent-card.json (or fallback to agent.json)When to use:
Returns: Agent card JSON with full capability information
What it does: Sends a message to an agent and waits for the complete response.
Technical details:
message/send JSON-RPC methodWhen to use:
Example use case:
User asks: "What's the price of Product XYZ?"
↓
Dify calls sales_agent synchronously
↓
Sales agent responds with pricing
↓
Dify shows answer to user
What it does: Submits a long-running task and returns immediately with a taskId.
Technical details:
message/stream JSON-RPC method with SSEWhen to use:
Example use case:
User asks: "Analyze this 100-page report"
↓
Dify submits task asynchronously
↓
Returns taskId immediately
↓
User can continue conversation
↓
Later: Check status with Get Task Status
Returns: TaskId string (e.g., "6126d851-48f2-4376-af20-3d582e690f05")
What it does: Checks the status of a previously submitted asynchronous task.
Technical details:
tasks/get JSON-RPC methodsubmitted, working, completed, failed, canceledWhen to use:
Example workflow:
1. Submit task → Get taskId "abc123"
2. Wait 30 seconds
3. Get status → "working"
4. Wait 2 minutes
5. Get status → "completed" with results
Returns: Task status object with state, progress, and results (when complete)
This plugin is pending submission to the Dify Marketplace. Once approved, it will be available for one-click installation.
Set the following environment variable in your deployment:
FORCE_VERIFYING_SIGNATURE=false
Deployment-Specific Instructions:
Docker Compose:
Add to your .env file or docker-compose.yml:
FORCE_VERIFYING_SIGNATURE=false
Restart: docker compose down && docker compose up -d
Kubernetes: Add to your ConfigMap or deployment environment:
env:
- name: FORCE_VERIFYING_SIGNATURE
value: "false"
Apply changes: kubectl apply -f <your-deployment.yaml>
Bare Metal / Other: Export environment variable before starting Dify:
export FORCE_VERIFYING_SIGNATURE=false
⚠️ Security Note: This setting allows ANY unsigned plugin to be installed. Use cautiously and only install plugins you trust. Review the source code before installation.
Download dify-a2a-plugin.difypkg from:
.difypkg fileSee Configuration section below
The plugin stores up to 5 agent configurations using individual credential fields:
| Field | Required | Description | Example |
|---|---|---|---|
| Name | Yes | Unique identifier for this agent | sales_agent |
| Base URL | Yes | A2A protocol endpoint | https://api.example.com |
| Auth Type | Yes | Authentication method | bearer, api-key, basic, or none |
| API Key/Token | Conditional | Required if auth type is not none | sk-abc123... |
| Description | No | Human-readable description | Sales expert - product questions and quotes |
username:password)Agent 1:
Name: sales_agent
Base URL: https://sales-api.company.com
Auth Type: bearer
API Key: sk-prod-abc123xyz...
Description: Sales expert - handles product pricing and quotes
Agent 2:
Name: research_agent
Base URL: https://research.example.com/a2a
Auth Type: api-key
API Key: research_key_789
Description: Research specialist - finds and analyzes information
Agent 3:
(Leave blank if not needed)
⚠️ Security: API keys are stored securely in Dify's credential system and never exposed to end users.
⚠️ Agent Endpoint Requirements: Remote agents must implement A2A protocol v0.3.0 for compatibility.
Scenario: You need product pricing information.
sales_agent"Provide pricing for Enterprise plan"Scenario: You need deep market analysis that takes 10 minutes.
research_agent"Comprehensive competitor pricing analysis for Q4 2024""abc-123-def"research_agent"abc-123-def"completed with full analysis resultsWhen to use List Agents:
When to use Get Agent Capabilities:
When to use Call Agent (Sync):
When to use Submit Task (Async):
When to use Get Task Status:
This plugin implements A2A Protocol v0.3.0, which includes:
| Method | Purpose | Implementation |
|---|---|---|
message/send | Synchronous request/response | ✅ Call Agent tool |
message/stream | Asynchronous task with SSE | ✅ Submit Task tool |
tasks/get | Task status retrieval | ✅ Get Task Status tool |
tasks/cancel | Cancel running task | ⏳ Future enhancement |
tasks/resubscribe | Resume SSE stream | ⏳ Future enhancement |
kind, role, messageId, parts[]/.well-known/agent-card.jsonAgents can advertise their capabilities via agent cards:
{
"name": "Sales Expert Agent",
"description": "Handles product questions and pricing",
"protocolVersion": "0.3.0",
"capabilities": {
"streaming": true,
"tasks": true
},
"skills": [
{
"name": "product_pricing",
"description": "Get pricing for products"
}
]
}
All messages follow A2A spec with proper structure:
{
"kind": "message",
"role": "user",
"messageId": "550e8400-e29b-41d4-a716-446655440000",
"parts": [
{
"kind": "text",
"text": "Your instruction here"
}
]
}
Async tasks use SSE streaming for progress updates:
event: status-update
data: {"jsonrpc":"2.0","result":{"taskId":"abc123","state":"submitted"}}
event: status-update
data: {"jsonrpc":"2.0","result":{"taskId":"abc123","state":"working","progress":0.5}}
event: task
data: {"jsonrpc":"2.0","result":{"taskId":"abc123","state":"completed","answer":"Results here..."}}
The Submit Task tool extracts the taskId from the first event and immediately closes the stream for true async behavior.
JSON-RPC error responses:
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid params"
},
"id": "request-id"
}
Common error codes:
-32700 - Parse error-32600 - Invalid request-32601 - Method not found-32602 - Invalid params-32603 - Internal errorProblem: No agents are configured in the plugin settings.
Solution:
Problem: Signature verification is blocking unsigned plugin installation.
Solution for Community Edition:
FORCE_VERIFYING_SIGNATURE=falsedocker compose down && docker compose up -dkubectl rollout restart deployment/<dify-deployment>For Cloud Edition: This plugin cannot be installed on Dify Cloud until it's published to the Marketplace.
Problem: The agent name doesn't match any configured agent.
Solution:
Problem: Task ID is malformed or missing.
Solution:
"uuid-format-string"Problem: Agent endpoint is unreachable or slow.
Solution:
curl -X POST <base_url>Problem: Authentication failed.
Solution:
username:passwordProblem: Agent response doesn't match expectations.
Solution:
Source code: https://github.com/flyryan/dify-a2a-plugin
See CLAUDE.md for detailed development instructions, including:
dify-plugin==0.6.2requests>=2.31.0sseclient-py>=1.8.0Unit tests with mocked dependencies:
python3 -m unittest tools/tests/test_a2a_registry.py
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Author: Ryan Duff
This plugin collects and stores agent configuration data (URLs, API keys, descriptions) to facilitate A2A protocol communication. All data is stored securely within Dify's credential management system.
For complete privacy details, see PRIVACY.md.
We plan to submit this plugin to the Dify Marketplace. Once approved, the plugin will:
FORCE_VERIFYING_SIGNATURE needed)Marketplace submission benefits:
Track marketplace submission progress in Issues.
Contributions are welcome! Please:
For major changes, please open an issue first to discuss what you would like to change.
If this plugin helps you build amazing agent workflows, please:
Built with ❤️ for the Dify and A2A communities