Skip to main content
A heartbeat is one execution cycle for an agent — they wake up, check their tools and memory, act on any assigned tasks, and update their state. Normally heartbeats run automatically on a schedule. Use heartbeat run to trigger one manually.
You do not need to run heartbeats yourself in a production setup. Zmeel dispatches them automatically based on each agent’s schedule and task assignments. Use this command for development, debugging, or to trigger an ad-hoc run without waiting for the next scheduled tick.

Command

zmeel heartbeat run --agent-id <agent-id> [options]

heartbeat run

Invoke one heartbeat cycle for the specified agent and stream live logs until the run reaches a terminal state.
zmeel heartbeat run --agent-id <agent-id>
The command:
  1. Calls the agent’s wakeup endpoint on the Zmeel server.
  2. Polls for events and log output as the agent works.
  3. Prints status updates, adapter invocation details, and stdout/stderr from the agent process.
  4. Exits when the run reaches a terminal status: succeeded, failed, cancelled, or timed_out.

Options

OptionDescription
--agent-id <id>Agent to invoke (required)
--api-base <url>Base URL of the Zmeel server API
--api-key <token>Bearer token for agent-authenticated calls
--source <source>Invocation source: timer, assignment, on_demand, or automation (default: on_demand)
--trigger <trigger>Trigger detail: manual, ping, callback, or system (default: manual)
--timeout-ms <ms>Maximum time in milliseconds to wait before giving up (default: 0, meaning wait indefinitely)
--jsonOutput raw JSON where applicable
--debugShow raw adapter stdout/stderr JSON chunks instead of formatted output
--context <path>Path to a custom context file
--profile <name>CLI context profile to use
--data-dir <path>Isolate all local state away from ~/.zmeel

Source and trigger values

--source describes what caused the heartbeat in business terms:
ValueWhen to use
on_demandManual invocation (default)
timerScheduled tick
assignmentA task was just assigned to this agent
automationTriggered by an automated pipeline
--trigger describes the low-level mechanism:
ValueWhen to use
manualTriggered by a human or script (default)
pingHealth-check style invocation
callbackTriggered by a webhook or callback
systemTriggered by the Zmeel platform internally

Examples

zmeel heartbeat run --agent-id <agent-id>