agents.session-heartbeat-rate ​
Compute heartbeat age and emit a health metric for a running agent session
Compute a rolling heartbeat-health metric for a running session.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-agents |
| Version | 1.0 |
Triggers ​
| Source | Endpoint / Event | Description |
|---|---|---|
| INTERNAL | internal.invocation | Internal — called by agents.session-watch when a runner exits |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
session_uuid | string | Yes | — | — |
organization_uuid | string | Yes | — | — |
window_seconds | integer | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
error | string | No | — | — |
error_type | string | No | — | — |
failed_at | string | No | — | — |
failed_at_state | string | No | — | — |
failed_layer | json | No | — | — |
failed_step | string | No | — | — |
failure_reason | string | No | — | — |
healthy | json | No | — | — |
heartbeat_age_seconds | json | No | — | — |
session_uuid | json | No | — | — |
organization_uuid | json | No | — | — |
window_seconds | json | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | run | — |
run | No | No | — | complete | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | run | run | — |
run | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "agents.session-heartbeat-rate",
"initial_data": {
"session_uuid": "value",
"organization_uuid": "value"
}
}