Skip to content

✨ Feat: Add A2A protocol support for agent publishing and external agen…#2773

Open
xuyaqist wants to merge 30 commits intodevelopfrom
xyq/feat_a2a
Open

✨ Feat: Add A2A protocol support for agent publishing and external agen…#2773
xuyaqist wants to merge 30 commits intodevelopfrom
xyq/feat_a2a

Conversation

@xuyaqist
Copy link
Copy Markdown
Contributor

@xuyaqist xuyaqist commented Apr 13, 2026

Feat: Add A2A protocol support for agent publishing and external agent discovery
A2A协议指导:https://dcnvjn24oieg.feishu.cn/docx/VrhSdKTy5ofXVMxxcxZcoQann9e

  • A2A Server: Enable publishing platform agents as A2A agents with configurable endpoints, including database schema for agent registration and management
a2aserver.mp4

测试脚本:test_a2a_api.sh
A2A Agent支持根据不同格式的请求,返回不同格式的A2A响应
image

  • A2A Client: Support discovering and invoking external A2A agents through agent discovery modal, HTTP client, and agent adapter integration
    演示视频
a2aclient.mp4

测试:image

…t discovery

- A2A Server: Enable publishing platform agents as A2A agents with configurable endpoints, including database schema for agent registration and management
- A2A Client: Support discovering and invoking external A2A agents through agent discovery modal, HTTP client, and agent adapter integration
- Database: Add `a2a_agent` and `a2a_agent_endpoint` tables with foreign key relationships to existing agent tables
- SDK: Implement `A2AAgentProxy` for SDK-level A2A agent invocation support
- Frontend: Add A2A Server Settings Panel, Agent Discovery Modal, and corresponding hooks (`useA2AServerAgents`, `useExternalAgents`)
- Backend API: Add `a2a_client_app.py` and `a2a_server_app.py` endpoints with service layer implementations
- i18n: Update English and Chinese localization files with A2A-related translations
- System Prompts: Update manager system prompt templates to support A2A protocol context
Copilot AI review requested due to automatic review settings April 13, 2026 07:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-to-end A2A (Agent-to-Agent) protocol support so platform agents can be published as A2A servers, and platform agents can discover/invoke external A2A agents (SDK, backend, and frontend).

Changes:

  • SDK: Introduces an external A2A agent proxy + wrapper, and wires external A2A agents into manager/managed-agent creation.
  • Backend: Adds A2A client/server services + FastAPI endpoints, plus new DB tables/models for external agents, relations, server registrations, tasks, messages, and artifacts.
  • Frontend: Adds discovery + management UI (modal/panels/hooks) and publish-as-A2A option with preview, plus i18n updates.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
sdk/nexent/core/agents/nexent_agent.py Appends external A2A wrappers into managed agents during agent creation.
sdk/nexent/core/agents/agent_model.py Extends AgentConfig with external A2A agent configuration model.
sdk/nexent/core/agents/a2a_agent_proxy.py Adds HTTP proxy/tooling to invoke external A2A agents and wrap them as managed agents.
frontend/types/agentConfig.ts Adds is_a2a_server flag on Agent type.
frontend/stores/agentConfigStore.ts Adds store support for external sub-agent ID lists.
frontend/services/api.ts Adds A2A client/server management endpoint definitions.
frontend/services/agentVersionService.ts Adds publish_as_a2a request + expanded publish response typing.
frontend/services/agentConfigService.ts Maps backend is_a2a_server into frontend agent list data.
frontend/services/a2aService.ts Adds frontend API service for A2A discovery, management, relations, and server settings.
frontend/public/locales/zh/common.json Adds A2A-related Chinese translations.
frontend/public/locales/en/common.json Adds A2A-related English translations.
frontend/hooks/agent/useExternalAgents.ts Adds React Query hook for available external agents.
frontend/hooks/agent/useA2AServerAgents.ts Adds React Query hook(s) for A2A server agents + helpers.
frontend/app/[locale]/agents/versions/AgentVersionPubulishModal.tsx Adds “publish as A2A” switch and A2A publish preview modal.
frontend/app/[locale]/agents/components/agentManage/AgentList.tsx Adds A2A settings entrypoint from agent list for A2A server agents.
frontend/app/[locale]/agents/components/AgentConfigComp.tsx Adds entrypoint to open A2A discovery modal from agent config page.
frontend/app/[locale]/agents/components/agentConfig/CollaborativeAgent.tsx Splits internal vs external sub-agent selection and rendering.
frontend/app/[locale]/agents/components/a2a/A2AServerSettingsPanel.tsx Adds A2A Agent Card / endpoints preview + copy UI.
frontend/app/[locale]/agents/components/a2a/A2AAgentDiscoveryModal.tsx Adds discovery + list UI for external A2A agents and protocol settings.
docker/sql/v2.0.0_0330_add_a2a_tables.sql Adds A2A-related tables for discovery, relations, server registration, and task tracking.
docker/docker-compose.prod.yml Exposes northbound port for external A2A access.
docker/.env.example Documents NORTHBOUND_EXTERNAL_URL for public Agent Card URL generation.
backend/utils/a2a_http_client.py Adds reusable aiohttp-based A2A HTTP client with retries + streaming.
backend/services/agent_version_service.py Adds optional A2A server registration during version publish and returns card info.
backend/services/agent_service.py Adds is_a2a_server in agent list by querying A2A server registrations.
backend/services/a2a_client_service.py Implements external agent discovery/management/calling + health checks.
backend/services/a2a_agent_adapter.py Adds adapter converting between A2A protocol payloads/events and internal agent execution.
backend/prompts/manager_system_prompt_template_zh.yaml Extends manager prompt to list internal vs external A2A agents separately.
backend/prompts/manager_system_prompt_template_en.yaml Extends manager prompt to list internal vs external A2A agents separately.
backend/database/db_models.py Adds SQLAlchemy models for new A2A tables.
backend/consts/model.py Adds publish_as_a2a to version publish request model.
backend/consts/exceptions.py Adds A2A-specific exception types (task not found, unsupported op).
backend/consts/const.py Adds NORTHBOUND_EXTERNAL_URL constant.
backend/consts/a2a_models.py Adds Pydantic models for A2A protocol and API request/response shapes.
backend/apps/northbound_base_app.py Adds northbound A2A endpoints: agent card, JSON-RPC, REST send/stream, task get.
backend/apps/config_app.py Registers A2A client/server routers into the main API app.
backend/apps/agent_app.py Wires publish_as_a2a through agent publish API.
backend/apps/a2a_server_app.py Adds internal A2A server management endpoints (enable/disable/settings/list).
backend/apps/a2a_client_app.py Adds A2A client endpoints for discovery/agents/relations/nacos configs.
backend/agents/create_agent_info.py Loads external sub-agents into agent config + manager prompt context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

xuyaqist and others added 23 commits April 13, 2026 15:53
… through an exception'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
… through an exception'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…时,之前会错误地使用 REST 的 url,现在会正确使用 JSON-RPC 的 url
@xuyaqist xuyaqist changed the title Feat: Add A2A protocol support for agent publishing and external agen… ✨ Feat: Add A2A protocol support for agent publishing and external agen… Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants