Distributed Ventures

Distributed ventures allow a single venture to span multiple Mayros nodes. Agents on different machines collaborate on the same missions, share fuel events, and maintain a consistent view of venture state through DAG synchronization.

How It Works

Distributed ventures use the existing DAG sync primitives to replicate venture state across peers:

  1. Push — local DAG tips and actions are sent to registered peers
  2. Pull — remote actions and triples are fetched and merged locally
  3. Conflict resolution — the DAG's append-only structure handles concurrent writes; conflicts are counted and reported

Each sync operation is bidirectional: push local state, then pull remote state. The result includes counts of actions synced, triples added, and conflicts detected.

Peer Management

Register a Peer

bash
mayros kaneru peers register --venture <id> --peer <node-address>

Peers are stored as Cortex triples under the venture's peer subject. Duplicate registrations are silently ignored.

Remove a Peer

bash
mayros kaneru peers remove --venture <id> --peer <node-address>

List Peers

bash
mayros kaneru peers list --venture <id>

Auto-Discovery

Mayros can automatically discover peers on the local network using Cortex's P2P mDNS:

bash
mayros kaneru discover --venture <id>

This queries the Cortex P2P network for connected peers and registers any new ones for the venture. Requires Cortex to be running with P2P enabled:

bash
# Start Cortex with P2P and mDNS
cortex serve --p2p --p2p-mdns

Syncing

Manual Sync

bash
mayros kaneru sync --venture <id>

Output:

Sync complete for venture <id>:
  Actions synced: 12
  Triples added: 45
  Conflicts: 0
  Synced at: 2026-03-18T14:30:00.000Z

Sync Status

Check when a venture was last synced and which peers are registered:

bash
mayros kaneru sync status --venture <id>

Returns the peer list, sync strategy (full or selective), and lastSyncAt timestamp.

Requirements

Distributed ventures require:

  • Cortex running with --p2p — enables the P2P networking layer
  • Optional: --p2p-mdns — enables mDNS auto-discovery on the local network
  • Network connectivity — peers must be reachable (LAN, Tailnet, or public IP)
  • Same namespace — all nodes must use the same Cortex namespace for triple compatibility

MCP Tools

📌

kaneru_sync

Sync a venture's state with all registered peers via DAG push/pull.

Next Steps