Continue Conversation
API Endpoint
Headers
formacloud-api-key
string
Yes
API key for authentication
Available Action Types
CALL_TOOL
"CallTool"
The system invokes an external tool to process the request. If this action is returned, the API must be called again to retrieve the tool's response.
ASK_USER
"AskUser"
The system requires user input to proceed. In this case, the user_input
field must be provided in the next API call.
FINISH
"Finish"
The conversation session has reached its final state.
PLAN
"Plan"
The system is generating a structured plan for further execution.
CREATE_TOOL
"CreateTool"
The system dynamically creates a new tool or function based on the conversation's requirements.
Request Body
user_input
string
Yes (if Last StepActionType = ASK_USER
)
The user's response in the conversation. Required when the previous action type is ASK_USER
. Otherwise, send an empty {}
.
query_step_result
bool
No
If true
, the API only returns the latest step result without executing a new step. (default: false)
Example Request
When ActionType = ASK_USER
(user_input is required)
When ActionType
is NOT ASK_USER
(send an empty {}
)
Get the latest step result without executing a new step
Response
Returns a JSON object containing the updated conversation step.
session_id
string
Unique session identifier
current_step
object
The latest step in the conversation
Response Handling
If the response contains:ActionType = CALL_TOOL
, you must call this API again to retrieve the step result.
Example Response 1
Example Response 2
Next Step: If "action": "CALL_TOOL" and "step_result": null
, make another API request to get the step result.
Last updated
Was this helpful?