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

Control a goal

Applies an explicit owner control to this exact Goal/version.

Applies an explicit owner control to this exact Goal/version. Pause interrupts only its current execution; resume does not resolve a wait or clear observed usage. Amend changes only supplied objective/budget fields.

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

#Request

FieldTypeWhat it is
namestringThe exact Goal name; never a lookup of a Session's newest Goal. Required.
expected_versionint32The contract version observed by the owner. Required.
actionGoalControlActionExplicit owner action. Only AMEND accepts objective/budget changes. Required. One of pause, resume, amend.
operation_idstringCaller-stable mutation identity, nonempty and at most 128 bytes. Required.
objectivestringNew objective, only when amending. Omission preserves the existing text.
token_budgetint64New explicit token budget, only when amending. Omission preserves it.
clear_token_budgetboolExplicitly remove a budget when amending; incompatible with token_budget.

#Response

FieldTypeWhat it is
namestringThe exact Session-owned Goal name.
uidstringThe platform Resource UID; the conserved Goal UUID is its name's final id. Output only.
metaResourceMetaStandard resource metadata. Output only.
objectivestringThe objective, nonempty and at most 4,000 characters. Required.
token_budgetint64Omit unless the caller explicitly requests a positive token budget.
stateGoalStateLifecycle; an execution hold is represented separately. Output only. One of working, waiting, completed, failed.
versionint32Optimistic acceptance-contract version, starting at one. Output only.
tokens_usedint64Observed tokens charged exactly once per runtime step. Output only.
usage_unavailableboolUnknown usage holds execution when a token budget is enforced. Output only.
owner_pausedboolExplicit owner pause; an unfinished Goal stays unfinished. Output only.
impasseboolExecution held after the required repeated observation of an impasse. Output only.
receiptSessionGoalReceiptThe terminal observation, retained after another Goal becomes active. Output only.
create_timetimestampWhen this Goal was created. Output only.
update_timetimestampWhen this Goal last changed. Output only.

#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.

#SessionGoalReceipt

FieldTypeWhat it is
stagestringThe observed delivery stage. Required.
targetstringThe concrete surface or artifact observed. Required.
evidencestructNonempty structured evidence from that surface. Required.

#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/goals/goal:control" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"pause","expected_version":1,"operation_id":"…"}'