Implementation Plan: A2A Protocol & Semantic Kernel Integration

Integrate the Agent2Agent (A2A) protocol and Microsoft Semantic Kernel to enable SEAβ„’ agents to:

  1. Communicate externally via A2A with agents built on LangGraph, CrewAI, Google ADK, and other frameworks
  2. Orchestrate internally via Semantic Kernel for workflows, plugins, and memory integration
  3. Expose capabilities through the A2A Agent Card derived from Semantic Kernel plugins

Historical Note: IBM’s Agent Client Protocol (ACP) has been merged into A2A under the Linux Foundation as of March 2025. This plan implements A2A as the unified agent communication standard, which includes the capabilities previously specified by ACP.

Gap Closure: Semantic Kernel was identified as 🟑 High priority in docs/assets/dependency_gap_analysis.md but not yet implemented. This plan closes that gap by integrating it alongside A2A.

Provenance & Traceability

Architectural Decisions (ADRs)

ADR ID Decision Title Impact on This Plan
ADR-017 MCP-LSP Integration Architecture A2A complements MCP; MCP handles agent-to-tools, A2A handles agent-to-agent. Same security patterns apply.
ADR-032 NATS JetStream Messaging A2A events can bridge to internal JetStream for async task processing.
ADR-033 Kernel-Shell Architecture A2A gateway is a shell adapter; keeps protocol translation at the boundary.

Product Requirements (PRDs)

PRD ID Requirement Title Satisfied By (SDS) Acceptance Criteria
PRD-027 External Agent Interoperability SDS-056, SDS-057 REQ-070..REQ-078 (discovery, task delegation, streaming, memory)
PRD-020 VibesProβ„’ Foundation Platform Requirements SDS-045 FR-006 Cross-agent orchestration capability

Software Design Specifications (SDS)

SDS ID Service/Component Bounded Context SEA-DSL Spec File Implementation Status
SDS-056 A2A Protocol Gateway sea-api N/A Draft
SDS-057 Semantic Kernel Orchestration agent-runtime N/A Draft
SDS-052 Semantic Tooling & IDE Integration shared N/A Active (extends)
SDS-031 Authority & Ownership Boundaries shared N/A Active (extends)

Provenance Chain

graph TD
    ADR38[ADR-038: A2A + Semantic Kernel] --> PRD27[PRD-027: External Agent Interoperability]
    ADR17[ADR-017: MCP-LSP Integration] --> PRD27
    ADR32[ADR-032: JetStream Messaging] --> PRD27
    ADR33[ADR-033: Kernel-Shell] --> PRD27
    PRD27 --> SDS56[SDS-056: A2A Protocol Gateway]
    PRD27 --> SDS57[SDS-057: Semantic Kernel Orchestration]
    SDS56 --> SDS52[SDS-052: Semantic Tooling - Tool Surface Extension]
    SDS57 --> SDS31[SDS-031: Authority - Agent Delegation Rules]

Architecture and Design

A2A Protocol Overview

A2A (Agent2Agent) is an open standard for agent-to-agent communication:

Core Concepts:

Protocol Bindings Supported:

Relationship to MCP and Semantic Kernel:

Semantic Kernel Overview

Microsoft Semantic Kernel is an open-source SDK for building AI agents:

Core Capabilities:

Why Semantic Kernel + A2A:

Concern Semantic Kernel A2A
Scope Internal agent orchestration External agent communication
Plugin Discovery Local plugin registry Remote Agent Card discovery
Task Execution Planner + function calling Task lifecycle management
Memory Built-in memory stores Context passed via Messages
Streaming Kernel event hooks SSE / gRPC streams

Integration Strategy:

  1. SEAℒ’s Semantic Kernel plugins become A2A Agent Card β€œskills”
  2. A2A tasks are dispatched to Semantic Kernel for execution
  3. Semantic Kernel filters enforce SDS-031 governance before/after execution
  4. Memory context is shared between internal Semantic Kernel and external A2A conversations

Integration Architecture

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                            SEAβ„’ Agent Runtime                                β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                    A2A Protocol Gateway (SDS-055)                       β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”‚ β”‚
β”‚  β”‚  β”‚   A2A Server        β”‚              β”‚   A2A Client        β”‚          β”‚ β”‚
β”‚  β”‚  β”‚   (Receive Tasks)   β”‚              β”‚   (Delegate Tasks)  β”‚          β”‚ β”‚
β”‚  β”‚  β”‚                     β”‚              β”‚                     β”‚          β”‚ β”‚
β”‚  β”‚  β”‚  β€’ /agent-card      β”‚              β”‚  β€’ Task Delegation  β”‚          β”‚ β”‚
β”‚  β”‚  β”‚  β€’ /tasks (CRUD)    β”‚              β”‚  β€’ Agent Discovery  β”‚          β”‚ β”‚
β”‚  β”‚  β”‚  β€’ /messages        β”‚              β”‚  β€’ Streaming Client β”‚          β”‚ β”‚
β”‚  β”‚  β”‚  β€’ Streaming (SSE)  β”‚              β”‚                     β”‚          β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β”‚ β”‚
β”‚  β”‚           β”‚                                      β”‚                      β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚              β”‚                                      β”‚                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                    Agent Task Router (Kernel)                            β”‚ β”‚
β”‚  β”‚  β€’ Maps A2A tasks to internal commands/queries                          β”‚ β”‚
β”‚  β”‚  β€’ Enforces HITL escalation (SDS-031 Β§7)                                β”‚ β”‚
β”‚  β”‚  β€’ Manages task lifecycle                                                β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚              β”‚                                      β”‚                        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  MCP Tool Surface (SDS-052)    β”‚    β”‚  JetStream (SDS-047)           β”‚   β”‚
β”‚  β”‚  (Execute local capabilities)  β”‚    β”‚  (Async event processing)       β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

                              External Agents
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  πŸ€– Remote Agent 1 (LangGraph)   β”‚
                    β”‚  πŸ€– Remote Agent 2 (CrewAI)      β”‚
                    β”‚  πŸ€– Remote Agent 3 (Custom)      β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Design Principles Applied

