GET
/
generativeagent
/
v1
/
state
curl --request GET \
  --url https://api.sandbox.asapp.com/generativeagent/v1/state \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>'
{
  "state": "ready",
  "lastGenerativeAgentMessageId": "01HWXSGMT91HCS18BV0CRGEKY8",
  "currentTaskName": "PaymentDetails",
  "inputVariables": {
    "input-context": "Customer chatted in to check the details of their last payment.",
    "last-customer-purchase": "2024-05-07"
  }
}

Authorizations

asapp-api-id
string
header
required
asapp-api-secret
string
header
required

Query Parameters

criteria
object

Search criteria

Response

200 - application/json
Successfully fetched state of generative agent for a conversation
state
enum<string>

The last status of the conversation:

  • ready - GenerativeAgent is ready to respond to requests
  • processing - GenerativeAgent is actively processing the conversation
  • waitingForConfirmation - GenerativeAgent is expecting an explicit confirmation on the next message
  • waitingForAuth - GenerativeAgent is waiting for the user to login before proceeding
  • transferredToAgent - GenerativeAgent is no longer able to provide meaningful responses and has requested the conversation be transferred to a human agent
  • transferredToSystem - GenerativeAgent has transferred control of this conversation back to the caller system. However, it will respond if new analyze requests are made
Available options:
ready,
processing,
waitingForConfirmation,
waitingForAuth,
transferredToAgent,
transferredToSystem
lastGenerativeAgentMessageId
string

ULID identifier of the last asynchronous response that was sent to the customer

currentTaskName
string

Current task TaskBot is executing

inputVariables
object

Last input variables