Read the source code of your memory.
Galaxy Merge
Combine Galaxies with entity reconciliation, Sun negotiation, and conflict detection.
Galaxy Merge combines knowledge from separate Galaxies into one — useful when consolidating team knowledge, merging personal and work contexts, or onboarding a new team member's Galaxy into a shared one.
The merge workflow
Merge is a multi-step process with review checkpoints at each stage. Nothing is irreversible until you call execute.
# 1. Propose — creates a merge proposal, no data moves yet
curl -X POST http://localhost:8000/api/v1/merge/propose \
-d '{"target_galaxy_id": "g-789"}'
# 2. Review entity mappings — see how entities will be reconciled
curl http://localhost:8000/api/v1/merge/{id}/entity-mappings
# 3. Review merged Sun — see how steering documents will combine
curl http://localhost:8000/api/v1/merge/{id}/sun-preview
# 4. Accept — lock in the merge plan
curl -X POST http://localhost:8000/api/v1/merge/{id}/accept
# 5. Execute — perform the merge (entity reconciliation, data migration)
curl -X POST http://localhost:8000/api/v1/merge/{id}/execute
Reject at any point with
POST /merge/{id}/reject. No data has moved untilexecute.
Entity reconciliation
During merge, entities from both Galaxies are matched by name. Matched entities have their relationships, backlinks, and mention counts combined. The entity mapping preview (step 2) lets you review and adjust matches before executing.
Entities that exist in only one Galaxy are created in the merged Galaxy as-is.
Sun negotiation
When both Galaxies have Sun documents, the merge preview shows a combined Sun. Identity sections are concatenated, values are merged (duplicates removed), and agent protocols are combined with the target Galaxy's rules taking precedence.
Review the preview carefully — the Sun defines how every agent in the merged Galaxy will behave.
Gravity Bridges
Merge automatically creates Gravity Bridges between Planets from different source Galaxies. This enables cross-domain knowledge flow: a search in the source Galaxy's Engineering planet can surface relevant records from the target Galaxy's Engineering planet.
RBAC still applies — users need access to both Planets to traverse a bridge.
Conflict handling
When both Galaxies contain stardust about the same topic with conflicting information, both records are preserved and flagged as contradictions. Use the contradiction resolution API to resolve them:
- Supersede — one record wins, the other gets
valid_untilset - Coexist — both are valid in different contexts
- Synthesize — merge into a new record that captures both perspectives