feat(examples): add 05-scale-showcase (live agent-mesh galaxy)#125
Open
davidfarah2003 wants to merge 2 commits into
Open
feat(examples): add 05-scale-showcase (live agent-mesh galaxy)#125davidfarah2003 wants to merge 2 commits into
davidfarah2003 wants to merge 2 commits into
Conversation
A standalone, private example that spins up thousands of real Cotal endpoints over a bare NATS broker (live-only, no persistence) and renders them as a GPU galaxy. - swarm.ts: N real CotalEndpoints sharded across cluster workers; each agent DMs a stable peer set and posts to its team channel, with sparse cross-team bridges plus a few random long-range arcs (a small-world mesh). Gentle connect ramp + retry to survive large connect bursts. - observe.ts: a scale-safe read-only observer that taps the space and folds traffic into a graph model, emitting a bounded ~15Hz aggregated SSE feed (bytes scale with graph size, not message rate). Reports per-mode rates, avg delivery latency, and broker cpu/mem/conns via /varz. - web/: a cosmos.gl GPU galaxy (CDN-loaded) — role-coloured nodes, channel hubs, warm cross-team bridges, traffic heat pulses, hover and click-to-isolate, and a live HUD. - showcase.ts: one-command orchestrator (broker + observer + swarm). Depends only on @cotal-ai/core; no protocol or core changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A standalone, private example (
examples/05-scale-showcase/) that spins up thousands of real Cotal endpoints over a bare NATS broker (live-only, no persistence) and renders them as a live GPU "galaxy".pnpm -F @cotal-ai/example-05-scale-showcase demo -- --n 5000 # then open http://127.0.0.1:7900/Pieces
src/swarm.ts— N realCotalEndpoints sharded acrossclusterworkers. Each agent DMs a stable peer set and posts to its team channel, with sparse cross-team bridges + a few random long-range arcs (a small-world mesh). Gentle connect ramp + retry to survive large connect bursts.src/observe.ts— a scale-safe read-only observer that taps the space and folds traffic into a graph model, emitting a bounded ~15 Hz aggregated SSE feed (bytes scale with graph size, not message rate). Surfaces per-mode rates (DM/channel/anycast), avg delivery latency, and broker cpu/mem/conns via NATS/varz.web/— a cosmos.gl GPU galaxy (CDN-loaded, no bundler): role-coloured nodes, channel hubs, warm cross-team bridges, traffic heat-pulses, hover + click-to-isolate, live HUD.hhides chrome for a clean capture.src/showcase.ts— one-command orchestrator (broker + observer + swarm).Self-contained
@cotal-ai/core— no protocol/core changes, no new message kinds/subjects/endpoint methods.pnpm-lock.yamlworkspace entry.nats-serveron PATH (the showcase spawns it).Notes
--n 20000) work, but cramming all clients + broker on one machine over loopback hits OS limits — chiefly local ephemeral-port exhaustion (EADDRNOTAVAIL); widen withsudo sysctl -w net.inet.ip.portrange.first=16384. These are single-box artifacts, not protocol limits (a real deployment spreads agents across hosts).