Skip to content

SuperInstance/constellation-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

constellation-map

Fleet as star chart β€” agents become stars, teams form constellations, navigate between them

crates.io docs.rs license

What is Constellation Map?

When you run a fleet of AI agents, understanding who's active, how they're organized, and how they relate to each other becomes a visualization challenge. Constellation Map treats your fleet like a night sky:

  • Each agent is a star with a brightness proportional to its activity level and a position derived from its embedding
  • Each team is a constellation β€” a named group of stars connected by edges (communication channels, shared tasks)
  • The entire fleet renders as an ASCII star chart that updates in real time
  • Navigation between stars uses BFS pathfinding along constellation edges

Stars are classified by a magnitude scale (I–VI, borrowing from astronomy) based on their brightness, from "Hyperactive" (magnitude I, brightness β‰₯ 0.9) to "Dormant" (magnitude VI, brightness < 0.1).

Why Does This Matter?

Managing multi-agent systems requires intuitive visualization:

  • Fleet health: See at a glance which agents are busy (bright stars) and which are idle (dim stars)
  • Team structure: Constellations reveal organizational hierarchy and communication patterns
  • Navigation: Find paths between agents through the team graph β€” useful for message routing
  • Distance metrics: Measure how far apart agents are in embedding space β€” proxies for capability similarity
  • ASCII rendering: Works in any terminal, no GUI required β€” perfect for headless servers and monitoring dashboards

Real-world applications:

  • DevOps monitoring: Visualize microservice agent fleets with real-time activity
  • Multi-agent coordination: See which agent teams are active and how they're connected
  • Cluster analysis: Detect disconnected components or isolated agents
  • Load balancing: Identify overloaded (bright) and underutilized (dim) agents

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Constellation Map System                      β”‚
β”‚                                                              β”‚
β”‚  Agent Fleet                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚  Agent A [0.9] ─── Agent B [0.7] ─── Agent C [0.3]β”‚      β”‚
β”‚  β”‚      β”‚              β”‚                    β”‚         β”‚      β”‚
β”‚  β”‚  Agent D [0.8]     Agent E [0.1]      Agent F [0.6]β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                 β”‚                                             β”‚
β”‚                 β–Ό                                             β”‚
β”‚  Star Chart                                                   β”‚
β”‚  ╔══ team-alpha ══╗  ╔══ team-beta ══╗                       β”‚
β”‚  β•‘ β˜… agent-a [β–ˆβ–ˆβ–ˆ]β•‘  β•‘ ✦ agent-c [β–ˆ] β•‘                      β”‚
β”‚  β•‘ ✦ agent-b [β–ˆβ–ˆ ]β•‘  β•‘ Β· agent-f [β–ˆ ]β•‘                      β”‚
β”‚  β•‘ β˜… agent-d [β–ˆβ–ˆβ–ˆ]β•‘  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•                      β”‚
β”‚  β•‘ Β· agent-e [   ]β•‘     Magnitude Scale:                     β”‚
β”‚  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•     β˜… β‰₯ 0.8  (I: Hyperactive)           β”‚
β”‚                         ✦ β‰₯ 0.5  (II-III: Active)            β”‚
β”‚  Navigation:            Β· β‰₯ 0.2  (IV-V: Moderate-Quiet)      β”‚
β”‚  A ──▢ B ──▢ C         . < 0.2  (VI: Dormant)                β”‚
β”‚  (via constellation edges)                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

use constellation_map::{Star, Constellation, StarChart, Navigation, Magnitude};

// Create a constellation (team)
let mut team = Constellation::new("backend-agents");
let a = team.add_star(Star::new("api-handler", 0.9, (0.0, 0.0)));
let b = team.add_star(Star::new("db-worker", 0.7, (1.0, 0.0)));
let c = team.add_star(Star::new("cache-mgr", 0.3, (2.0, 0.0)));
team.add_edge(a, b); // api-handler communicates with db-worker
team.add_edge(b, c); // db-worker communicates with cache-mgr

// Create the star chart
let mut chart = StarChart::new();
chart.add_constellation(team);

// Render as ASCII
println!("{}", chart.render_ascii());

// Classify agents by magnitude
let star = chart.find_star("api-handler").unwrap();
let mag = Magnitude::from_brightness(0.9);
println!("api-handler is magnitude {:?} ({})", mag, mag.label());

Navigation Between Stars

// Find the shortest path between two agents
let nav = Navigation::new(&chart);
if let Some(path) = nav.find_path("api-handler", "cache-mgr") {
    println!("Route: {:?}", path);
    // Goes through: api-handler β†’ db-worker β†’ cache-mgr
}

// Compute distance in embedding space
let dist = nav.distance("api-handler", "db-worker");
println!("Euclidean distance: {:.2}", dist.unwrap());

Multi-Constellation Charts

let mut chart = StarChart::new();

// Team 1
let mut backend = Constellation::new("backend");
backend.add_star(Star::new("worker-1", 0.8, (0.0, 0.0)));
backend.add_star(Star::new("worker-2", 0.6, (1.0, 0.0)));
chart.add_constellation(backend);

// Team 2
let mut frontend = Constellation::new("frontend");
frontend.add_star(Star::new("web-server", 0.9, (5.0, 0.0)));
chart.add_constellation(frontend);

println!("Total stars: {}", chart.total_stars());

API Reference

Star

Method Returns Description
Star::new(name, brightness, position) Star Create a star (brightness clamped to 0.0–1.0)
star.symbol() char Display character: β˜… ✦ Β· . based on brightness

Constellation

Method Returns Description
Constellation::new(name) Constellation Create empty constellation
c.add_star(star) usize Add star, return its index
c.add_edge(a, b) () Connect two stars by index
c.find_star(name) Option<usize> Find star by name
c.total_brightness() f64 Sum of all star brightnesses

StarChart

Method Returns Description
StarChart::new() StarChart Create empty chart
chart.add_constellation(c) usize Add constellation, return index
chart.find_star(name) Option<(usize, usize)> Find star across all constellations
chart.render_ascii() String ASCII rendering of the full chart
chart.total_stars() usize Count stars across all constellations

Navigation

Method Returns Description
Navigation::new(&chart) Navigation Create navigator
nav.find_path(from, to) Option<Vec<(usize, usize)>> BFS shortest path
nav.distance(from, to) Option<f64> Euclidean distance between stars

Magnitude

Variant Brightness Label
I β‰₯ 0.9 Hyperactive
II β‰₯ 0.7 Very Active
III β‰₯ 0.5 Active
IV β‰₯ 0.3 Moderate
V β‰₯ 0.1 Quiet
VI < 0.1 Dormant
Method Returns Description
Magnitude::from_brightness(b) Magnitude Classify by brightness
mag.label() &str Human-readable label

Mathematical Background

Astronomical Magnitude

The magnitude scale is borrowed from astronomy, where the apparent magnitude of a star is:

m = -2.5 Β· log₁₀(brightness) + constant

We simplify this to 6 discrete bins following the modern astronomical magnitude classes, mapping agent activity (normalized to [0, 1]) to brightness.

Graph Navigation

The pathfinding uses Breadth-First Search (BFS) on the graph defined by constellation edges. BFS guarantees the shortest path (in number of hops) between any two connected stars. Time complexity is O(V + E) where V is the total number of stars and E is the total number of edges.

Euclidean Distance

Star positions can be derived from agent embeddings (e.g., via t-SNE or PCA reduction to 2D). The distance between stars approximates the dissimilarity of the underlying agents:

d(s₁, sβ‚‚) = ||pos₁ - posβ‚‚||β‚‚ = √((x₁-xβ‚‚)Β² + (y₁-yβ‚‚)Β²)

Installation

cargo add constellation-map

Or add to your Cargo.toml:

[dependencies]
constellation-map = "0.1.0"

Related Crates

License

MIT Β© SuperInstance


Part of the Exocortex project β€” persistent cognitive substrate for multi-agent systems.

About

Rust crate: constellation-map

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages