# Task Template Builder (`sovanza.inc/task-template-builder`) Actor

Task Template Builder creates reusable SOPs, checklists, project tasks, and automation templates from task titles and goals. It generates steps, subtasks, acceptance criteria, dependencies, tags, roles, time estimates, and automation hints for business workflows.

- **URL**: https://apify.com/sovanza.inc/task-template-builder.md
- **Developed by:** [Sovanza](https://apify.com/sovanza.inc) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 task templates

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### 📋 Task Template Generator – Automate Workflow & Project Tasks

Create **reusable task templates** and accelerate workflow setup for projects, teams, and daily operations. Ideal for agencies, project managers, and productivity-focused teams. Save time by generating **structured steps, acceptance criteria, dependencies, and automation hints** in one run—**no manual SOP writing from scratch**.

**How it works:** you pass a list of task definitions (`tasks`: titles, goals, categories, optional hints). The actor **classifies** each item, then emits **deterministic, rule-based templates** (checklist, SOP, project task, automation JSON, or hybrid). **No paid external APIs**—all generation is built-in logic.

---

### Optimized description

Task Template Builder is a powerful **template generator** for structured workflows: batch-create playbooks for sales follow-ups, HR onboarding, marketing launches, support SOPs, and operations. Export from Apify as **JSON, CSV, or Excel**, or save a combined bundle to the **key-value store** for downstream tools.

---

### 🚀 Start creating task templates

Generate structured tasks instantly and streamline your workflow.

👉 **Reusable templates** from a single `tasks` array  
👉 **Five template modes** (checklist → hybrid)  
👉 **Smart defaults** for priority, time, recurrence, roles, tags  
👉 **No external API keys** — rule-based only  

Click **Run** in Apify, then open the **Dataset** (and optional KV export).

---

### 🧠 What this tool does

This actor **does not** replace Asana/Linear/Jira—it **produces template content** you can paste, import, or automate elsewhere.

Instead of rewriting checklists repeatedly, you:

- Define **multiple tasks per run** (`tasks` JSON array — **required**)  
- Get **steps**, optional **subtasks**, **acceptance criteria**, **dependencies**, **required inputs**, **automation hints**, **recurrence suggestions**, **tags**, and **`markdownTemplate` + `jsonTemplate`** fields (depending on `outputStyle`)  
- Optionally write everything to **`dataset`**, **`kv_store`**, or **both** (`outputMode`)  

---

### ⚡ Key features

| Feature | Detail |
|---------|--------|
| **Batch generation** | One Apify run → many templates (`maxTasks` cap) |
| **Task classification** | Infers `taskType` from keywords (follow-up, content, onboarding, support, etc.) |
| **Template modes** | `checklist`, `sop`, `project_task`, `automation_json`, **`hybrid`** (default) |
| **Configurable sections** | Toggle subtasks, acceptance criteria, dependencies, automation hints, time/role/tag blocks |
| **Dual format** | `structured_json`, `markdown_like`, or **`both`** |
| **Operational output** | Dataset rows + optional combined KV blob (`TASK_TEMPLATE_OUTPUT` by default) |
| **Resilience** | Bad rows → `type: __error__`; final **`__summary__`** row |

---

### 🎯 Real-world use cases

| Area | Example |
|------|---------|
| **Project management** | Standard kickoff / delivery checklists per project type |
| **Agency workflows** | Client onboarding, SEO sprints, campaign launch playbooks |
| **Team operations** | Weekly reviews, reporting cadences, admin routines |
| **Productivity systems** | Personal or team template libraries from a seed list |
| **Sales & support** | Follow-up sequences, ticket handling SOPs |

---

### 🛠️ How to use

1. Open the actor on Apify → **Input**.  
2. Provide the **`tasks`** array (each item needs at least **`title` or `goal`**).  
3. Choose **`templateMode`**, **`outputStyle`**, optional toggles (`includeSubtasks`, `includeAcceptanceCriteria`, …).  
4. Set **`outputMode`** (`dataset`, `kv_store`, or `both`).  
5. **Run** → **Dataset** → download CSV/JSON/Excel or consume via API.  
6. (Optional) Schedule runs whenever you onboard new playbook batches.

#### Local run

```bash
cd task-template-builder
pip install -r requirements.txt
python main.py
````

Uses `INPUT.json` when running outside Apify (same shape as Console input).

***

### Input configuration

| Field | Description |
|-------|--------------|
| `tasks` (**required**) | Array of `{ title?, goal?, category?, context?, priorityHint?, estimatedMinutes?, recurrenceHint?, ownerRole?, department?, inputNotes? }` |
| `templateMode` | `checklist` | `sop` | `project_task` | `automation_json` | **`hybrid`** |
| `includeSubtasks`, `includeAcceptanceCriteria`, `includeDependencies`, `includeRecurrenceSuggestion`, `includeAutomationHints`, `includeTimeEstimate`, `includeRoleSuggestion`, `includeTags`, `normalizePriority` | Section toggles (defaults mostly `true`) |
| `outputStyle` | `structured_json` | `markdown_like` | **`both`** |
| `outputMode` | **`dataset`** | `kv_store` | `both` |
| `outputKvStoreKey` | KV key for combined export (default `TASK_TEMPLATE_OUTPUT`) |
| `maxTasks` | Upper bound per run (default `100`, max `1000`) |
| `includeDebugFields` | Add classification/debug metadata |

Full schema: `INPUT_SCHEMA.json`.

#### Example input

```json
{
  "tasks": [
    {
      "title": "Follow up with new lead after demo",
      "goal": "Send a structured follow-up after a product demo",
      "category": "sales",
      "priorityHint": "high"
    },
    {
      "title": "Publish weekly blog post",
      "goal": "Write and publish this week's blog post",
      "category": "content",
      "recurrenceHint": "weekly"
    }
  ],
  "templateMode": "hybrid",
  "outputStyle": "both",
  "outputMode": "dataset"
}
```

***

### 📦 Output

Each successful task yields a **`type: task_template`** row with fields such as:

- `inputTitle`, `normalizedTitle`, `goal`, `category`, `taskType`
- `description`, `ownerRole`, `department`, `priority`, `estimatedMinutes`
- `steps[]`, optional `subtasks[]`, `acceptanceCriteria[]`, `dependencies[]`, `requiredInputs[]`
- `automationHints[]`, `recurrenceSuggestion`, `tags[]`
- `markdownTemplate` and/or **`jsonTemplate`** (per `outputStyle`)
- `timestamp`

A **`type: __summary__`** row aggregates counts. Errors use **`type: __error__`**.

Minimal shape (truncated):

```json
{
  "type": "task_template",
  "inputTitle": "Follow up with new lead after demo",
  "taskType": "follow_up",
  "templateMode": "hybrid",
  "priority": "high",
  "steps": [{ "stepNumber": 1, "title": "…", "details": "…" }],
  "markdownTemplate": "## …",
  "jsonTemplate": { "templateKind": "…" },
  "timestamp": "2026-04-01T10:00:00+00:00"
}
```

***

### 🔄 Supported workflows (conceptual)

Templates are usable for recurring **project workflows**, **marketing campaigns**, **sales motions**, **ops**, and **daily routines**. Integration with PM tools happens by **copying Markdown/JSON**, using the **dataset API**, or building a downstream actor—not via built-in connectors to third-party SaaS accounts.

***

### 📊 Benefits

- Cuts repetitive documentation time
- Improves **consistency** across teams
- Gives **starting structure** before human refinement
- Scales batch generation via **`maxTasks`**

***

### ❓ Frequently asked questions

| Question | Answer |
|----------|--------|
| **vs. a normal task manager?** | This **generates** reusable template **content**—it doesn’t manage live tasks inside a PM app. |
| **Customization?** | Yes—supply titles, goals, categories, recurrence/priority hints, and toggle output sections. |
| **Individuals vs teams?** | Works for solo operators or organizations standardizing libraries. |
| **Recurring projects?** | Yes—encode recurrence hints per task row and reuse the same playbook pattern. |
| **Integrates with PM tools?** | **Export** Markdown/JSON/CSV from Apify; import into ClickUp/Notion/etc. manually or via automation you build. |
| **Technical skills?** | No code required—JSON input is edited in Console. Developers can call the API. |
| **Multiple templates per run?** | Yes—that’s the default **`tasks` array**. |
| **Scale?** | Use `maxTasks` and scheduled runs within Apify quotas. |

***

### Template modes & output destinations

| `templateMode` | Best for |
|----------------|----------|
| `checklist` | Quick bullets |
| `sop` | Step-by-step runbooks |
| `project_task` | PM-oriented fields |
| `automation_json` | Machine-friendly payloads |
| `hybrid` | JSON + Markdown together |

| `outputMode` | Behavior |
|--------------|-----------|
| `dataset` | One row per template + summary (**default**) |
| `kv_store` | Combined export under `outputKvStoreKey` |
| `both` | Dataset + KV |

***

### Limitations

- **Rule-based** archetypes—not custom org-specific regulation text out of the box.
- **English** outputs today.
- **No LLM calls** inside this repo—deterministic templating only.
- Specialized compliance SOPs may still need SME review after generation.

***

### Future roadmap (ideas)

- CSV import helpers
- Deeper exporters for named PM tools
- Multilingual variants
- Optional AI refinement with external credentials (outside current core)

***

### 📈 Why use this tool?

Manual task documentation is slow and inconsistent. This actor delivers **immediate structure**—ready to edit, approve, and deploy—straight from structured input.

***

### 🚀 Get started

Paste your **`tasks`** list, choose **`hybrid`** + **`both`** output formats for maximum flexibility, run on Apify, and download your first template bundle from the **Dataset** tab.

# Actor input Schema

## `tasks` (type: `array`):

List of task requests to turn into reusable templates. Each item should include at least a title or goal.

## `templateMode` (type: `string`):

Style of template to generate. 'hybrid' combines structured JSON with a markdown overview.

## `includeSubtasks` (type: `boolean`):

Generate optional subtask items for each template.

## `includeAcceptanceCriteria` (type: `boolean`):

Generate completion conditions for each template.

## `includeDependencies` (type: `boolean`):

Generate prerequisite dependencies for each template.

## `includeRecurrenceSuggestion` (type: `boolean`):

Suggest a recurrence pattern for each template.

## `includeAutomationHints` (type: `boolean`):

Suggest automation opportunities for each template.

## `includeTimeEstimate` (type: `boolean`):

Estimate time to complete each task.

## `includeRoleSuggestion` (type: `boolean`):

Suggest an owner role and department for each task.

## `includeTags` (type: `boolean`):

Generate descriptive tags for each template.

## `normalizePriority` (type: `boolean`):

Normalize priority hints into a standard scale (low/medium/high/urgent).

## `outputStyle` (type: `string`):

Format of the template output. 'both' includes structured JSON and a markdown representation.

## `outputMode` (type: `string`):

Where to write results. 'dataset' writes individual rows, 'kv\_store' writes a combined export, 'both' does both.

## `outputKvStoreKey` (type: `string`):

Key name used when writing the combined export to the key-value store.

## `maxTasks` (type: `integer`):

Maximum number of tasks to process in a single run.

## `includeDebugFields` (type: `boolean`):

Add diagnostic fields (classification reason, inferred signals, warnings) to each output record.

## Actor input object example

```json
{
  "tasks": [
    {
      "title": "Follow up with new lead after demo",
      "goal": "Send a structured follow-up after a product demo",
      "category": "sales",
      "priorityHint": "high"
    },
    {
      "title": "Publish weekly blog post",
      "goal": "Write and publish this week's blog post on schedule",
      "category": "content"
    }
  ],
  "templateMode": "hybrid",
  "includeSubtasks": true,
  "includeAcceptanceCriteria": true,
  "includeDependencies": true,
  "includeRecurrenceSuggestion": true,
  "includeAutomationHints": true,
  "includeTimeEstimate": true,
  "includeRoleSuggestion": true,
  "includeTags": true,
  "normalizePriority": true,
  "outputStyle": "both",
  "outputMode": "dataset",
  "outputKvStoreKey": "TASK_TEMPLATE_OUTPUT",
  "maxTasks": 100,
  "includeDebugFields": false
}
```

# Actor output Schema

## `templates` (type: `string`):

Generated task templates and any error rows in the default dataset.

## `export` (type: `string`):

Full JSON export with templates and summary when outputMode is kv\_store or both.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tasks": [
        {
            "title": "Follow up with new lead after demo",
            "goal": "Send a structured follow-up after a product demo",
            "category": "sales",
            "priorityHint": "high"
        },
        {
            "title": "Publish weekly blog post",
            "goal": "Write and publish this week's blog post on schedule",
            "category": "content"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sovanza.inc/task-template-builder").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "tasks": [
        {
            "title": "Follow up with new lead after demo",
            "goal": "Send a structured follow-up after a product demo",
            "category": "sales",
            "priorityHint": "high",
        },
        {
            "title": "Publish weekly blog post",
            "goal": "Write and publish this week's blog post on schedule",
            "category": "content",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("sovanza.inc/task-template-builder").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tasks": [
    {
      "title": "Follow up with new lead after demo",
      "goal": "Send a structured follow-up after a product demo",
      "category": "sales",
      "priorityHint": "high"
    },
    {
      "title": "Publish weekly blog post",
      "goal": "Write and publish this week'\''s blog post on schedule",
      "category": "content"
    }
  ]
}' |
apify call sovanza.inc/task-template-builder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sovanza.inc/task-template-builder",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Task Template Builder",
        "description": "Task Template Builder creates reusable SOPs, checklists, project tasks, and automation templates from task titles and goals. It generates steps, subtasks, acceptance criteria, dependencies, tags, roles, time estimates, and automation hints for business workflows.",
        "version": "0.0",
        "x-build-id": "R83zzJwWG7F3uEcse"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sovanza.inc~task-template-builder/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sovanza.inc-task-template-builder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sovanza.inc~task-template-builder/runs": {
            "post": {
                "operationId": "runs-sync-sovanza.inc-task-template-builder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sovanza.inc~task-template-builder/run-sync": {
            "post": {
                "operationId": "run-sync-sovanza.inc-task-template-builder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "tasks"
                ],
                "properties": {
                    "tasks": {
                        "title": "Tasks",
                        "type": "array",
                        "description": "List of task requests to turn into reusable templates. Each item should include at least a title or goal.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "title": {
                                    "title": "Task Title",
                                    "type": "string",
                                    "description": "Short name for the task",
                                    "editor": "textfield"
                                },
                                "goal": {
                                    "title": "Task Goal",
                                    "type": "string",
                                    "description": "What the task should accomplish",
                                    "editor": "textfield"
                                },
                                "category": {
                                    "title": "Category",
                                    "type": "string",
                                    "description": "Task category (e.g. sales, marketing, hr, operations, support, content, recruiting, admin)",
                                    "editor": "textfield"
                                },
                                "context": {
                                    "title": "Context",
                                    "type": "string",
                                    "description": "Additional context or notes about the task",
                                    "editor": "textfield"
                                },
                                "priorityHint": {
                                    "title": "Priority Hint",
                                    "type": "string",
                                    "description": "Suggested priority: low, medium, high, urgent",
                                    "editor": "textfield"
                                },
                                "estimatedMinutes": {
                                    "title": "Estimated Minutes",
                                    "type": "integer",
                                    "description": "Optional time estimate in minutes"
                                },
                                "recurrenceHint": {
                                    "title": "Recurrence Hint",
                                    "type": "string",
                                    "description": "Suggested recurrence: daily, weekly, monthly, after_each_event, one_time, on_new_record",
                                    "editor": "textfield"
                                },
                                "ownerRole": {
                                    "title": "Owner Role",
                                    "type": "string",
                                    "description": "Role of the person responsible (e.g. Sales Rep, HR Manager)",
                                    "editor": "textfield"
                                },
                                "department": {
                                    "title": "Department",
                                    "type": "string",
                                    "description": "Department this task belongs to",
                                    "editor": "textfield"
                                },
                                "inputNotes": {
                                    "title": "Input Notes",
                                    "type": "string",
                                    "description": "Free-form notes about what inputs the task needs",
                                    "editor": "textfield"
                                }
                            }
                        }
                    },
                    "templateMode": {
                        "title": "Template Mode",
                        "enum": [
                            "checklist",
                            "sop",
                            "project_task",
                            "automation_json",
                            "hybrid"
                        ],
                        "type": "string",
                        "description": "Style of template to generate. 'hybrid' combines structured JSON with a markdown overview.",
                        "default": "hybrid"
                    },
                    "includeSubtasks": {
                        "title": "Include Subtasks",
                        "type": "boolean",
                        "description": "Generate optional subtask items for each template.",
                        "default": true
                    },
                    "includeAcceptanceCriteria": {
                        "title": "Include Acceptance Criteria",
                        "type": "boolean",
                        "description": "Generate completion conditions for each template.",
                        "default": true
                    },
                    "includeDependencies": {
                        "title": "Include Dependencies",
                        "type": "boolean",
                        "description": "Generate prerequisite dependencies for each template.",
                        "default": true
                    },
                    "includeRecurrenceSuggestion": {
                        "title": "Include Recurrence Suggestion",
                        "type": "boolean",
                        "description": "Suggest a recurrence pattern for each template.",
                        "default": true
                    },
                    "includeAutomationHints": {
                        "title": "Include Automation Hints",
                        "type": "boolean",
                        "description": "Suggest automation opportunities for each template.",
                        "default": true
                    },
                    "includeTimeEstimate": {
                        "title": "Include Time Estimate",
                        "type": "boolean",
                        "description": "Estimate time to complete each task.",
                        "default": true
                    },
                    "includeRoleSuggestion": {
                        "title": "Include Role Suggestion",
                        "type": "boolean",
                        "description": "Suggest an owner role and department for each task.",
                        "default": true
                    },
                    "includeTags": {
                        "title": "Include Tags",
                        "type": "boolean",
                        "description": "Generate descriptive tags for each template.",
                        "default": true
                    },
                    "normalizePriority": {
                        "title": "Normalize Priority",
                        "type": "boolean",
                        "description": "Normalize priority hints into a standard scale (low/medium/high/urgent).",
                        "default": true
                    },
                    "outputStyle": {
                        "title": "Output Style",
                        "enum": [
                            "structured_json",
                            "markdown_like",
                            "both"
                        ],
                        "type": "string",
                        "description": "Format of the template output. 'both' includes structured JSON and a markdown representation.",
                        "default": "both"
                    },
                    "outputMode": {
                        "title": "Output Mode",
                        "enum": [
                            "dataset",
                            "kv_store",
                            "both"
                        ],
                        "type": "string",
                        "description": "Where to write results. 'dataset' writes individual rows, 'kv_store' writes a combined export, 'both' does both.",
                        "default": "dataset"
                    },
                    "outputKvStoreKey": {
                        "title": "Output KV Store Key",
                        "type": "string",
                        "description": "Key name used when writing the combined export to the key-value store.",
                        "default": "TASK_TEMPLATE_OUTPUT"
                    },
                    "maxTasks": {
                        "title": "Max Tasks",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of tasks to process in a single run.",
                        "default": 100
                    },
                    "includeDebugFields": {
                        "title": "Include Debug Fields",
                        "type": "boolean",
                        "description": "Add diagnostic fields (classification reason, inferred signals, warnings) to each output record.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
