Mirror Neuron Documents

Validate And Run Your First Workflow

Documentation for Validate And Run Your First Workflow.

Validate And Run Your First Workflow

This tutorial gets you from a fresh checkout to one validated workflow and one submitted job.

What You Will Do

By the end, you will have:

  • validated a checked-in job bundle
  • started Redis
  • started the MirrorNeuron runtime
  • submitted one workflow
  • inspected job state

Before You Start

You need:

  • macOS, Linux, or WSL2
  • Python 3.10+
  • Elixir/Erlang
  • Docker
  • the mn CLI on your PATH

If those are not ready yet, follow Installation first.

Step 1: Validate A Bundle

From the workspace root:

mn blueprint validate mn-blueprints/message_routing_trace

Expected output:

Job bundle at 'mn-blueprints/message_routing_trace' is valid.

This checks the local manifest and input contract without submitting a runtime job.

Step 2: Start Redis

docker rm -f mirror-neuron-redis 2>/dev/null || true
docker run -d --name mirror-neuron-redis -p 6379:6379 redis:7
docker exec mirror-neuron-redis redis-cli ping

Expected output:

PONG

Step 3: Start The Runtime

mn runtime start

Expected output:

MirrorNeuron services started

If your local command prints a different success line, verify with:

mn node list

Expected output includes:

{
  "nodes": []
}

or a non-empty nodes list when the core runtime is reachable.

Step 4: Run The Workflow

mn blueprint run message_routing_trace

Expected output:

Job submitted successfully

The CLI may also print live events and the job id. Keep the job id for inspection commands.

Step 5: Inspect Jobs

mn job list

Expected output:

Job ID

Check a single job:

mn job status <job_id>

Expected output includes:

{
  "status": "completed"
}

If the job is still running, wait a moment and run mn job status <job_id> again.

Step 6: Try A Python-Defined Blueprint

Run the checked-in Python SDK research pipeline:

mn blueprint run python_sdk_research_pipeline

Expected output:

Job submitted successfully

For Python bundle-generation details, see Python SDK.

Security Basics

Before running bigger or third-party workflows:

  • Review manifest.json and payloads/.
  • Check whether a node uses host_local or OpenShell.
  • Check pass_env before secrets are exposed to workers.
  • Use dry-run options for email, Slack, or other external delivery flows.
  • Treat live messages and model outputs as untrusted input.

Read Security Model before exposing a runtime to other users or machines.

Troubleshooting

mn: command not found

Install the CLI or activate the project virtual environment. Then verify:

which mn
mn --help

gRPC connection refused

The runtime is not reachable.

mn runtime start
mn node list

Redis connection errors

Check:

docker exec mirror-neuron-redis redis-cli ping

Expected output:

PONG

Next Steps

On this page