Skip to main content
Base URL: https://rl-gym-api.collinear.ai

List Templates

List all available templates (scenario presets).
GET /scenarios
Response: 200 OK
[
  {
    "scenario_id": "hr_recruiting",
    "name": "HR Recruiting Tasks",
    "description": "End-to-end recruiting workflow tasks",
    "num_tasks": 12,
    "num_npcs": 10,
    "tool_servers": [
      { "name": "hrms", "server_type": "http" },
      { "name": "email", "server_type": "http" }
    ]
  }
]

List Tasks for a Template

Get all tasks within a template, including instructions, tool server config, rubrics, and seed data.
GET /scenarios/{scenario_id}/tasks
Path parameters:
ParameterTypeDescription
scenario_idstringTemplate identifier (e.g. hr_recruiting)
Response: 200 OK
{
  "scenario_id": "hr_recruiting",
  "tasks": [
    {
      "task_id": "hr-102",
      "name": "Schedule Initial Candidate Screening",
      "version": "1.0",
      "category": "recruiting",
      "difficulty": "medium",
      "visibility": "public",
      "description": "Schedule an initial screening call with the candidate...",
      "tool_servers": [
        { "name": "email", "tool_server_url": "https://<environment-url>/email" },
        { "name": "calendar", "tool_server_url": "https://<environment-url>/calendar" }
      ],
      "rubric": {
        "task_id": "hr-102",
        "title": "Schedule Initial Candidate Screening",
        "overview": "Verify the agent correctly schedules...",
        "success_criteria": ["Calendar event created with correct time"],
        "scoring": [
          { "label": "Full Credit", "description": "All requirements met" },
          { "label": "Partial Credit", "description": "Calendar created but no notification" },
          { "label": "No Credit", "description": "Task not completed" }
        ]
      },
      "npc_profiles": [
        {
          "profile_id": "lisa-anderson",
          "first_name": "Lisa",
          "last_name": "Anderson",
          "email": "lisa.anderson@techcorp.com",
          "occupation": "VP of HR / CHRO"
        }
      ]
    }
  ]
}

Get Task Rubric

Get the evaluation rubric for a specific task.
GET /scenarios/{scenario_id}/tasks/{task_id}/rubric
Response: 200 OK
{
  "task_id": "hr-102",
  "title": "Schedule Initial Candidate Screening",
  "overview": "Verify the agent correctly schedules a screening call...",
  "success_criteria": ["Calendar event exists with correct attendees and time"],
  "testing_requirements": ["Verify calendar event was created", "Verify email was sent"],
  "quality_criteria": ["Professional tone in email"],
  "notes": ["Agent should not double-book the time slot"],
  "scoring": [
    { "label": "Full Credit", "description": "All requirements met" },
    { "label": "Partial Credit", "description": "Partial completion" },
    { "label": "No Credit", "description": "Task not completed" }
  ]
}

List NPC Profiles

Get the NPC (Non-Playable Character) profiles for a template. NPCs are simulated users that interact with the agent in real time (e.g., a hiring manager who responds to messages).
GET /scenarios/{scenario_id}/npcs
Response: 200 OK
{
  "scenario_id": "hr_recruiting",
  "npc_profiles": [
    {
      "profile_id": "lisa-anderson",
      "first_name": "Lisa",
      "last_name": "Anderson",
      "email": "lisa.anderson@techcorp.com",
      "occupation": "VP of HR / CHRO",
      "public_info": "15 years in HR leadership..."
    }
  ]
}

List Seed Data Files

List available seed data files for a template.
GET /scenarios/{scenario_id}/seed_data
Response: 200 OK
{
  "scenario_id": "hr",
  "files": ["leave_policy.md", "org_chart.md", "onboarding_policy.md"]
}

Get Seed Data File

Get the contents of a specific seed data file.
GET /scenarios/{scenario_id}/seed_data/{filename}
Path parameters:
ParameterTypeDescription
scenario_idstringTemplate identifier
filenamestringFile path within the seed_data directory
Response: 200 OK
{
  "scenario_id": "hr",
  "filename": "leave_policy.md",
  "content": "# Leave Policy\n\nEmployees are entitled to..."
}
Errors: 400 if filename contains path traversal, 404 if file not found.

Download Verifier Bundle

Download the verifier modules for a template as a ZIP archive. The ZIP contains an importable Python package structure.
GET /scenarios/{scenario_id}/verifiers/bundle
Response: 200 OK — binary ZIP file (Content-Type: application/zip) Errors: 404 if scenario not found or no verifiers available.