Space Docs
API ReferenceAgent Task

agentTask.create

Type: Mutation · Auth: Workspace-aware

Input

FieldTypeRequiredDefaultDescription
taskTypestringYes—Task type
sourceTypeenum(event, conversation, schedule, operator, workflow, automation_rule)Yes—Source type
sourceRefIdstringNo—ID of the associated source ref
entityTypestringNo—Entity type
entityIdstringNo—ID of the associated entity
titlestringYes—Title
descriptionstringNo—Description
priorityintegerYes100Priority
assignedAgentRoleunknownNo—Assigned agent role
assignedAgentIdunknownNo—ID 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-timeNo—Due at
workspaceVisiblebooleanYestrueWorkspace visible
createdByUserIdstringNo—ID of the associated created by user
workspaceIdstringNo—ID of the associated workspace
metadataobjectNo—Metadata

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