Dependency Justification

A2A Protocol Dependencies

Dependency Type Version Package Justification ADR/SDS Reference
a2a-python Python Library latest a2a Official A2A SDK for Python server/client SDS-055
a2a-js Node Library latest @a2a/sdk TypeScript A2A client for Zed/VS Code integration SDS-055

Semantic Kernel Dependencies

Dependency Type Version Package Justification ADR/SDS Reference
semantic-kernel Python Library 1.x semantic-kernel Agent orchestration, plugin system, memory integration ADR-009, SDS-040
semantic-kernel-connectors Python Library 1.x semantic-kernel[all] LLM connectors (OpenAI, Ollama, etc.) SDS-040
semantic-kernel .NET Library 1.x Microsoft.SemanticKernel Optional: C# implementation for Azure deployments SDS-040

Installation Commands

1
2
3
4
5
6
7
8
# Python (for FastAPI A2A server + Semantic Kernel)
pip install a2a semantic-kernel[all]

# Node.js (for VS Code extension A2A client)
pnpm add @a2a/sdk

# Optional: .NET SDK for Azure deployments
# dotnet add package Microsoft.SemanticKernel

Expected Filetree

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/
β”œβ”€β”€ schemas/a2a/
β”‚   β”œβ”€β”€ agent-card.schema.json           # SEAβ„’ Agent Card JSON schema
β”‚   β”œβ”€β”€ task-request.schema.json         # Validated task request format
β”‚   └── artifact-envelope.schema.json    # Output artifact wrapper
β”œβ”€β”€ docs/specs/shared/
β”‚   β”œβ”€β”€ adr/038-a2a-protocol-integration.md
β”‚   β”œβ”€β”€ prd/026-external-agent-interoperability.md
β”‚   └── sds/055-a2a-protocol-gateway.sds.yaml
β”œβ”€β”€ libs/sea/adapters/a2a/
β”‚   └── src/
β”‚       β”œβ”€β”€ a2a-server.adapter.py        # FastAPI A2A server
β”‚       β”œβ”€β”€ a2a-client.adapter.py        # A2A client for delegation
β”‚       β”œβ”€β”€ agent-card.py                # Agent Card generator
β”‚       └── task-router.py               # A2A task β†’ kernel command router
β”œβ”€β”€ libs/sea/adapters/semantic-kernel/
β”‚   └── src/
β”‚       β”œβ”€β”€ kernel-factory.py            # Semantic Kernel builder
β”‚       β”œβ”€β”€ plugins/                     # SEAβ„’ capability plugins
β”‚       β”‚   β”œβ”€β”€ semantic_analysis.py     # Code/spec analysis plugin
β”‚       β”‚   β”œβ”€β”€ artifact_generation.py   # CADSL/diagram generation
β”‚       β”‚   └── governance_check.py      # Policy enforcement plugin
β”‚       β”œβ”€β”€ memory/                      # Memory adapters
β”‚       β”‚   └── pgvector-memory.py       # PostgreSQL vector memory
β”‚       └── filters/                     # Governance filters
β”‚           β”œβ”€β”€ hitl-filter.py           # HITL escalation filter
β”‚           └── audit-filter.py          # Audit logging filter
└── apps/sea-api/
    └── src/
        └── routes/a2a/                  # A2A HTTP routes
            β”œβ”€β”€ agent_card.py            # /.well-known/agent.json
            β”œβ”€β”€ tasks.py                 # /tasks CRUD
            └── messages.py              # /tasks/{id}/messages

Proposed Cycles

