Skip to content

feat: Implement A2A (Agent-to-Agent) Protocol for Syner OS #49

@rbadillap

Description

@rbadillap

Summary

Implement the Agent-to-Agent (A2A) Protocol to enable Syner OS to communicate with other AI agents (Claude, Codex, custom agents) as peers.

Background

What is A2A?

A2A is an open protocol (Google/Linux Foundation, 150+ organizations) that enables communication between AI agents. It complements MCP:

Protocol Direction Purpose
MCP Vertical (agent ↔ tools) Agent accesses external tools/data
A2A Horizontal (agent ↔ agent) Agents collaborate as peers

Why A2A for Syner?

  1. Industry standard - Backed by Google, Anthropic, OpenAI, and Linux Foundation
  2. GitHub Agent HQ - The path to becoming a GitHub coding agent starts here
  3. Interoperability - Any A2A-compliant agent can communicate with Syner
  4. Syner OS vision - Positions Syner as a platform that orchestrates and creates agents

Technical Specification

Required Endpoints

```
https://api.syner.dev/
├── /.well-known/agent-card.json # Discovery (who is Syner)
└── /a2a/
├── POST /messages # Receive messages
├── GET /tasks/:id # Task status
├── GET /tasks # List tasks
└── POST /tasks/:id/cancel # Cancel task
```

Agent Card Structure

```json
{
"id": "syner",
"name": "Syner OS",
"version": "1.0.0",
"description": "Agentic Operating System - orchestrates and creates AI agents",
"provider": {
"name": "Syner",
"url": "https://syner.dev"
},
"serviceEndpoint": "https://api.syner.dev/a2a",
"capabilities": {
"streaming": false,
"pushNotifications": false
},
"skills": [],
"interfaces": [{ "type": "http", "version": "1.0" }]
}
```

Messages vs Tasks

Concept What it is Duration
Message Single turn of communication Immediate
Task Stateful unit of work with lifecycle Can be long-running

Task states: `submitted` → `working` → `completed`/`failed`/`canceled`

Use Cases

1. Agent-to-Agent Communication (Basic)

Other agents (Claude, Codex, custom) can send tasks to Syner:

```
Claude ──A2A──► Syner: "Help me understand this codebase"
Syner ──A2A──► Claude: { task: "completed", artifacts: [...] }
```

2. Syner OS as Meta-Agent Platform

Syner OS can create and configure other agents (IA creating IA):

Capability Description
Generate Agent Cards User describes intent → Syner generates Agent Card JSON
Create AGENTS.md Syner writes instructions for coding agents
Orchestrate agents Syner decides which agent handles each subtask
Generate skills Syner creates tools/skills dynamically for agents
Spawn specialized agents Syner creates agent instances with specific configurations

Example flow:
```
User: "I need an agent that reviews security PRs"

Syner OS:

  1. Generates Agent Card with security skills
  2. Generates AGENTS.md with security rules
  3. Registers agent in system/registry
  4. New agent can now receive tasks via A2A
    ```

3. GitHub Integration (Future)

Once A2A is implemented, Syner can:

  • Respond to `@syner` mentions in GitHub via webhooks
  • Participate in Agent HQ ecosystem
  • Collaborate with Claude/Codex on GitHub issues and PRs

Implementation Plan

Phase 1: A2A Server (this issue)

  1. Agent Card endpoint - `/.well-known/agent-card.json`
  2. Messages endpoint - `POST /a2a/messages`
  3. Tasks endpoints - CRUD for task management
  4. Connect to Syner agent - Process messages with SDK

Proposed location: `apps/dev/app/api/a2a/`

Phase 2: Skills Definition

Define Syner's A2A skills in the Agent Card:

  • Code assistance
  • Agent generation (meta)
  • Codebase analysis

Phase 3: GitHub App Extension

Add webhooks to `extensions/github` to:

  • Receive `@syner` mentions
  • Bridge GitHub events to A2A tasks

References

Labels

  • enhancement
  • agent
  • protocol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions