Skip to content

Report that the agent is alive and extend its live claims by 30 minutes

POST
/v1/sessions/{session_id}/heartbeat
curl --request POST \
--url http://127.0.0.1:8080/v1/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/heartbeat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "activity": "example", "digest": false }'

A session without a heartbeat for 10 minutes is abandoned by the sweeper. The body is optional. An empty body only keeps the session alive.

session_id
required
string format: uuid
Media typeapplication/json
object
activity

What the agent is doing now, at most 120 characters. It is stored on one line. An empty string clears it, and leaving it out keeps the current line.

string
<= 120 characters
digest

Return the notice digest with the response.

boolean

The session and how many claims were extended.

Media typeapplication/json
object
session
required
object
id
required
string format: uuid
project_id
required
string format: uuid
user_id
required
string format: uuid
user_handle
required
string
intent_id
required

Set from M2.

string | null format: uuid
status
required
string
Allowed values: starting running waiting_human idle done failed abandoned
activity
required

What the agent last said it is doing, set by a heartbeat. Null until one sets it.

string | null
<= 120 characters
created_at
required
string format: date-time
last_heartbeat_at
required
string format: date-time
ended_at
required
string | null format: date-time
claims_extended
required
integer
digest

Up to three of the session’s most urgent undelivered notices, one line each, after a “Zentri notices:” header. A last line says how many more wait. Showing a notice here marks it delivered but not acked. Absent when nothing is undelivered or the caller is not the session’s own token.

string

Example

{
"session": {
"status": "starting"
}
}

The request is malformed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The token may not do this.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No such resource in the caller’s org.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The request clashes with current state.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

A rate limit or quota stopped the request. Retry-After gives seconds to wait.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}
Retry-After
integer