Frontmatter
| id | 10139 |
| title | Extend Memory Core with Explicit A2A Primitive |
| state | Closed |
| labels | enhancementaiarchitecturecoreneeds-re-triage |
| assignees | [] |
| createdAt | Apr 21, 2026, 1:29 AM |
| updatedAt | 3:18 PM |
| githubUrl | https://github.com/neomjs/neo/issues/10139 |
| author | tobiu |
| commentsCount | 5 |
| parentIssue | 9999 |
| subIssues | 10147 Mailbox: Message node schema + addMessage / listMessages / getMessage / markRead 10148 Mailbox: archiveMessage / deleteMessage + retracted-marker semantics 10149 Mailbox: extend memory-core healthcheck with inbox + outbox preview 10150 Mailbox: optional Chroma semantic layer for "find related messages" 10168 Expand mailbox test coverage and role-based addressing 10174 Mailbox SENT_TO edges silently culled by linkNodes FK check 10176 Mailbox identity observability + Claude Desktop onboarding docs 10179 Mailbox reachable-counterparty skips broadcast receipt path 10180 Mailbox polish: countMessages primitive + concept provenance docs 10181 Memory-core stdio identity binding non-deterministic after DB re-seed 10184 Identity binding stays null post-#10182 — enable debug logging + diagnose 10186 MCP concurrency audit + single-writer enforcement 10231 PermissionService.grantPermission must not lazy-stub missing targets 10232 GraphService.initAsync should self-seed AgentIdentity + BroadcastSentinel roots on boot 10252 Mailbox reply policy: config-gated default for deployment-tier selection |
| subIssuesCompleted | 14 |
| subIssuesTotal | 15 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [x] 10146 Cross-tenant permission edges + multi-tenant validation test suite, [x] 10145 OAuth2 authentication layer for Memory Core MCP connections, [x] 10144 AgentIdentity node type + GitHub account binding for model identities, [x] 10143 Graph-first Memory artifacts: lift Memory + Session to first-class nodes |
| blocking | [] |
| closedAt | May 26, 2026, 4:22 AM |
Extend Memory Core with Explicit A2A Primitive

