ObjectiveService
Objectives

Cancel an objective

Cancels a running or pending objective. The objective's state will be set to STATE_CANCELLED.

post/v1/workspaces/{workspaceId}/objectives/{objectiveId}:cancel

Path parameters

workspaceIdstring required
Example:workspace_01HXKD2E5NQM3T9AYWCF133E3Q
objectiveIdstring required
Example:obj_01HXKD2E5NQM3T9AYWCFQAZGFV

The ID of the objective. Supports "external_id:" prefix for external IDs.

Request body

workspaceIdstring
objectiveIdstring

The ID of the objective. Supports "external_id:" prefix for external IDs.

reasonstring

Optional reason for cancellation

Example request

{
  "workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
  "objectiveId": "obj_01HXKD2E5NQM3T9AYWCFQAZGFV"
}

Response

OK

state'STATE_UNSPECIFIED' | 'STATE_PENDING' | 'STATE_RUNNING' | 'STATE_WAITING' | 'STATE_FAILED' | 'STATE_CANCELLED' | 'STATE_FINALIZED' | 'STATE_TIMED_OUT' enum required

The current lifecycle state of the objective.

stateMessagestring

Optional human-readable detail about the current state (e.g. a failure reason).

systemPromptstring required

system_prompt is read-only, derived from the selected variation's prompt

firstUserMessagestring required

The first user message in the LLM chat history, either provided explicitly at creation or rendered from the variation's first_user_message_template.

parentObjectiveIdstring

A parent objective means the objective was spawned off using a separate agent to complete an objective

systemPromptDataobject

Arbitrary data rendered into the variation's system_prompt_template

outputobject

The output of the objective, populated when the objective completes. Will match the schema of output_json_schema or output_json_inferred. This will only be set if the state of the objective is set to STATE_FINALIZED

firstUserMessageDataobject

Arbitrary data rendered into the variation's first_user_message_template

pinnedParametersobject

Parameters forced onto this objective's tool calls, as provided at creation. See CreateObjectiveRequest.pinned_parameters for semantics.

Changes

Changed in 14 of the 57 revisions of this API.72539

    • added the optional property info/allOf[ObjectiveInfo]/widget to the response with the 200 status

      response-optional-property-added

    • added the optional property info/allOf[ObjectiveInfo]/subject to the response with the 200 status

      response-optional-property-added

    • added the optional property info/allOf[ObjectiveInfo]/tenant to the response with the 200 status

      response-optional-property-added

    • added the optional property pinnedParameters to the response with the 200 status

      response-optional-property-added

  • 3ecc1debabfa244See the full diff
    • added VariationAssignment_Tool VariationAssignment_ToolSet VariationAssignment_Agent to the configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/assignments/items/ response property oneOf list for the response status 200

      response-property-one-of-added

    • the configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/assignments/items/ response's property type/format changed from object/ to / for status 200

      response-property-type-changed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/assignments/items/agent from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/assignments/items/id from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/assignments/items/tool from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/assignments/items/toolSet from the response with the 200 status

      response-optional-property-removed

    • the response property episodicMemory/allOf[ObjectiveEpisodicConfig]/key became required for the status 200

      response-property-became-required

    • the response property info/allOf[ObjectiveInfo]/effectiveMemoryCascade/items/memoryLayerId became required for the status 200

      response-property-became-required

    • the response property memoryCascade/items/memoryLayerId became required for the status 200

      response-property-became-required

    • added discriminator to configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/assignments/items/ response property for the response status 200

      response-property-discriminator-added

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/spec/allOf[AgentVariationSpec]/progressiveDiscovery/allOf[AgentVariationSpec_ProgressiveDiscovery]/rerankThreshold from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/spec/allOf[AgentVariationSpec]/weight from the response with the 200 status

      response-optional-property-removed

    • the configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/spec/allOf[AgentVariationSpec]/constraints/allOf[AgentVariationSpec_Constraints]/inactivityTimeout response's property type/format changed from integer/ to string/ for status 200

      response-property-type-changed

    • added the new STATE_TIMED_OUT enum value to the state response property for the response status 200

      response-property-enum-value-added

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/spec/allOf[AgentVariationSpec]/constraints/allOf[AgentVariationSpec_Constraints]/inactivityTimeout to the response with the 200 status

      response-optional-property-added

  • 09ccecfe3ece178See the full diff
    • removed the required property initialMessage from the response with the 200 status

      response-required-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agent/spec/allOf[AgentSpec]/inputDataSchema from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentSchedule/spec/data from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentSchedule/spec/initialMessage from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentSchedule/spec/userData from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/spec/allOf[AgentVariationSpec]/userMessageTemplate from the response with the 200 status

      response-optional-property-removed

    • removed the optional property data from the response with the 200 status

      response-optional-property-removed

    • removed the optional property userData from the response with the 200 status

      response-optional-property-removed

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agent/spec/allOf[AgentSpec]/systemPromptDataSchema to the response with the 200 status

      response-optional-property-added

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentSchedule/spec/firstUserMessage to the response with the 200 status

      response-optional-property-added

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentSchedule/spec/firstUserMessageData to the response with the 200 status

      response-optional-property-added

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentSchedule/spec/systemPromptData to the response with the 200 status

      response-optional-property-added

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/spec/allOf[AgentVariationSpec]/firstUserMessageTemplate to the response with the 200 status

      response-optional-property-added

    • added the optional property firstUserMessageData to the response with the 200 status

      response-optional-property-added

    • added the optional property systemPromptData to the response with the 200 status

      response-optional-property-added

    • added the required property firstUserMessage to the response with the 200 status

      response-required-property-added

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agent/metadata/allOf[ResourceMetadata]/bundleKey from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentSchedule/metadata/bundleKey from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/model/allOf[ResourceMetadata]/bundleKey from the response with the 200 status

      response-optional-property-removed

    • removed the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/metadata/allOf[ResourceMetadata]/bundleKey from the response with the 200 status

      response-optional-property-removed

    • removed the optional property info/allOf[ObjectiveInfo]/agent/allOf[ResourceMetadata]/bundleKey from the response with the 200 status

      response-optional-property-removed

    • removed the optional property info/allOf[ObjectiveInfo]/agentVariation/allOf[ResourceMetadata]/bundleKey from the response with the 200 status

      response-optional-property-removed

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agent/info/allOf[AgentInfo]/createdBy/metadata/createdAt to the response with the 200 status

      response-optional-property-added

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentSchedule/info/createdBy/metadata/createdAt to the response with the 200 status

      response-optional-property-added

    • added the optional property configSnapshot/allOf[ObjectiveConfigSnapshot]/agentVariation/info/allOf[AgentVariationInfo]/createdBy/metadata/createdAt to the response with the 200 status

      response-optional-property-added

    • added the optional property info/allOf[ObjectiveInfo]/createdBy/metadata/createdAt to the response with the 200 status

      response-optional-property-added

    This revision also has 27 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • cb4c80271e42112See the full diff
    • removed the required property info/allOf[ObjectiveInfo]/effectiveMemoryStack from the response with the 200 status

      response-required-property-removed

    • removed the optional property memoryStack from the response with the 200 status

      response-optional-property-removed

    • added the optional property memoryCascade to the response with the 200 status

      response-optional-property-added

    • added the required property info/allOf[ObjectiveInfo]/effectiveMemoryCascade to the response with the 200 status

      response-required-property-added