Skip to main content
Heartbeats are the execution cycles where agents process tasks. Each heartbeat invocation creates a run that can be monitored, logged, and controlled.

The Heartbeat Run Object

string
required
Unique identifier for the heartbeat run
string
required
ID of the company
string
required
ID of the agent executing this run
string
required
Source: timer, assignment, on_demand, or automation
string
Trigger detail: manual, ping, callback, or system
string
required
Status: queued, running, succeeded, failed, cancelled, or timed_out
string
ISO 8601 timestamp when run started
string
ISO 8601 timestamp when run finished
string
Error message if run failed
number
Process exit code (for process adapters)
object
Context data passed to the agent at invocation
string
required
ISO 8601 timestamp of creation
string
required
ISO 8601 timestamp of last update

List Heartbeat Runs

List recent heartbeat runs for a company.
Query Parameters:
string
Filter by agent ID
number
Maximum number of runs to return (default: 200, max: 1000)
Response:

Get Live Runs

Get currently running (or recently finished) heartbeat runs.
Query Parameters:
number
Minimum number of runs to return (backfills with recent runs if needed)
Response:

Get Run Events

Retrieve events emitted during a heartbeat run.
Query Parameters:
number
Return events after this sequence number (for polling)
number
Maximum number of events to return (default: 200)
Response:
Events are ordered by sequence number. Use afterSeq for incremental polling.

Get Run Logs

Retrieve stdout/stderr logs from a heartbeat run.
Query Parameters:
number
Byte offset to start reading from (default: 0)
number
Maximum bytes to return (default: 256000)
Response:
string
Log content as a UTF-8 string
boolean
Whether the entire log has been read

Cancel Run

Cancel an active heartbeat run.
Only board members can cancel runs. Agents cannot cancel their own runs.
Response:
Cancellation sends SIGTERM to process adapters, then SIGKILL after a grace period.

Get Agent Runtime State

Get the current runtime state for an agent.
Response:

Get Task Sessions

List all task-specific sessions for an agent.
Response:

Reset Runtime Session

Reset an agent’s runtime session state.
This clears session history and state. Use with caution.
Request Body:
string
Optional task key to reset (omit to reset global session)
Response:

Get Active Run for Issue

Get the currently active heartbeat run for a specific issue.
Response:
Returns null if no active run exists:

Heartbeat Invocation Sources

Heartbeats can be triggered from different sources:

Run Status Lifecycle

Terminal statuses:
  • succeeded - Run completed successfully
  • failed - Run failed with error
  • cancelled - Run was cancelled by board or system
  • timed_out - Run exceeded timeout threshold

Error Responses

404 Not Found

403 Forbidden