Skip to content

The hub is a small local daemon that coordinates background M31A activity. Schedules store recurring prompts in the hub's data directory.

Hub daemon ​

bash
m31a hub status
m31a hub start
m31a hub stop
m31a hub ensure
ActionBehavior
statusReport the endpoint and PID if a hub is running.
startStart a hub server and print its endpoint.
stopSend SIGTERM to the hub process found in the lock file.
ensureStart a hub only if one is not already running.

The default action is status. Discovery is lock-file based and implemented in packages/cli/src/hub/ (server.ts, lock.ts, sessions.ts). Set M31A_HUB_DATA_DIR to relocate the hub's data directory.

Schedules ​

bash
m31a schedule create nightly-review "0 2 * * *" "Review today's diff"
# prints: created <id> (<cron>) and the next run time
m31a schedule list
m31a schedule trigger <id>
m31a schedule tick
m31a schedule delete <id>

The create signature is:

text
schedule create <name> <cron> <prompt...>

trigger and delete take the id printed by create (also shown by list), not the friendly name. cron is a standard cron pattern evaluated by schedules/cron.ts. Schedules are stored by schedules/store.ts and executed by schedules/runner.ts. list shows each schedule's id, name, cron pattern, and enabled/paused state. trigger runs a schedule immediately; tick runs all due schedules.

Operational notes ​

  • Start the hub with ensure from automation to make the operation idempotent.
  • Scheduled prompts still require valid NVIDIA_API_KEY credentials.
  • Treat scheduled prompt output as untrusted when feeding it into other tools.

Next steps ​

See Connectors for delivering messages out of the hub.

Built with VitePress. Powered by NVIDIA NIM.