Skip to main content
Task Templates are the core building block for structured work in Kodexa. They define everything about how a task behaves — what forms appear, which actions are available, how documents are organized, what team is assigned, whether an AI chat prompt greets the user, and whether an automated plan should execute when the task is created.

What is a Task Template?

A task template is a project-scoped configuration that acts as a blueprint for tasks. When a user creates a new task, they select a template which pre-configures the task with:
  • Name and description patterns
  • Data forms for structured data entry and review
  • Actions (buttons) for status transitions and data mutations
  • Document groups with file type filters, limits, and auto-population rules
  • Default team assignment
  • Default priority
  • Custom options (configurable form fields)
  • AI chat prompt for automatic AI assistance when a task is opened
  • AI naming to auto-generate task titles from document content
  • Planning mode for automated multi-step workflows
Every project can have multiple task templates, each representing a different type of work such as “Document Review”, “Data Extraction”, or “Quality Approval”.

Managing Task Templates

Viewing Templates

Navigate to your project and select Task Templates from the sidebar. The grid displays all templates with their names and descriptions. Click a template to open the editor.

Creating a Template

Click the add button to create a new task template. You will need to provide:
  • Name — A human-readable name (e.g., “Invoice Review”)
  • Slug — A URL-safe identifier used in API references and plan configurations
  • Description — What this template is for

Template Editor Tabs

The template editor provides several tabs for configuring different aspects:
TabPurpose
DetailsName, slug, description, AI naming, sub-task settings, and planned sub-tasks toggle
FormsAttach data forms for structured data display and editing
OptionsCustom task options, panel visibility, alert configuration, and LLM processing settings
ActionsDefine action buttons with status transitions and keyboard shortcuts
Chat PromptConfigure an automatic AI chat prompt when tasks are opened
DocumentsConfigure how documents are organized and filtered within tasks
PlannedVisual flow editor for automated plan workflows (visible when planned sub-tasks are enabled)
YAMLRaw YAML view of the full template configuration
When Enable Planned Sub-Tasks is checked on the Details tab, the Forms, Actions, and Chat Prompt tabs are hidden because planned workflows manage their own sub-tasks with separate templates. The Planned tab appears instead, providing the visual flow editor.

Template Metadata

Actions

Actions define the buttons that appear in a task’s toolbar. Each action can:
  • Change task status — Transition to a target status when clicked
  • Set attributes — Mutate data properties on the task
  • Trigger keyboard shortcuts — Bind to key combinations for fast review workflows
  • Display with icons and colors — Visual differentiation for different action types
Actions are important beyond the task UI — in Planning Mode, TASK plan steps can have action-specific dependency edges, meaning the next step in a workflow can depend on which action the reviewer clicked (e.g., proceed only if “Approve” was clicked, re-route if “Reject” was clicked).

Data Forms

Task templates can attach one or more data forms that define the structured data interface shown to users working on the task. Forms are configured with:
  • Data form reference — Which data form to use
  • Available panels — Which panels are visible
  • Custom properties — Form-specific configuration

Document Groups

Document groups control how documents are organized within a task:
name: "Source Documents"
documentFamilyFilter: "*.pdf OR *.xlsx"
maxHits: 5
automaticallyAdd: true
editable: true
uploadOnly: false
uniqueFilenames: true
PropertyDescription
nameDisplay name for the document group tab
documentFamilyFilterFile extension filter (e.g., *.pdf OR *.xlsx)
maxHitsMaximum number of documents allowed
maxPagesMaximum pages per document
maxSizeMaximum file size in bytes
automaticallyAddAuto-populate matching documents from the project store
editableWhether users can add/remove documents
uploadOnlyRestrict to uploading new files only (no existing file selection)
uniqueFilenamesPrevent duplicate filenames
titlePromptLLM prompt template for auto-generating task titles from document content (see AI Task Naming below)
hardMaxPagesHard maximum page count — documents exceeding this limit are rejected at upload
When a task is created, the new task dialog shows tabs for each document group, allowing users to select or upload documents matching each group’s criteria.

Custom Options

The options array defines configurable form fields that appear during task creation or editing:
tabName: "Settings"
name: "extractionMode"
label: "Extraction Mode"
type: "select"
required: true
default: "auto"
description: "How documents should be processed"
showIf: "advancedMode == true"
Options support:
  • Conditional visibility via showIf expressions
  • Feature flag gating via featureFlag
  • Developer-only fields via developerOnly
  • Popup display via showOnPopup (shown in the creation dialog)

Default Team

Task templates can specify a default team via the teamSlug field. When a user creates a task from this template, the team dropdown is automatically pre-populated with the matching team. The user can override this selection. See Teams and Task Assignment for details.
Setting a default team on your templates ensures tasks are automatically routed to the right group without requiring the creator to remember which team handles each type of work.

