Implementation Plan: Platform UI Integration

Implement blackbox UI shells (Zed IDE, LibreChat) with multi-protocol support: OpenAI-compatible endpoints, LSP, ACP (Agent Client Protocol), and A2A (Agent-to-Agent) integration. Leverages Semantic Kernel for AI orchestration and integrates seamlessly with the Agent Society runtime.

Provenance & Traceability

Architectural Decisions (ADRs)

ADR ID Decision Title Impact on This Plan
ADR-033 Kernel-Shell Architecture UI shells are blackbox clients.
ADR-017 MCP-LSP Integration LSP/MCP exposed safely (SDS-052).
ADR-038 A2A-SK Integration A2A protocol for agent interop (P027).

Product Requirements (PRDs)

PRD ID Requirement Title Satisfied By (SDS) Acceptance Criteria
PRD-023 SEA™ Platform Integration SDS-048 REQ-063, REQ-064
PRD-027 External Agent Interoperability SDS-056 REQ-070..REQ-076

Software Design Specifications (SDS)

SDS ID Service/Component Bounded Context Status
SDS-048 Platform UI Integration Service sea-api Done ✅
SDS-052 Semantic Tooling & IDE Integration shared Draft
SDS-056 A2A Protocol Gateway shared Done ✅
SDS-031 Authority & Ownership Boundaries shared Draft

Architecture and Design

Multi-Protocol Integration Strategy

graph TB
    subgraph "UI Shells (Blackbox)"
        ZED[Zed IDE<br/>ACP Protocol]
        LIBRE[LibreChat<br/>OpenAI API]
        VSCODE[VS Code<br/>LSP/MCP]
    end

    subgraph "SEA™ Protocol Layer"
        ACP_GW[ACP Gateway]
        A2A_SRV[A2A Server]
        OPENAI[OpenAI Facade]
        LSP[LSP Server]
    end

    subgraph "SEA™ Core"
        SK[Semantic Kernel]
        AGENTS[Agent Society<br/>Registry + HITL]
        ROUTER[Task Router]
    end

    ZED --> ACP_GW
    LIBRE --> OPENAI
    VSCODE --> LSP

    ACP_GW --> ROUTER
    A2A_SRV --> ROUTER
    OPENAI --> SK
    LSP --> SK

    ROUTER --> SK
    ROUTER --> AGENTS
    SK --> AGENTS

Protocol Responsibilities

Protocol Purpose Shell Implementation
ACP Agent-to-Editor Zed IDE libs/sea/adapters/acp/
A2A Agent-to-Agent External agents libs/sea/adapters/a2a/
OpenAI Chat completions LibreChat services/a2a/src/api/
LSP/MCP Code intelligence VS Code apps/sea-lsp/

Agent Society Synergy (P015)

Integration with the Agent Society Runtime enables:

  1. Agent Registry - All IDE-connected agents registered in .github/agents/**
  2. HITL Escalation - Privileged IDE actions require human approval (SDS-031)
  3. Audit Trail - All agent actions logged with correlation IDs
  4. Tool Surface Control - Deny-by-default tool exposure (SDS-052)

Design Principles Applied


Dependency Justification

8.1 Cognitive Artifact Rendering

Dependency Type Version Justification
socket.io Node 4.x Push artifact updates via WebSocket (SDS-038).
Radix UI React 1.x Accessible UI primitives.
CopilotKit React 1.x Chat UI for LibreChat shell.

8.2 Protocol Integration

Dependency Type Version Justification
semantic-kernel Python 1.x AI orchestration with plugins (P027).
httpx Python 0.x Async HTTP for A2A client.
LSP Server Node 9.x SEA-DSL language server (SDS-052).
MCP SDK Node 0.x Expose LSP to AI agents.

Proposed Cycles

Cycle Branch Wave Description
C1A cycle/p024-c1a-openai-facade 1 OpenAI-compatible /v1/chat/completions for LibreChat
C1B cycle/p024-c1b-editor-actions 1 Editor action endpoints /api/v1/actions/*
C2A cycle/p024-c2a-acp-gateway 2 ACP Gateway for Zed IDE integration
C2B cycle/p024-c2b-a2a-bridge 2 Connect A2A server to UI shells
C3A cycle/p024-c3a-librechat-shell 3 LibreChat shell with SK backend
C3B cycle/p024-c3b-agent-society-wire 3 Wire Agent Society registry + HITL

Task Breakdown

Wave 1: OpenAI Facade & Editor Actions (Parallel)

Wave 2: ACP & A2A Integration (Depends on Wave 1)

Wave 3: LibreChat & Agent Society (Depends on Wave 2)


Validation & Verification

Spec Validation

Implementation Validation


Open Questions

  1. Which HTTP framework is canonical for sea-api? → FastAPI (per P027)
  2. Is LSP a separate process? → LSP handler in API
  3. NEW: What ACP version does Zed require? → Research needed

Risks & Mitigation

Risk Likelihood Impact Mitigation
UI shells become stateful Medium High Enforce stateless policies (POL-048-003).
Protocol drift with OpenAI Medium Medium Pin version; add contract tests.
ACP spec changes in Zed Medium Medium Abstract ACP adapter; version lock.

Type ID/Doc Document
ADR ADR-033 docs/specs/shared/adr/033-kernel-shell-architecture.md
ADR ADR-017 docs/specs/shared/adr/017-mcp-lsp-integration-architecture.md
ADR ADR-038 docs/specs/shared/adr/038-a2a-semantic-kernel-integration.md
PRD PRD-023 docs/specs/shared/prd/023-sea-platform-integration.md
PRD PRD-027 docs/specs/shared/prd/027-external-agent-interoperability.md
SDS SDS-048 docs/specs/shared/sds/048-platform-ui-integration.md
SDS SDS-052 docs/specs/shared/sds/052-semantic-tooling-ide-integration.md
SDS SDS-056 docs/specs/shared/sds/056-a2a-protocol-gateway.sds.yaml
Plan P015 Agent Society Runtime
Plan P023 Case Management (future synergy)
Plan P027 A2A Protocol & Semantic Kernel Integration

Future Synergy: P023 (Case Management) will enable case-based routing of IDE tasks, allowing agent interactions to create/update cases and leverage case context for richer completions.