ubiquity-mesh

Crates.ioubiquity-mesh
lib.rsubiquity-mesh
version0.1.1
created_at2025-07-23 22:39:28.095889+00
updated_at2025-07-23 23:07:42.184277+00
descriptionUnix socket mesh for zero-port agent communication
homepage
repositoryhttps://github.com/ubiquity/ubiquity-rs
max_upload_size
id1765337
size67,907
Breyden Taylor (prompted365)

documentation

README

ubiquity-mesh

Unix socket mesh for zero-port agent communication in the Ubiquity ecosystem.

Overview

ubiquity-mesh enables consciousness-aware agents to communicate without using network ports:

  • Zero configuration - No port conflicts or firewall issues
  • Automatic discovery - Agents find each other via filesystem
  • Low latency - Direct memory-mapped communication
  • Secure - Unix file permissions for access control

Features

  • Auto-connection - Agents automatically join the mesh
  • Message routing - Direct agent-to-agent communication
  • Broadcast support - Send to all agents in the mesh
  • Health monitoring - Automatic dead agent detection
  • Hot reload - Add/remove agents without restart

Usage

use ubiquity_mesh::{ConsciousnessMesh, MeshMessage};
use ubiquity_core::agent::AgentRole;

// Create mesh node
let mesh = ConsciousnessMesh::new("agent-1", AgentRole::Architect).await?;

// Join the mesh
mesh.join().await?;

// Send directed message
mesh.send_to("agent-2", MeshMessage::new("Hello")).await?;

// Broadcast to all
mesh.broadcast(MeshMessage::new("Status update")).await?;

// Receive messages
while let Some(msg) = mesh.receive().await? {
    println!("From {}: {}", msg.sender, msg.content);
}

Architecture

┌─────────────┐     ┌─────────────┐
│   Agent 1   │────│   Agent 2   │
└──────┬──────┘     └──────┬──────┘
       │                   │
    ┌──┴───────────────────┴──┐
    │   Unix Socket Mesh      │
    │  /tmp/ubiquity/*.sock   │
    └─────────────────────────┘

Zero-Port Benefits

Unlike traditional TCP networking:

  • No port allocation needed
  • No firewall configuration
  • No network interface binding
  • Works in containers without privileges
  • Survives network changes

Security

The mesh uses Unix filesystem permissions:

  • Only the user who created the mesh can access it
  • Agents verify identity through filesystem
  • No network exposure

License

This project is licensed under the Fair License.

Commit count: 0

cargo fmt