Defines the shape of the data that is returned by the Skip API Server when the responsePhase is 'clarifying_question'

Hierarchy (view full)

Constructors

Properties

clarifyingQuestion: string

The question to display to the user from the AI model after a request is made to the AI when the AI needs more information to process the request

error: string

This property is only used if success is false, and contains an error message that describes the reason for the failure

messages: SkipMessage[]

An array of messages including the messaged passed in with the SkipAPIRequest object as well as any additional messages that Skip generates as part of the conversation.

payload?: Record<string, any>

Optional payload data from the agent. When provided, the calling application can render this payload as an artifact for the user to review/edit. This enables incremental artifact building where the payload is passed back and forth between the user and agent, accumulating structured data throughout the conversation.

Common use case: Requirements Expert emits a PRD with functionalRequirements, title, type, userExplanation etc. in the payload. The client renders this as an artifact for user review. When user responds, the client passes the payload back in the next SkipAPIRequest.payload field.

responseForm?: AgentResponseForm

Optional, richer response form that can be used to collect the user's response to the clarifying question. When this is provided we ignore the suggestedAnswers property and instead use the responseForm to collect the user's response.

responsePhase: SkipResponsePhase

The Skip API server response phase, defined within the SkipResponsePhase type

success: boolean

Used for all response phases, to indicate if the API request was successful or not

suggestedAnswers?: string[]

Optional, zero or more suggested answers that the AI model suggests might be good responses to the clarifying question. If responseForm is provided, this property is ignored.

Deprecated

Use responseForm instead, it is a much richer way to collect the user's response to the clarifying question.