Cycle Branch Wave Files Modified Files Created Specs Implemented
C1A cycle/p027-c1a-adr-prd-sds 1 β€” docs/specs/shared/adr/038-*, prd/026-*, sds/055-*, sds/056-* ADR + PRD + SDS foundation (A2A + SK)
C1B cycle/p027-c1b-agent-card 1 docs/specs/shared/sds/055-* schemas/a2a/*, Agent Card generator Agent Card + discovery
C1C cycle/p027-c1c-sk-kernel 1 β€” libs/sea/adapters/semantic-kernel/src/* Semantic Kernel factory + base config
C2A cycle/p027-c2a-sk-plugins 2 β€” libs/sea/adapters/semantic-kernel/src/plugins/* Core SK plugins (analysis, generation)
C2B cycle/p027-c2b-sk-filters 2 docs/specs/shared/sds/031-* libs/sea/adapters/semantic-kernel/src/filters/* HITL + audit filters
C2C cycle/p027-c2c-sk-memory 2 β€” libs/sea/adapters/semantic-kernel/src/memory/* pgvector memory adapter
C3A cycle/p027-c3a-a2a-server 3 β€” libs/sea/adapters/a2a/src/* A2A Server adapter (receive tasks)
C3B cycle/p027-c3b-a2a-sk-bridge 3 — A2A→SK task router Bridge A2A tasks to SK execution
C4A cycle/p027-c4a-a2a-client 4 β€” A2A client adapter Task delegation to external agents
C4B cycle/p027-c4b-streaming 4 β€” SSE streaming endpoints Real-time task updates
C5A cycle/p027-c5a-push-notifications 5 docs/specs/shared/sds/047-* Webhook integration Async push notifications

Task Breakdown

Wave 1: Specification Foundation (Parallel)

Wave 2: Semantic Kernel Core (Depends on Wave 1)

Wave 3: A2A Server + Bridge (Depends on Wave 2)

Wave 4: A2A Client & Streaming (Depends on Wave 3)

Wave 5: Async & Production Ready (Depends on Wave 4)


Validation & Verification

Spec Validation

Implementation Validation

A2A Protocol:

Semantic Kernel:

Integration Tests

1
2
3
4
5
6
7
8
9
10
# Test A2A server with reference client
a2a-test-client --server http://localhost:8000 --test-suite basic

# Verify Agent Card discovery
curl http://localhost:8000/.well-known/agent.json | jq

# Send test task
curl -X POST http://localhost:8000/tasks \
  -H "Content-Type: application/json" \
  -d '{"message": {"role": "user", "parts": [{"text": "Analyze this code"}]}}'

Open Questions

# Question Resolution
1 Which protocol binding for MVP: JSON-RPC or REST? βœ… REST β€” User confirmed (simpler, matches existing FastAPI patterns)
2 Should SEAβ„’ agents auto-discover external agents, or require manual registration? βœ… Auto-discovery β€” User confirmed
3 How to map A2A task IDs to IFL attestations? Emit ifl:hash:<taskId> on task completion
4 Which agent frameworks to test interop with? LangGraph, CrewAI, Google ADK, Semantic Kernel
5 Semantic Kernel Python vs .NET SDK? βœ… Python β€” User confirmed

Risks & Mitigation

Risk Likelihood Impact Mitigation Strategy
A2A spec is still draft (v1.0) and may change Medium Medium Pin to specific spec version; abstract protocol binding layer
External agents may not comply with HITL expectations High High Validate all incoming tasks; reject if required approval missing
Streaming connections exhaust resources Medium Medium Connection pooling + max concurrent streams limit
Agent Card capabilities diverge from actual MCP tools Medium High Generate Agent Card from MCP tool registry (single source of truth)

Rollback Strategy

  1. Disable A2A Gateway: Remove routes without affecting MCP or internal functionality.
  2. Disable Delegation: Keep A2A server active but reject outbound client calls.

Linked Specifications

Type ID/Doc Document
ADR ADR-017 docs/specs/shared/adr/017-mcp-lsp-integration-architecture.md
ADR ADR-032 docs/specs/shared/adr/032-nats-jetstream-messaging.md
ADR ADR-033 docs/specs/shared/adr/033-kernel-shell-architecture.md
SDS SDS-031 docs/specs/shared/sds/031-authority-ownership-boundaries.md
SDS SDS-047 docs/specs/shared/sds/047-messaging-infrastructure.md
SDS SDS-052 docs/specs/shared/sds/052-semantic-tooling-ide-integration.sds.yaml

External References

Reference URL
A2A Protocol Specification https://a2a-protocol.org/latest/specification/
A2A Python SDK https://github.com/a2aproject/a2a-python
A2A JavaScript SDK https://github.com/a2aproject/a2a-js
A2A Sample Implementations https://github.com/a2aproject/a2a-samples
Semantic Kernel Python SDK https://github.com/microsoft/semantic-kernel
Semantic Kernel Documentation https://learn.microsoft.com/en-us/semantic-kernel/
Semantic Kernel Plugins Guide https://learn.microsoft.com/en-us/semantic-kernel/concepts/plugins/

User Review Required

[!IMPORTANT] Design Decision Required: This plan proposes REST as the MVP protocol binding. If you prefer JSON-RPC 2.0 (more aligned with MCP conventions) or gRPC (better streaming performance), please indicate before C2A begins.

[!WARNING] Breaking Change Consideration: Enabling the A2A Server allows external agents to invoke SEAβ„’ capabilities. All incoming tasks will require HITL approval for mutating operations per SDS-031. Ensure appropriate approver availability before enabling in production.