app icon
A2A Server
0.0.4

Expose Dify apps as A2A protocol agents, enabling agent discovery, invocation, and optional registration to Nacos Agent Registry.

nacos/a2a_server673 installs

A2A Server Plugin

Author: nacos
Version: 0.0.4
Type: extension
Repository: https://github.com/nacos-group/nacos-dify-plugins

Expose Dify apps as A2A (Agent-to-Agent) protocol agents for external discovery and invocation.

Features

  • A2A Protocol Support: Expose any Dify App (Chatbot/Agent/Chatflow/Workflow) as an A2A-compatible agent
  • Agent Discovery: Support endpoint for agent metadata discovery
  • Nacos Integration: Optional registration to Nacos Agent Registry for centralized agent management
  • Multi-turn Conversation: Maintain conversation context across multiple requests using Dify Plugin Storage
  • Streaming Response: Support streaming mode for Agent Chat Apps

Quick Start

Step 1: Install the Plugin

  1. Download the plugin package from GitHub Releases
  2. In Dify, go to PluginsInstall Plugin
  3. Upload the plugin package and complete the installation

Step 2: Create an Endpoint (First Time)

  1. Go to Pluginsa2a_serverCreate Endpoint
  2. Configure the required settings:
ParameterExample ValueDescription
Dify AppSelect your appThe Dify App to expose
Agent NameDisplay name for your agent
Agent DescriptionWhat your agent does
Agent Public URLPlaceholder value (will update later)
  1. Click Save to create the endpoint

Important: The endpoint ID is generated by Dify after you save. You cannot know the correct URL before creating the endpoint. Use a placeholder value first (e.g., ).

Step 3: Update the Correct URL

After saving, Dify will generate an endpoint ID (e.g., ). Now you need to update the URL:

  1. Go back to Edit Endpoint
  2. Update Agent Public URL to the correct value:
  3. Click Save again

Your final A2A URLs will be:

Step 4: Test the Agent

Test by fetching the Agent Card:

If successful, you'll receive a JSON response with your agent's metadata.

Note: If Nacos registration is enabled, the agent will be registered to Nacos when you call this GET endpoint for the first time. Before calling this endpoint, the agent is NOT registered to Nacos.

For sending messages via the POST endpoint, it's recommended to use an A2A SDK or A2A-compatible client.

Configuration Reference

ParameterRequiredDefaultDescription
Dify AppYes-Select the Dify App to expose as A2A agent
Agent NameYes-Name of the A2A agent
Agent DescriptionYes-Description of the agent's capabilities
Agent Public URLYes-Public URL where this agent can be accessed
Agent VersionNoVersion string
Enable Nacos RegistryYesEnable/disable Nacos registration
Nacos AddressNo-Nacos server address (e.g., )
Nacos Namespace IDNoNacos namespace ID
Nacos UsernameNo-Username for Nacos authentication
Nacos PasswordNo-Password for Nacos authentication
Aliyun AccessKeyNo-AccessKey for Aliyun MSE Nacos
Aliyun SecretKeyNo-SecretKey for Aliyun MSE Nacos

Nacos Registration

When to Use Nacos

  • You have multiple A2A agents and want centralized discovery
  • You're using Nacos as your service registry
  • You want agents to discover each other automatically

Registration Behavior

  1. Lazy Registration: The agent is NOT registered to Nacos immediately when the plugin starts
  2. First Request Trigger: Registration only occurs when the first GET request is made to
  3. Cache-based Deduplication: After registration, the AgentCard is cached locally (15 seconds TTL) to avoid duplicate registrations
  4. Change Detection: If the agent configuration changes (name, description, or URL), the agent will be re-registered to Nacos
  5. Remote Sync: After successful registration, the plugin fetches the AgentCard from Nacos to ensure cache consistency

Configuration Examples

Self-hosted Nacos:

Aliyun MSE Nacos:

API Reference

Endpoints

MethodPathDescription
GETReturns AgentCard metadata
POSTJSON-RPC endpoint for A2A protocol

Supported JSON-RPC Methods

MethodDescription
Send a message to the agent and receive a response

Response Format

Troubleshooting

Agent Card Not Returned

  • Check that the endpoint is correctly configured
  • Verify the URL path includes
  • Check Dify logs for error messages

Nacos Registration Failed

  • Verify Nacos server is accessible from Dify
  • Check authentication credentials
  • Ensure the namespace ID exists in Nacos

Message Send Returns Error

  • Verify the Dify App is properly configured
  • Check that the app supports chat/conversation mode
  • Review the JSON-RPC request format

Requirements

  • Dify version with plugin support
  • Python 3.12+
  • (Optional) Nacos server for agent registration

License

Apache License 2.0

CATEGORY
Extension
VERSION
0.0.4
nacos·03/10/2026 02:24 AM
REQUIREMENTS
App invocation
Endpoint registration
Maximum memory
256MB
Maximum storage
1MB