Sessions in ALX Protocol group related solve runs under a shared context. You can inspect a session’s current state, page through its run history, or list all sessions for a user. All session types are canonical wire shapes exported fromDocumentation Index
Fetch the complete documentation index at: https://docs.xandrlabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
@alx/protocol and carry the same compatibility guarantees as solve types.
Nullability rules
Two distinct concepts govern optional fields in session responses:null— the field is known and intentionally empty. The server evaluated the field and determined it has no value.- Omitted — the field is optional and was not provided. New clients SHOULD treat omitted optional fields as unavailable rather than invalid.
null and omission as interchangeable when writing protocol-compliant consumers.
Types
SessionSummary
Aggregate statistics for a session computed across all runs.
Total number of runs recorded in this session.
Number of runs that completed with
ok: true.Average improvement score across all successful runs.
ID of the artifact most recently produced or selected in this session.
ISO-8601 timestamp of the most recent update to the session. Present in
SessionStatusEnvelope.summary; may be omitted in SessionTimelineEnvelope.summary.SessionStatus
The lifecycle state of a session. Returned in SessionStatusEnvelope.status.
Valid values: "active" | "completed" | "failed" | "paused" | "abandoned"
SessionTimeline
An ordered array of SessionTimelineEvent objects representing the historical record of events in a session. Returned in SessionTimelineEnvelope.timeline. Events are ordered chronologically by timestamp (epoch milliseconds).
The closed vocabulary of event types is: execution, step, fallback, error, reset, fork. See SessionTimelineEventType vocabulary.
SessionList
An array of session summary objects. Returned in SessionListEnvelope.sessions. Each entry contains at least a session ID and summary statistics.
SessionStatusEnvelope
The complete response shape for a session status request. All fields listed are canonical wire fields.
true if the request succeeded.Opaque request identifier for tracing.
Protocol negotiation envelope with
protocol_version and optional capabilities.Opaque identifier for the session. Treat as a string; do not parse its structure.
Identifier of the user who owns the session.
The intent that initiated the session. Contains
verb, target, and domain.Current lifecycle state of the session. See
SessionStatus above.Step-level progress counters. Contains:
done(number) — steps completedfailed(number) — steps that failedpending(number) — steps not yet started
The next pending step, or
null if the session has no pending steps. Contains id and status.Aggregate run statistics for the session.
null on success. On failure, a ProtocolError object.SessionTimelineEnvelope
The complete response shape for a session timeline request.
true if the request succeeded.Opaque request identifier for tracing.
Protocol negotiation envelope.
Opaque session identifier.
Identifier of the user who owns the session.
Ordered array of
SessionTimelineEvent objects. See SessionTimeline.Aggregate session statistics. Equivalent to
SessionSummary but updatedAt may be omitted.null on success. On failure, a ProtocolError object.SessionListEnvelope
true if the request succeeded.Opaque request identifier for tracing.
Protocol negotiation envelope.
Array of session objects. Each entry includes at minimum a session ID and summary statistics.
null on success. On failure, a ProtocolError object.SessionTimelineEventType vocabulary
Session timeline events use a closed vocabulary. Implementations MUST NOT emit types outside this list (WG-03).
| Type | Meaning |
|---|---|
execution | A full solve run completed within the session |
step | A single plan step executed within a run |
fallback | A fallback artifact or strategy was used |
error | An error occurred during the run or step |
reset | The session state was reset |
fork | The session branched into a new sub-context |