Task data model

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNoA short human-readable title for the coding agent task.
instructionsstringNoThe natural-language instructions given to the coding agent.
statusenumNoValues: PENDING, RUNNING, BLOCKED, COMPLETED, FAILED, CANCELLED, EXPIRED, OTHER
model_idstringNo
user_idstringNo(reference to HrisEmployee)
repo_urlstringNoThe git repository that the coding agent works in.
source_branch_identifierstringNoThe name of the branch that the coding agent starts its work from.
target_branch_identifierstringNoThe name of the branch that the coding agent pushed its work to.
pullrequest_urlstringNoThe pull/merge request that the coding agent opened for its work.
web_urlstringNoThe provider's own web page for this task.
messagesGenaiContent[]NoThe conversation between the user and the coding agent.
messages[].roleenumNoValues: SYSTEM, USER, ASSISTANT
messages[].contentstringYes
messages[].imagesstring[]NoImages for the model to evaluate with this message, as base64 data URLs (data:image/png;base64,...). Only for models with has_vision.
summarystringNoThe coding agent's summary of the work that it performed.
errorstringNoThe failure description (when the status is FAILED).
files_changednumberNo
lines_addednumberNo
lines_deletednumberNo
tokens_usednumberNo
started_atstring (date-time)NoWhen the coding agent started working on the task. (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
completed_atstring (date-time)NoWhen the coding agent stopped working on the task. (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
agent_idstringNoid of the genai_agent (the reusable agent/preset configuration) that runs this task.
organization_idstringNoid of the genai_organization (the organization or execution environment) that this task runs under.

TypeScript

TypeScript
export type GenaiTask = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // A short human-readable title for the coding agent task.
	instructions?: string; // The natural-language instructions given to the coding agent.
	status?: 'PENDING' | 'RUNNING' | 'BLOCKED' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'EXPIRED' | 'OTHER';
	model_id?: string;
	user_id?: string; // (reference to HrisEmployee)
	repo_url?: string; // The git repository that the coding agent works in.
	source_branch_identifier?: string; // The name of the branch that the coding agent starts its work from.
	target_branch_identifier?: string; // The name of the branch that the coding agent pushed its work to.
	pullrequest_url?: string; // The pull/merge request that the coding agent opened for its work.
	web_url?: string; // The provider's own web page for this task.
	messages?: []; // The conversation between the user and the coding agent.
	summary?: string; // The coding agent's summary of the work that it performed.
	error?: string; // The failure description (when the status is FAILED).
	files_changed?: number;
	lines_added?: number;
	lines_deleted?: number;
	tokens_used?: number;
	started_at?: string-time; // When the coding agent started working on the task. (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	completed_at?: string-time; // When the coding agent stopped working on the task. (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	agent_id?: string; // id of the genai_agent (the reusable agent/preset configuration) that runs this task.
	organization_id?: string; // id of the genai_organization (the organization or execution environment) that this task runs under.
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodGenaiTask = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("A short human-readable title for the coding agent task."),
	instructions: z.string().optional().describe("The natural-language instructions given to the coding agent."),
	status: z.enum("PENDING", "RUNNING", "BLOCKED", "COMPLETED", "FAILED", "CANCELLED", "EXPIRED", "OTHER").optional(),
	model_id: z.string().optional(),
	user_id: z.string().optional().describe("(reference to HrisEmployee)"),
	repo_url: z.string().optional().describe("The git repository that the coding agent works in."),
	source_branch_identifier: z.string().optional().describe("The name of the branch that the coding agent starts its work from."),
	target_branch_identifier: z.string().optional().describe("The name of the branch that the coding agent pushed its work to."),
	pullrequest_url: z.string().optional().describe("The pull/merge request that the coding agent opened for its work."),
	web_url: z.string().optional().describe("The provider's own web page for this task."),
	messages: z.array().optional().describe("The conversation between the user and the coding agent."),
	summary: z.string().optional().describe("The coding agent's summary of the work that it performed."),
	error: z.string().optional().describe("The failure description (when the status is FAILED)."),
	files_changed: z.number().optional(),
	lines_added: z.number().optional(),
	lines_deleted: z.number().optional(),
	tokens_used: z.number().optional(),
	started_at: z.string-time().optional().describe("When the coding agent started working on the task. (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	completed_at: z.string-time().optional().describe("When the coding agent stopped working on the task. (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	agent_id: z.string().optional().describe("id of the genai_agent (the reusable agent/preset configuration) that runs this task."),
	organization_id: z.string().optional().describe("id of the genai_organization (the organization or execution environment) that this task runs under."),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class GenaiTaskStatus(str, Enum):
	PENDING = 'PENDING'
	RUNNING = 'RUNNING'
	BLOCKED = 'BLOCKED'
	COMPLETED = 'COMPLETED'
	FAILED = 'FAILED'
	CANCELLED = 'CANCELLED'
	EXPIRED = 'EXPIRED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class GenaiTask:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""A short human-readable title for the coding agent task."""
	name: Optional[str]
	"""The natural-language instructions given to the coding agent."""
	instructions: Optional[str]
	status: Optional[GenaiTaskStatus]
	model_id: Optional[str]
	"""(reference to HrisEmployee)"""
	user_id: Optional[str]
	"""The git repository that the coding agent works in."""
	repo_url: Optional[str]
	"""The name of the branch that the coding agent starts its work from."""
	source_branch_identifier: Optional[str]
	"""The name of the branch that the coding agent pushed its work to."""
	target_branch_identifier: Optional[str]
	"""The pull/merge request that the coding agent opened for its work."""
	pullrequest_url: Optional[str]
	"""The provider's own web page for this task."""
	web_url: Optional[str]
	"""The conversation between the user and the coding agent."""
	messages: Optional[PropertyGenaiTaskMessages]
	"""The coding agent's summary of the work that it performed."""
	summary: Optional[str]
	"""The failure description (when the status is FAILED)."""
	error: Optional[str]
	files_changed: Optional[int]
	lines_added: Optional[int]
	lines_deleted: Optional[int]
	tokens_used: Optional[int]
	"""When the coding agent started working on the task. (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	started_at: Optional[str]
	"""When the coding agent stopped working on the task. (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	completed_at: Optional[str]
	"""id of the genai_agent (the reusable agent/preset configuration) that runs this task."""
	agent_id: Optional[str]
	"""id of the genai_organization (the organization or execution environment) that this task runs under."""
	organization_id: Optional[str]
Are we missing anything? Let us know
Was this page helpful?