AI Chat Prompt

Task templates can configure an automatic chat prompt that fires when a user opens a task. This provides immediate AI assistance tailored to the task’s context, guiding users through document review, data validation, or any task-specific workflow.

How It Works

When a user opens a task created from a template with the chat prompt enabled:
  1. The platform checks if a chat session already exists for this task
  2. If no chat exists, it automatically:
    • Opens the chat panel on the right side of the workspace
    • Creates a new channel scoped to the task
    • Substitutes template variables into the configured prompt
    • Sends the prompt to the project’s AI assistant
  3. The message appears collapsed as “Requesting task assistance…” with an expand icon to view the full prompt text
  4. The AI assistant responds with context-aware guidance
If the task already has an existing chat session, no new chat is created — the user sees their previous conversation.

Configuring the Chat Prompt

Navigate to the Chat Prompt tab in the task template editor:
1

Enable the feature

Check Enable automatic chat prompt when task is opened. This reveals the prompt editor.
2

Write the prompt template

Use the prompt editor to write your prompt. Click the variable buttons above the editor to insert template variables at the cursor position.
3

Save the template

Click Save Changes. The chat prompt is now active for all new tasks created from this template.

Template Variables

The prompt supports variable substitution using {variableName} syntax. These are replaced with actual task data when the prompt is sent:
VariableDescription
{taskTitle}The task’s title
{taskDescription}The task’s description
{assignee}The display name of the assigned user
{templateName}The task template name
{documentFamilyPaths}Comma-separated list of document file paths
{knowledgeFeatures}Comma-separated list of knowledge feature names
{documentFamilyCount}Number of documents attached to the task

Example Prompts

Document review guidance:
You are assisting with a document review task: {taskTitle}

{taskDescription}

This task has {documentFamilyCount} document(s): {documentFamilyPaths}

Please review the associated documents and provide:
1. A summary of each document's key content
2. Any data quality issues or inconsistencies you notice
3. Suggested next steps for the reviewer
Financial analysis assistant:
You are a financial data expert assisting with: {taskTitle}

The following documents need analysis: {documentFamilyPaths}
Knowledge features applied: {knowledgeFeatures}

Please examine the extracted financial data and:
- Verify that key figures (totals, subtotals) are internally consistent
- Flag any values that appear unusual or outside expected ranges
- Summarize the financial position for the reviewer
Task-specific onboarding:
Welcome, {assignee}! You've been assigned to: {taskTitle}

{taskDescription}

To complete this task:
1. Review the documents in the left panel
2. Check the extracted data in the form view
3. Use the action buttons to approve or flag items for re-processing

Ask me any questions about the documents or the review process.
Chat prompts are especially effective when combined with Knowledge Features — the {knowledgeFeatures} variable tells the AI assistant what classification has already been applied, so it can provide more targeted guidance.

AI Task Naming

Task templates can configure automatic AI-powered naming so that tasks receive descriptive titles based on their document content instead of generic names like “Task 1”.

Configuring AI Naming

In the task template editor, the AI Naming section on the Details tab lets you define:
  • Prompt template — An LLM prompt with variable placeholders that will be replaced with task context. The prompt instructs the model how to generate a concise task title.
  • Enabled toggle — Turn AI naming on or off without deleting the prompt configuration.
Available variables for the naming prompt:
VariableDescription
{templateName}The task template name
{documentFamilyPaths}Comma-separated document paths
{knowledgeFeatures}Comma-separated knowledge feature names
{documentFamilyCount}Number of document families
When a task is created (either manually or via a plan), the platform:
  1. Gathers the task context (template name, documents, features)
  2. Substitutes the values into the configured prompt template
  3. Sends the prompt to the configured LLM
  4. Uses the response as the task title

Example Prompt

Generate a concise task title and brief description for a document review task.

Template: {templateName}
Documents: {documentFamilyPaths}
Knowledge Features: {knowledgeFeatures}

The title should be specific and reference the key documents or features.
This would produce titles like “Acme Corp Q4 2025 Invoice #4821” instead of “Task 12”.
AI naming also works with the titlePrompt field on document groups, which is evaluated when documents are added to a task. Configure it on the document group that contains the primary document for the task.

Sub-Task Templates

Templates can be marked as sub-task-only by setting properties.subTaskOnly: true in the metadata. These templates are hidden from the main task creation dialog and are only used when a Planning Mode plan creates child tasks.

Task Templates in Project Templates

When you build a Project Template, task templates are included as part of the template definition. When a new project is created from the project template, all task templates are automatically created with variable substitution applied (project ID, name, organization slug).