AI Tests

Improve evaluator scenarios

Changed on

Starts an interactive session that improves selected evaluator scenarios from a natural-language instruction. Returns a progress ID to poll with the improve-scenarios-progress endpoint.

post/ai/tests/test_framework/v1/scenarios/scenario-agent

Request

  • Base URL: https://api.telnyx.com/v2
  • URL: https://api.telnyx.com/v2/ai/tests/test_framework/v1/scenarios/scenario-agent
  • Auth: HTTP bearer

Request body

user_messagestring required

What the assistant should improve about the selected scenarios.

agent_idinteger nullable
session_idinteger nullable
apply_changesboolean
updated_scenariosobject[]
num_scenariosinteger
knowledge_baseinteger[]
agent_resolution_responsestring
scenarios_needing_agentinteger[]
pending_tool_callsobject[] nullable

Example request

{
  "user_message": "Make the callers ask about damaged packaging too.",
  "scenarios": "all",
  "agent_id": 1259,
  "apply_changes": true
}

Response

Improvement session initiated.

progress_idstring required
session_idinteger nullable

Example response

{
  "progress_id": "c8f5d2b3-4e5f-6a7b-9c0d-1f2a3b4c5d6e",
  "session_id": 417
}

Changes