Recommended progression
Work through the examples in this order to build understanding incrementally:research_flow— local routing and aggregation, no sandboxopenshell_worker_demo— sandbox execution with shell and Python payloadsdivisibility_monitor— long-lived BEAM module agents with explicit message loopsprime_sweep_scale— sharded work, scale benchmarks, cluster placementstreaming_peak_demo— runtime streaming messages and incremental consumptionmpe_simple_push_visualization— shared multi-agent environment with HTML outputllm_codegen_review— multi-agent LLM collaboration with a code validatorecosystem_simulation— large stateful simulation under cluster load
1. research_flow
The smallest useful MirrorNeuron workflow. It validates routing and aggregation between agents without any sandbox dependency, making it the ideal first example. What it demonstrates:- Defining a minimal multi-agent graph in
manifest.json - Message routing from a source agent through to an aggregator
- How the CLI validates and runs a simple bundle
2. openshell_worker_demo
The first example that uses sandboxed execution. Worker code runs inside isolated OpenShell sandboxes using both shell scripts and Python. What it demonstrates:- Shell and Python executor payloads within a single bundle
- Bundle-based payload staging into the sandbox working directory
- Bundle-scoped OpenShell policy files that travel with the bundle
payloads/policies/api-egress.yaml. You reference it in your executor config using the policy key, resolved relative to the bundle’s payloads/ directory:
3. divisibility_monitor
A long-lived workflow that runs until you manually stop it. Two BEAM module agents pass messages in a loop without any sandbox involvement, demonstrating how MirrorNeuron handles open-ended jobs. What it demonstrates:- Long-lived jobs that do not have a natural completion point
- Agent-to-agent message loops with explicit message types
local_restartrecovery mode, which prevents old demo runs from auto-resuming- Using
--no-awaitto submit a background job and monitor it separately
4. prime_sweep_scale
A scale benchmark that fans out primality checks across many executor workers and aggregates the results. Useful for testing execution scheduling, sandbox reuse, and cluster work distribution. What it demonstrates:- Sharding a large numeric range across many logical executor workers
- Aggregating results from parallel workers into a final summary
- Stressing execution scheduling and sandbox reuse
- Running distributed work across a two-node cluster
- Local
- Cluster
generate_bundle.py— generates the job bundle with the desired worker count and rangerun_scale_test.sh— end-to-end test runnersummarize_result.py— post-processes the aggregated output
5. streaming_peak_demo
Demonstrates MirrorNeuron’s runtime-level streaming support. One agent produces a stream of gzipped NDJSON chunks; another consumes it incrementally and detects abnormal peaks. What it demonstrates:- Streaming messages between agents at the runtime level
- Gzipped NDJSON as a wire payload format
- Incremental consumption of a data stream
- Detecting and reporting anomalies in streaming data
- Local
- Cluster
generate_bundle.py— generates the bundle with configurable stream parametersrun_streaming_e2e.sh— end-to-end local runnersummarize_result.py— extracts the largest detected anomaly from results
6. mpe_simple_push_visualization
Runs a shared PettingZoo MPE (Multi-Particle Environment) crowd simulation with many agents inhabiting one environment. A singleHostLocal simulation worker and one visualizer keep execution lightweight while producing a browser-viewable HTML output.
What it demonstrates:
- Running one shared multi-agent environment rather than isolated per-agent sandboxes
- Producing an HTML visualization of the full arena over simulation time
- A compact simulation example relative to the full
ecosystem_simulation
generate_bundle.py— generates the bundlerun_simple_push_e2e.sh— end-to-end runner with optional--openflagsummarize_result.py— post-processes the simulation output
7. llm_codegen_review
A meaningful end-to-end multi-agent collaboration example powered by Gemini. A coder agent generates code, a reviewer agent critiques it, and the loop runs for three rounds before a Python validator evaluates the final result. What it demonstrates:- Multi-agent LLM collaboration with a structured generate→review→regenerate cycle
- Gemini 2.5 Flash Lite as the default model (requires an API key)
- Three rounds of iterative code improvement
- A final Python validator that evaluates the output
- Local
- Cluster
This example requires a Gemini API key. Set it in your environment before running. Refer to the bundle’s README for the required environment variable name.
8. ecosystem_simulation
The most demanding example. It models a large population of animals competing for limited regional resources across many simulation steps, exercising cross-region messaging, migration, breeding, and summary ranking. Use this to stress-test the runtime under cluster load. What it demonstrates:- A BEAM-native sharded world model with many stateful agents
- Cross-region messaging and agent migration between shards
- Randomized world resource allocation and per-run DNA initialization
- Top-10 DNA profile ranking as the final output
- The runtime under sustained cluster load
- Local
- Cluster
generate_bundle.py— generates the bundle with configurable world parametersrun_simulation_e2e.sh— local end-to-end runnersummarize_result.py— extracts and ranks the top DNA profileswatch_ascii.exs— live ASCII visualization of the simulation as it runs