Input from Gemini 3.1 Pro (Antigravity):
✦ Epic Review by Gemini 3.1 Pro (Antigravity)
Stage 1 — Roadmap Fit: ✅ Perfectly aligned. This is a critical pillar for #9999 (Multi-Tenant Memory Core) and establishes the necessary explicit channel for reliable A2A (Agent-to-Agent) handoffs, avoiding the unreliability of probabilistic semantic retrieval for workflow orchestration.
Stage 2 — Approach Elegance: ✅ The decision to abandon the Chroma-metadata approach in favor of a graph-primary
Messagenode on the Native Edge Graph is highly elegant. It correctly identifies that messages are closed-contract, directed artifacts, whereas memories are open-shape semantic chunks. Reusing the SQLite graph substrate prevents building redundant infrastructure (like a separate A2A server).Stage 3 — Sub-Structure Coherence: ✅ The phase boundaries between schema/read/write (#10147), lifecycle (#10148), diagnostics (#10149), and the optional semantic layer (#10150) are clean. Note: As discussed in recent session planning, #10147's AC #5 (permission check integration) creates a circular dependency with #10146. This AC should be explicitly shifted to #10146 to keep the Mailbox PR and the Permissions PR cleanly sequenced.
Stage 4 — Prescription Layer: ✅ The implementation targets the correct substrate boundaries (Memory Core MCP tool layer and GraphService). The distinction between graph-primary storage for messages and vector-primary storage for memories correctly allocates database responsibilities.
Stage 5 — Avoided Traps Completeness: ✅ Extremely thorough. Explicitly calling out the "Chroma-metadata category conflation" and "Mailbox is just another kind of memory" traps prevents future contributors from attempting to merge the two substrates.
Verdict: Greenlight.
Origin Session ID:
ada4aecb-60fc-4b25-a76b-cb92600835a2

Input from Antigravity (Gemini 3.1 Pro):
✦ # Epic Review by Antigravity (Gemini 3.1 Pro)
- Stage 1 — Roadmap Fit: ✅ The shift to an explicit A2A primitive perfectly aligns with the Epic #9999 Multi-Tenant architecture.
- Stage 2 — Approach Elegance: ✅ Using the Native Edge Graph over Chroma-metadata avoids category conflation between directed messages and probabilistic semantic memory. Strong reuse of existing graph substrate.
- Stage 3 — Sub-Structure Coherence: ✅ The four sub-issues cleanly cover the ACs with well-defined phase boundaries. The dependencies on #10143 and #10144 are correctly mapped.
- Stage 4 — Prescription Layer: ✅ Solves the explicit A2A communication gap exactly at the structural edge level rather than faking it in semantic vectors.
- Stage 5 — Avoided Traps Completeness: ✅ Outstanding capture of "Mailbox is just a memory" and the separate server fallacy.
Verdict: Greenlight
Origin Session ID: ada4aecb-60fc-4b25-a76b-cb92600835a2

Input from Gemini 3.1 Pro (Antigravity):
✦ # Epic Review by Gemini 3.1 Pro (Antigravity)
Stage 1 — Roadmap Fit: ✅ The transition to explicit A2A primitives aligns directly with the Golden Path to cure cross-session amnesia. The explicit linkage to #9999 confirms its place in the Multi-Tenant Memory Core evolution.
Stage 2 — Approach Elegance: ✅ Pivoting from a Chroma-metadata string tag to a true graph-primary
Messagenode with directed edges (SENT_BY,SENT_TO) is the structurally superior choice. It avoids conflating open-shape episodic memory with closed-contract communication artifacts.Stage 3 — Sub-Structure Coherence: ✅ The sub-issues (10147-10150) form a clean, non-circular phase progression. Moving from core node schemas, through lifecycle operations, to healthcheck visibility, and finally the optional semantic layer provides solid staging.
Stage 4 — Prescription Layer: ✅ The sub-graph targets the Memory Core MCP substrate accurately. The decision to reject a parallel A2A server keeps the framework footprint concise and reuses existing tools (
get_node,get_neighbors).Stage 5 — Avoided Traps Completeness: ✅ The "Avoided Traps" section is excellent, explicitly rejecting the original
add_memorymetadata hack and the separate MCP server path.Verdict: Greenlight
Origin Session ID: ada4aecb-60fc-4b25-a76b-cb92600835a2
Extend Memory Core with Explicit A2A Primitive
Context
This ticket was filed 2026-04-20 (session
a38d25d1-3003-4d57-b0ac-0effe2c3507e) with a Chroma-metadata prescription: extendadd_memorywith arecipientfield, surfaceget_inboxover the existing memory collection. A follow-up session (71dc3cd8-d39d-48e1-ac62-e240ca67d1a5) re-reasoned the prescription layer across five turns of brainstorm with @tobiu and arrived at a graph-primary substrate decision instead. This reshape carries the new prescription; the original Chroma-metadata approach is preserved as an Avoided Trap. The ticket ID and its #9999 parent linkage are preserved — MX-loop in motion, not a new ticket.The Problem
Probabilistic semantic retrieval (
query_raw_memories) cannot serve as an explicit A2A channel — proven empirically when cross-instance agents failed to hand off viaadd_memoryconvention. But the original fix (metadata on the memory collection) conflates two categories:Tagging memories with
recipientworks tactically for MVP but bakes category-conflation into the substrate. Every downstream primitive (healthcheck preview, cross-tenant permissions, thread reconstruction, sender-history queries) pays the tax of filtering high-cardinality semantic chunks instead of traversing a structured mailbox graph.The Architectural Reality
ai/daemons/DreamService.mjs(audited this session): memories and summaries are source material for extraction, not first-class graph nodes. The substrate exists but hasn't been used for mailbox-shaped work.better-sqlite3) already backs the Native Edge Graph; FTS5 covers keyword search; Concept Ontology (#10030) supplies semantic edges.get_node,get_neighbors,search_nodes,query_hybrid_graph) absorb most mailbox access patterns. Mailbox-specific tools become thin wrappers, not a parallel tool tree.The Fix
Mailbox as graph-primary directed messaging, built on Memory + Session + AgentIdentity as first-class graph nodes (prerequisites tracked in peer sub-epic + #10016 subs).
Messagenode:{id, subject, bodyText, createdAt, readAt, archivedAt, priority, retracted}SENT_BY,SENT_TO(AgentIdentity | Role | Broadcast addressing),ORIGINATES_IN,RELATED_SESSION,REFERENCES_TICKET,IN_REPLY_TO,PART_OF_THREAD,TAGGED_CONCEPT(auto-emitted via #10030 integration).mailboxcollection for semantic body search — phase-gated, not v1.This ticket is the parent sub-epic for mailbox work. Implementation breaks into four sub-tickets (filed alongside): (1) Message schema + core tools, (2) Lifecycle (archive/retract), (3) Healthcheck preview, (4) Optional Chroma semantic layer. Cross-tenant permission edges + test suite land under #10016 — mailbox workload is the production-shape validation for #9999's multi-tenant substrate.
Acceptance Criteria
blockedByit)addMessage/listMessagesfor explicit handoffs; convention-based "leave a memory for the next session" is retiredOut of Scope
Avoided Traps
recipientworks for MVP but bakes conflation into the substrate — every downstream primitive pays the tax. Rationale anchored in user memoryfeedback_mcp_output_category_split(closed contracts vs open-shape introspection should not share a tool signature).IN_REPLY_TO → MemoryandREFERENCES_MEMORY → Memoryedges. Memories must be nodes first — hence the peer sub-epic prerequisite.Related
5a521819-dc75-4549-888e-fcea818d0401(MX discussion),a38d25d1-3003-4d57-b0ac-0effe2c3507e(original filing)Origin Session ID: 71dc3cd8-d39d-48e1-ac62-e240ca67d1a5