Skip to main content
POST
/
v1
/
test-cases
curl -X POST https://api.playgent.com/v1/test-cases \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Refund Request Flow",
    "agent_id": "agent_abc123",
    "type": "multi",
    "turns": [
      {
        "input": { "text": "I want a refund for order #1234" },
        "expected_behavior": "Agent should ask for order details and reason",
        "scorers": ["relevance", "completeness"],
        "ground_truth": "Order #1234 was placed on Dec 1, 2024 for $99.99",
        "context": ["Order #1234: Status=Delivered, Amount=$99.99"]
      }
    ],
    "tags": ["customer-support", "refunds", "critical-path"]
  }'
{
  "id": "tc_xyz789",
  "name": "Refund Request Flow",
  "agent_id": "agent_abc123",
  "type": "multi",
  "turns": [...],
  "tags": ["customer-support", "refunds", "critical-path"],
  "created_at": "2024-12-16T10:00:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://playgent.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Create a test case to evaluate your agent. Supports single and multi-turn conversations.
name
string
required
Name for the test case
agent_id
string
required
Agent to test against
type
string
Test type: single or multi (default: single)
turns
array
required
Array of conversation turns
tags
array
Tags for filtering and grouping test cases
id
string
required
Unique test case identifier
name
string
required
Test case name
agent_id
string
required
Associated agent ID
created_at
string
required
ISO 8601 timestamp
curl -X POST https://api.playgent.com/v1/test-cases \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Refund Request Flow",
    "agent_id": "agent_abc123",
    "type": "multi",
    "turns": [
      {
        "input": { "text": "I want a refund for order #1234" },
        "expected_behavior": "Agent should ask for order details and reason",
        "scorers": ["relevance", "completeness"],
        "ground_truth": "Order #1234 was placed on Dec 1, 2024 for $99.99",
        "context": ["Order #1234: Status=Delivered, Amount=$99.99"]
      }
    ],
    "tags": ["customer-support", "refunds", "critical-path"]
  }'
{
  "id": "tc_xyz789",
  "name": "Refund Request Flow",
  "agent_id": "agent_abc123",
  "type": "multi",
  "turns": [...],
  "tags": ["customer-support", "refunds", "critical-path"],
  "created_at": "2024-12-16T10:00:00Z"
}