Docs_archive
A2A integration
Source docs/A2A_INTEGRATION.md · All_docs
The control panel (app/) imports @hive/a2a-sdk (file:../packages/a2a-sdk) and exposes an embedded A2A entry point (JSON-RPC + SSE + Agent Card). The app retains auth, Postgres, agents, and REST API; the SDK handles the A2A protocol (see packages/a2a-sdk/docs/ARCHITECTURE.md).
Shipped Status (Phases A + B)
Detailed variables: .env.example, audit/circuit breaker limits: A2A_OPS_AUDIT.md.
Build & dev (Next 16)
npm run devandnpm run builduse Webpack (--webpack). The Next 16 default is Turbopack, which does not correctly resolvefile:packages (npm symlink/junction to../packages/a2a-sdk) — issue observed on Windows, possibly also on Linux with the same link type.@hive/a2a-sdkis inserverExternalPackagesinapp/next.config.ts(do not also add it totranspilePackages— Next error).
Same OS / same process
The UI, REST API, auth, and A2A all run in a single Node process (Next). There is no separate A2A microservice: suitable for an "all on one machine" deployment or a single container; see multi-instance limitations in A2A_OPS_AUDIT.md.
Target Goal (next steps)
Refine Agent Card, the task executor (beyond the stub), and the agent-to-agent mesh; task persistence and quotas already go through Redis.
Architecture Directions (Phases C+)
Phase A — Dependency and build (done)
Add— done (@hive/a2a-sdkfile:+prebuild).- CI sdk — see
.github/workflows/ci.yml.
Phase B — Embedded A2A server (done — Route Handler option)
- Sidecar option (Express): still possible if you want to isolate the process.
- Next option (chosen): Node Route Handlers + JSON-RPC adapter aligned with the SDK.
Constraints: Node.js runtime for these routes; no Edge on /api/a2a/*.
Phase C — Identity and policy (in progress)
- JSON-RPC RBAC:
A2A_JSONRPC_MIN_ROLE(viewer|operator|admin, defaultviewer) onPOST /api/a2a/jsonrpc— documented inPRODUCTION.md§10. - A2A ↔ Hive identity:
User.userName= user UUID, email, orhive-internal; exposed inGET /api/a2a/statusandmesh.a2a.rpc.requestlogs (jsonRpcId= correlation). - Platform keys:
A2A_SIGNING_SECRET_KEY_HEX/A2A_NOISE_STATIC_SECRET_KEY_HEX(instance) — per Firecracker agent keys (DB / volume / HSM): to be wired when the A2A executor calls real agents.
Phase D — Mesh client
- Agents running in microVMs can embed
HiveA2AClientto talk to other agents; the Hive app remains the orchestrator (lifecycle, network, secrets).
What remains intentionally out of scope here
- Protobuf gRPC details (already in the SDK).
- Replacing internal REST routes with A2A (product migration, not a technical requirement).
Tracking
The paths and URLs above are up to date for the embedded integration. Local mesh: MESH_V1_DONE.md. WAN mesh: MESH_V2_GLOBAL.md. Planetary target: P1–P6 traceability, P1 directory, P2 gateway.