Skip to content
Console
Menu

Alerts and status pages

App store purchases

Credits

Knowledge

KV

Notifications

Organizations

Storage

Workflows

API reference

Getting Started

Authentication

KV Store

Resume an agent session

Consumes all ready owners atomically with fresh exact-next-turn authority.

Consumes all ready owners atomically with fresh exact-next-turn authority.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agent_sessions/agent-session:resume
  • Scope agents:sessions
  • Effect write — a successful call changes state.
  • Collection agent_sessions

#Request

FieldTypeWhat it is
namestringExisting owning Session, which must be idle or failed. Required.
operation_idstringPermanent caller mutation identity, at most 128 bytes. Required.
waitsstring[]Exact ready owners, 1 to 16; must include all outstanding Session waits. Required.
executionSessionTurnExecutionFresh handles captured for this exact next turn; no Task is required. Required.
queued_execution_generationint64Nonzero for automatic continuation: require this exact queued authority generation, caller, Goal terms and execution. Zero is explicit fresh caller admission. A delayed automatic callback never selects a replacement.

#SessionTurnExecution

FieldTypeWhat it is
turnint64The expected next turn. A concurrent admission never changes this pin. Required.
runtime_credential_handlestringSame-turn captured caller authority for Workflows and lazy Sandbox APIs. Required. Never returned again.
credentialsmap<string, CredentialBinding>Same-turn execution handles by alias, including inference and any pinned tool or repository capabilities. Each retains its existing permission gate.

#CredentialBinding

FieldTypeWhat it is
secretstringA Kernel Secret of this environment, by name. One of the source group.
connectionstringA Kernel Connection (a third-party OAuth installation), by name. One of the source group.
end_user_providerstringThe end user's own grant in Sylphx Auth's agent token vault, by provider id; the session's end user must hold it. One of the source group.
placementstringHow the value is sent: bearer (default), header:<Name> or query:<name>.
handlestringAn opaque credential handle issued for this session, resolved only at egress. This is never a credential value. Never returned again. One of the source group.

#Response

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/agent_sessions/{agent_session}/session_events/{session_event}.
uidstringsevt_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
sequenceint64The position in the session's log, from 1, with no gaps. Output only.
typeSessionEventTypeWhat the event is. Output only. One of user_message, steer, agent_message, tool_call, tool_result, approval_requested, approval_decided, status, compaction, thought, file_change, response, error, usage, sandbox, wait_changed, wait_continuation.
turnint64The turn it belongs to, from 1; 0 for an event outside a turn. Output only.
stepint64The step within the turn, from 1, assigned by the runtime; 0 for an event that is not a step. Output only.
create_timetimestampWhen it was appended. Output only.
usageStepUsageObserved accounting for this step; absent values are unknown, never zero. Output only.
step_keystringStable runtime-assigned effect key, independent of invocation attempts. Output only.
messageMessageFor USER_MESSAGE, STEER and AGENT_MESSAGE. One of the payload group.
tool_callToolCallFor TOOL_CALL. One of the payload group.
tool_resultToolResultFor TOOL_RESULT. One of the payload group.
approvalApprovalFor APPROVAL_REQUESTED and APPROVAL_DECIDED. One of the payload group.
status_changeStatusChangeFor STATUS. One of the payload group.
thoughtMessageFor THOUGHT: a reasoning summary, never private model reasoning. One of the payload group.
file_changeFileChangeFor FILE_CHANGE. One of the payload group.
responseTurnResultFor RESPONSE: the completed turn's answer and usage. One of the payload group.
errorErrorEventFor ERROR. One of the payload group.
sandboxSandboxActivityFor SANDBOX: authoritative allocation/release history, including replacements. One of the payload group.
waitAgentSessionWaitFor WAIT_CHANGED: a durable wait fact, without execution authority. One of the payload group.
wait_continuationSessionWaitContinuationFor WAIT_CONTINUATION: ready owners consumed by exact turn admission. One of the payload group.

#ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

#StepUsage

FieldTypeWhat it is
input_tokensuint64Uncached input tokens the step was charged for; absent when unknown. Output only.
cached_tokensuint64Input tokens served from the provider cache; absent when unknown. Output only.
output_tokensuint64Output tokens; absent when unknown. Output only.
cost_usdstringThe exact decimal USD charge the gateway reported; absent when unknown. Output only.
modelstringThe catalog id the step ran on; empty for a step with no inference. Output only.
kindstringmodel, tool, compaction or subcall. Output only.
first_delta_timetimestampFor a model step: when the runtime received the stream's first non-empty assistant text or tool-call delta (not a role-only or empty chunk), on the runtime's clock, from the attempt that produced the recorded step. Output only.

#Message

FieldTypeWhat it is
partsContentPart[]The content, in order; 1 to 64 parts. Required.

#ToolCall

FieldTypeWhat it is
idstringThe call's id within the session, (turn, step) based. Output only.
toolstringThe tool name. Output only.
inputstructThe input, as the model sent it. Output only.
model_call_idstringThe model's own id for the call, as sent; never used as a key. Output only.
clientboolWhether the client must execute this pending call. Calls rejected before dispatch remain in history with this false and a corresponding ToolResult. Output only.
deadlinetimestampThe client call's fixed deadline. A reconnecting client never starts a call after this time; retries retain the original deadline and call id. Output only.

#ToolResult

FieldTypeWhat it is
call_idstringThe ToolCall's id. Output only.
outputvalueThe output. Output only.
errorboolWhether the call failed; output then holds the error. Output only.
durationdurationHow long the call took. Output only.

#Approval

FieldTypeWhat it is
call_idstringThe ToolCall's id. Output only.
decisionApprovalDecisionThe answer, once given; unset while it waits. Output only. One of approve, reject.
rememberboolWhether the answer covers later calls of the same tool in this session ("always allow"). Output only.
principalstringWho answered. Output only.
reasonstringThe reason given, if any. Output only.

#StatusChange

FieldTypeWhat it is
stateSessionStateThe state after the change. Output only. One of idle, running, awaiting_approval, awaiting_client, failed, archived.
reasonstringWhy, for FAILED and INTERRUPTED: a registry error code and message. Output only.

#FileChange

FieldTypeWhat it is
pathstringThe path relative to the session's repository root. Output only.
changestringadded, modified, deleted, renamed or copied. Output only.
addedint64Lines added, when reported by the harness. Output only.
removedint64Lines removed, when reported by the harness. Output only.
old_pathstringThe previous path, for a rename or copy. Output only.
sourcestringedit for an incremental edit or final for the turn's final diff. Output only.

#TurnResult

FieldTypeWhat it is
textstringThe final response's text. Output only.
is_errorboolWhether the turn ended with an error. Output only.
usageTurnTokenUsageModel token usage reported by the harness. Output only.
cost_microsint64The reported cost, in micro-USD. Output only.
durationdurationHow long the turn ran. Output only.
first_delta_timetimestampThe first non-empty assistant text or tool-call delta of the turn: the earliest first_delta_time of its recorded model steps. Output only.

#ErrorEvent

FieldTypeWhat it is
kindstringThe registry error code or harness error kind. Output only.
messagestringA safe error description. Output only.

#SandboxActivity

FieldTypeWhat it is
leasestringThe lease's resource name. Output only.
statestringallocated or released (the release was read back as ENDED). Output only.
sandbox_secondsstringOn released: exact decimal seconds from allocation to release. Output only.

#AgentSessionWait

FieldTypeWhat it is
namestringExact name; the final segment is the conserved wait UUID.
uidstringImmutable platform Resource UID. Output only.
metaResourceMetaStandard metadata. Output only.
goalstringOptional exact Goal in this Session, never a current-Goal selector.
typestringtime or signal. Other producer types require their own admitted adapter. Required.
referencestringExact source reference for a signal; empty for a timer.
deadlinetimestampActual future due time; required only for a timer.
resume_promptstringWhat to do after observing this wait's evidence, at most 16 KiB. Required.
statestringactive, ready, resolved or cancelled. Ready still requires turn admission. Output only.
evidencestructOriginal bounded observed evidence, retained through delivery and restart. Output only.
resumed_turnint64The only turn that consumed this wait; unset until resolved. Output only.
create_timetimestampCreation time. Output only.
update_timetimestampLast state change time. Output only.

#SessionWaitContinuation

FieldTypeWhat it is
waitsAgentSessionWait[]Conserved wait snapshots and observed evidence for this exact turn. Output only.

#ContentPart

FieldTypeWhat it is
textstringText. One of the part group.
fileFileRefA file, by Sylphx Data object URL or an https URL. One of the part group.

#TurnTokenUsage

FieldTypeWhat it is
input_tokensint64Input tokens. Output only.
output_tokensint64Output tokens. Output only.
cache_read_tokensint64Input tokens read from the model's cache. Output only.
cache_write_tokensint64Input tokens written to the model's cache. Output only.

#FileRef

FieldTypeWhat it is
uristringWhere the file is. Required.
media_typestringIts media type, for example image/png.
filenamestringIts display name.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/agent_sessions/agent-session:resume" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"execution":{"runtime_credential_handle":"…","turn":1},"operation_id":"…","waits":["…"]}'