Agents API
Get Agent Logs
Page through an agent run’s executor-sourced log lines
GET
Requires version 1.1.9 or later of the Archetype platform.
Overview
This endpoint returns a page of run log entries, newest first. Log lines come from the executor (JOS job events) rather than from the agent event log, so they carry the executor’s own severity vocabulary and event kinds. The list is empty for a noop run. Filter by severity, or search the message and event type.Request
string
required
Agent
agt_ id.integer
default:"100"
Page size. Minimum
1, maximum 1000.string
Forward cursor: return log lines older than this page. Pass the previous page’s
next_cursor. Opaque — not a log id; never compute on it. Mutually exclusive with before.string
Backward cursor: return log lines newer than this page. Opaque, as
after is. Mutually exclusive with after.string
Filter to a single severity. Omit for all severities. One of
INFO, WARN, ERROR, SUCCESS, FAILED — any case is accepted, and warning is accepted for warn.string
Case-insensitive substring match over the line’s message and event type. Omit for no search filter.
Response
array
required
The page, newest first. Each entry is a log line.
boolean
required
True when more log lines exist beyond this page in the direction of travel.
string
Cursor for the next page in the same direction — pass it as
after when paging forward, or as before when you supplied before. null when has_more is false.Log entry object
One executor-sourced log line for a run (a JOS job event).string
required
Executor-assigned log id. Stable, but not this list’s cursor.
string
required
Severity of the line, in the executor’s vocabulary:
INFO, WARN, ERROR, SUCCESS, or FAILED.string
required
Executor’s event kind, e.g.
status_change.string
required
When the line was logged (date-time).
string
The log message;
null when the event carries none.integer
Index of the worker that logged the line, when it came from one.
Important Notes
- The cursor here is opaque and is not a log id. Pass
next_cursorback verbatim; never derive it fromdata[last].idor compute on it. afterandbeforeare mutually exclusive — send at most one of them.leveluses the executor’s vocabulary, which includesSUCCESSandFAILED— these have no equivalent in the agent event log’s three levels.- A noop run produces no executor logs, so
datacomes back empty.