AiTaskTemplate
Type: Object
A reusable blueprint for a single, well-defined piece of work that an AI agent can perform. In the context of a print factory, complex processes are broken down into smaller, repeatable steps. This resource defines what one of those steps looks like. For example, a 'Preflight Artwork' task template would define the instructions, expected inputs (like a PDF file), and expected outputs (like a list of errors or an 'approved' status) for that specific job. These templates are the building blocks of an AI 'Team's' workflow, allowing you to construct complex, automated processes from a library of standardized, reusable components.
Fields
| Name | Type | Args | Description | Deprecated |
|---|---|---|---|---|
| agent | AiAgent! | The agent assigned to this task template | ||
| agentId | ID! | |||
| contextTemplate | String | Template for additional context to provide to the agent, supports placeholders | ||
| createdAt | DateTime! | When the task template was created | ||
| dependsOn | [AiTaskTemplate!]! | filter: AiTaskTemplateFilterInputlimit: Intoffset: Intsort: [AiTaskTemplateSortInput] | ||
| description | String! | Template description with placeholders like that will be interpolated at execution time | ||
| expectedOutput | String | Description of expected output format for this task | ||
| id | ID! | |||
| metadata | JsonString | Additional metadata for the task template | ||
| name | String! | The name of the task template | ||
| outputJsonSchema | JsonString | JSON Schema for structured output. When provided, the task will use JSON mode with this schema to ensure the agent returns valid JSON matching the schema | ||
| position | Int | Order within the team workflow (lower numbers execute first in sequential mode) | ||
| priority | Int | Task priority (higher numbers = higher priority) | ||
| team | AiTeam! | |||
| teamId | ID! | |||
| updatedAt | DateTime! | When the task template was last updated |