Space Docs
API ReferenceAgent Task

agentTask.create

Type: Mutation · Auth: Workspace-aware

Input

FieldTypeRequiredDefaultDescription
taskTypestringYesTask type
sourceTypeenum(event, conversation, schedule, operator, workflow, automation_rule)YesSource type
sourceRefIdstringNoID of the associated source ref
entityTypestringNoEntity type
entityIdstringNoID of the associated entity
titlestringYesTitle
descriptionstringNoDescription
priorityintegerYes100Priority
assignedAgentRoleunknownNoAssigned agent role
assignedAgentIdunknownNoID of the associated assigned agent
executionModeenum(deterministic, agentic, hybrid)Yes"agentic"Execution mode
approvalPolicyenum(auto_execute, draft_for_review, agent_review, restricted)Yes"draft_for_review"Approval policy
dueAtstring.date-timeNoDue at
workspaceVisiblebooleanYestrueWorkspace visible
createdByUserIdstringNoID of the associated created by user
workspaceIdstringNoID of the associated workspace
metadataobjectNoMetadata

Example

{
  "taskType": "example",
  "sourceType": "event",
  "sourceRefId": "550e8400-e29b-41d4-a716-446655440000",
  "entityType": "example",
  "entityId": "550e8400-e29b-41d4-a716-446655440000",
  "title": "Example Title",
  "priority": 100,
  "executionMode": "deterministic",
  "approvalPolicy": "auto_execute",
  "workspaceVisible": true
}

On this page