Skip to content
OperadeDocs

Search documentation

Type to search documentation.

Documentation
Copy page
Open raw Markdown

Prefill an agent test from a conversation

Build a new Agent Testing definition from append-only conversation events through the selected user or agent message without deriving history from dashboard HTML.

Endpoint

POST/api/v1/workspaces/{workspace_id}/conversations/{conversation_id}/agent-tests/prefill

Authentication

Operation classAuthenticationMinimum roleAPI key
customer-apiBearer API key or dashboard session cookie; dashboard mutations also require X-CX-Request: 1.memberAllowed

Parameters

NameInTypeRequiredDescription
workspace_idpathstringYes—
conversation_idpathstringYes—

Request body

application/json request schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectPrefillBody—NoYes——
event_seqinteger——NoYes——

Example

cURL
curl --request POST 'https://operade.ai/api/v1/workspaces/ws_demo/conversations/conv_demo/agent-tests/prefill' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"event_seq":12}'
Request body JSON
{
  "event_seq": 12
}

Responses

StatusDescriptionContent
4XXHandled client errorapplication/json: ErrorResponse
200Successful Responseapplication/json: PrefillResponse

4XX application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectErrorResponse—NoYes——
errorobjectErrorItem—NoYes——
error.codestring——NoYes——
error.detailsobject——NoNo——
error.messagestring——NoYes——

200 application/json response schema

Field pathTypeReferenceFormatNullableRequiredEnumDescription
$objectPrefillResponse—NoYes——
agent_idstring——NoYes——
definitionobjectPrefillDefinition—NoYes——
definition.chat_historyarray<HistoryEntry>——NoYes——
definition.chat_history[]objectHistoryEntry—NoYes——
definition.chat_history[].messagestring or null——YesNo——
definition.chat_history[].rolestring——NoYes"user", "agent"—
definition.chat_history[].tool_callsarray<ToolCall>——NoNo——
definition.chat_history[].tool_calls[]objectToolCall—NoYes—Bagian stabil kontrak vendor; detail bertipe baru tetap dipertahankan.
definition.chat_history[].tool_calls[].params_as_jsonstring——NoYes——
definition.chat_history[].tool_calls[].request_idstring——NoYes——
definition.chat_history[].tool_calls[].tool_detailsobject or null——YesNo——
definition.chat_history[].tool_calls[].tool_has_been_calledboolean——NoYes——
definition.chat_history[].tool_calls[].tool_namestring——NoYes——
definition.chat_history[].tool_calls[].typestring or null——YesNo——
definition.chat_history[].tool_resultsarray<ToolResult>——NoNo——
definition.chat_history[].tool_results[]objectToolResult—NoYes——
definition.chat_history[].tool_results[].is_blockedboolean——NoNo——
definition.chat_history[].tool_results[].is_errorboolean——NoYes——
definition.chat_history[].tool_results[].request_idstring——NoYes——
definition.chat_history[].tool_results[].result_valuestring——NoYes——
definition.chat_history[].tool_results[].tool_has_been_calledboolean——NoYes——
definition.chat_history[].tool_results[].tool_latency_secsnumber——NoNo——
definition.chat_history[].tool_results[].tool_namestring——NoYes——
definition.chat_history[].tool_results[].typestring——NoYes——
definition.conversation_initiation_sourcestring——NoYes"unknown", "telegram_integration"—
definition.dynamic_variablesobject——NoYes——
definition.from_conversation_metadataobjectFromConversationMetadata—NoYes——
definition.from_conversation_metadata.conversation_idstring——NoYes——
definition.from_conversation_metadata.event_seqinteger——NoYes——
definition.from_conversation_metadata.original_agent_responsestring or null——YesNo——
definition.from_conversation_metadata.system__conversation_idstring or null——YesNo——
definition.from_conversation_metadata.system__time_utcstring—date-timeNoYes——
definition.typestring——NoYes"simulation", "llm"—

Response example

Response body JSON
{
  "agent_id": "string",
  "definition": {
    "type": "simulation",
    "chat_history": [],
    "dynamic_variables": {},
    "conversation_initiation_source": "unknown",
    "from_conversation_metadata": {
      "conversation_id": "string",
      "event_seq": 0,
      "system__time_utc": "2026-01-01T00:00:00Z"
    }
  }
}

Errors

Reviewed common and route-declared errors are summarized here; the list is not exhaustive. Start with the distributed error index to find each code's canonical domain page.

StatusCodeDescription
401unauthenticatedAuthentication is missing, invalid, or revoked.
403forbiddenThe authenticated caller does not have access to this operation.
404not_foundThe requested workspace resource was not found.
422validation_failedThe request did not pass field or business validation.
On this page
  1. Endpoint
  2. Authentication
  3. Parameters
  4. Request body
  5. application/json request schema
  6. Example
  7. Responses
  8. 4XX application/json response schema
  9. 200 application/json response schema
  10. Response example
  11. Errors
  12. Related operations