API Reference meta-tasks

Create a meta-task

POST/projects/{project_id}/task-types/

Create a reusable meta-task definition — the script or agent contract every run instantiates.

Parameters

Body fieldRequiredDescription
nameyesDisplay name
identifiernoStable id for create_task and API calls (generated when omitted)
scriptnoWorkflow source — a workflow.py or workflow.ts body
execution_modenoscript (default) or agent
script_languagenopython (default) or typescript
workspace_id / agent_id / docker_image_idnoBindings: where it runs, who runs it, on which image
auto_approvenoSkip human approval gates (default false)
extract_memorynoDistill memories from completed runs (default false)
allow_mcpnoLet the task call project MCP servers (default false)
result_schemanoJSON schema the run result should match

Request

curl -X POST "$ALLYBUILD_API_URL/projects/$PROJECT_ID/task-types/" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json"
  -d '{
    "name": "Weekly report",
    "identifier": "weekly-report",
    "script_language": "python",
    "script": "def run(params, reporter):\n    reporter.set_phase(\"Fetching\")",
    "extract_memory": true
  }'

Response

{
  "id": "5f4e3d2c-...",
  "name": "Weekly report",
  "identifier": "weekly-report",
  "execution_mode": "script",
  "script_language": "python",
  "extract_memory": true,
  "version": 1
}